mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Alias generic/variadic type packs to improve readability
This commit is contained in:
parent
835bdf7769
commit
ba3c5ead39
1 changed files with 5 additions and 3 deletions
|
@ -71,11 +71,13 @@ Type =
|
|||
SimpleType ['|' Type] |
|
||||
SimpleType ['&' Type]
|
||||
|
||||
GenericTypePack = NAME '...' ['=' (TypePack | '...' Type | NAME '...')]
|
||||
GenericTypeList = NAME ['=' Type] [',' GenericTypeList] | GenericTypePack {',' GenericTypePack}
|
||||
GenericTypePackParameter = NAME '...' ['=' (TypePack | VariadicTypePack | GenericTypePack)]
|
||||
GenericTypeParameterList = NAME ['=' Type] [',' GenericTypeParameterList] | GenericTypePackParameter {',' GenericTypePackParameter}
|
||||
TypeList = Type [',' TypeList] | '...' Type
|
||||
TypeParams = (Type | TypePack | '...' Type | NAME '...') [',' TypeParams]
|
||||
TypeParams = (Type | TypePack | VariadicTypePack | GenericTypePack) [',' TypeParams]
|
||||
TypePack = '(' [TypeList] ')'
|
||||
GenericTypePack = NAME '...'
|
||||
VariadicTypePack = '...' Type
|
||||
ReturnType = Type | TypePack
|
||||
TableIndexer = '[' Type ']' ':' Type
|
||||
TableProp = NAME ':' Type
|
||||
|
|
Loading…
Add table
Reference in a new issue