Skip to content

Commit

Permalink
Remove names of vararg params
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Oct 1, 2023
1 parent 3a4a06d commit 9895cfb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions scripts/dumpRobloxTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''}"


Expand Down
8 changes: 4 additions & 4 deletions scripts/globalTypes.d.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9895cfb

Please sign in to comment.