luau-lang / luau

A fast, small, safe, gradually typed embeddable scripting language derived from Lua
https://luau-lang.org
MIT License
3.79k stars 349 forks source link

Type packs are not supported in declaration files #1247

Open Ukendio opened 2 months ago

Ukendio commented 2 months ago

Right now there's a gap in the syntax for declaration files with the lack of support for generic type packs. image

One way it can be resolved is using the preexisting construct of Parser::parseGenericTypeList to get a list of the type packs. However I was told that it may require some post processing of the returned lists as self doesn't need an annotation, but all other parameters needs to be annotated. Additionally I was told that TypeInfer.cpp and ConstraintGenerator.cpp may require changes to handle the varargs

Ukendio commented 2 months ago

Split between whether this should be a bug report or a feature request but I will let moderators handle that1