mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Add param to fn type
This commit is contained in:
parent
8b510d3dbb
commit
f2391131b7
1 changed files with 2 additions and 1 deletions
|
@ -83,6 +83,7 @@ GenericTypeListWithDefaults =
|
||||||
GenericTypePackParameterWithDefault {',' GenericTypePackParameterWithDefault}
|
GenericTypePackParameterWithDefault {',' GenericTypePackParameterWithDefault}
|
||||||
|
|
||||||
TypeList = Type [',' TypeList] | '...' Type
|
TypeList = Type [',' TypeList] | '...' Type
|
||||||
|
BoundTypeList = [NAME ':'] Type [',' BoundTypeList] | '...' Type
|
||||||
TypeParams = (Type | TypePack | VariadicTypePack | GenericTypePack) [',' TypeParams]
|
TypeParams = (Type | TypePack | VariadicTypePack | GenericTypePack) [',' TypeParams]
|
||||||
TypePack = '(' [TypeList] ')'
|
TypePack = '(' [TypeList] ')'
|
||||||
GenericTypePack = NAME '...'
|
GenericTypePack = NAME '...'
|
||||||
|
@ -93,5 +94,5 @@ TableProp = NAME ':' Type
|
||||||
TablePropOrIndexer = TableProp | TableIndexer
|
TablePropOrIndexer = TableProp | TableIndexer
|
||||||
PropList = TablePropOrIndexer {fieldsep TablePropOrIndexer} [fieldsep]
|
PropList = TablePropOrIndexer {fieldsep TablePropOrIndexer} [fieldsep]
|
||||||
TableType = '{' [PropList] '}'
|
TableType = '{' [PropList] '}'
|
||||||
FunctionType = ['<' GenericTypeList '>'] '(' [TypeList] ')' '->' ReturnType
|
FunctionType = ['<' GenericTypeList '>'] '(' [BoundTypeList] ')' '->' ReturnType
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue