Add param to fn type

This commit is contained in:
Federico Cassano 2023-08-02 12:09:44 -07:00 committed by GitHub
parent 8b510d3dbb
commit f2391131b7
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,6 +83,7 @@ GenericTypeListWithDefaults =
GenericTypePackParameterWithDefault {',' GenericTypePackParameterWithDefault}
TypeList = Type [',' TypeList] | '...' Type
BoundTypeList = [NAME ':'] Type [',' BoundTypeList] | '...' Type
TypeParams = (Type | TypePack | VariadicTypePack | GenericTypePack) [',' TypeParams]
TypePack = '(' [TypeList] ')'
GenericTypePack = NAME '...'
@ -93,5 +94,5 @@ TableProp = NAME ':' Type
TablePropOrIndexer = TableProp | TableIndexer
PropList = TablePropOrIndexer {fieldsep TablePropOrIndexer} [fieldsep]
TableType = '{' [PropList] '}'
FunctionType = ['<' GenericTypeList '>'] '(' [TypeList] ')' '->' ReturnType
FunctionType = ['<' GenericTypeList '>'] '(' [BoundTypeList] ')' '->' ReturnType
```