From 9895cfbf9835c2156e2e4f64a88741b209410e23 Mon Sep 17 00:00:00 2001 From: JohnnyMorganz Date: Sun, 1 Oct 2023 16:20:06 +0200 Subject: [PATCH] Remove names of vararg params --- scripts/dumpRobloxTypes.py | 3 +++ scripts/globalTypes.d.lua | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/dumpRobloxTypes.py b/scripts/dumpRobloxTypes.py index d26ddde0..9dc0a01d 100644 --- a/scripts/dumpRobloxTypes.py +++ b/scripts/dumpRobloxTypes.py @@ -855,6 +855,9 @@ def resolveType(type: Union[ApiValueType, CorrectionsValueType]) -> str: def resolveParameter(param: ApiParameter): paramType = resolveType(param["Type"]) isOptional = paramType[-1] == "?" + isVariadic = paramType.startswith("...") + if isVariadic: + return paramType # cannot give it a name return f"{escapeName(param['Name'])}: {paramType}{'?' if 'Default' in param and not isOptional else ''}" diff --git a/scripts/globalTypes.d.lua b/scripts/globalTypes.d.lua index 3fc3d5ab..b673835a 100644 --- a/scripts/globalTypes.d.lua +++ b/scripts/globalTypes.d.lua @@ -4117,8 +4117,8 @@ declare class Vector2 function Cross(self, other: Vector2): number function Dot(self, v: Vector2): number function Lerp(self, v: Vector2, alpha: number): Vector2 - function Max(self, other: ...(Vector2)): Vector2 - function Min(self, other: ...(Vector2)): Vector2 + function Max(self, ...(Vector2)): Vector2 + function Min(self, ...(Vector2)): Vector2 function __add(self, other: Vector2): Vector2 function __div(self, other: Vector2 | number): Vector2 function __mul(self, other: Vector2 | number): Vector2 @@ -4147,8 +4147,8 @@ declare class Vector3 function Dot(self, other: Vector3): number function FuzzyEq(self, other: Vector3, epsilon: number): boolean function Lerp(self, goal: Vector3, alpha: number): Vector3 - function Max(self, other: ...(Vector3)): Vector3 - function Min(self, other: ...(Vector3)): Vector3 + function Max(self, ...(Vector3)): Vector3 + function Min(self, ...(Vector3)): Vector3 function __add(self, other: Vector3): Vector3 function __div(self, other: Vector3 | number): Vector3 function __mul(self, other: Vector3 | number): Vector3