This commit is contained in:
JohnnyMorganz 2023-05-02 14:43:19 +01:00
parent f3c0fea22e
commit 5278daa506

View file

@ -63,15 +63,14 @@ SimpleType =
NAME ['.' NAME] [ '<' [TypeParams] '>' ] |
'typeof' '(' exp ')' |
TableType |
FunctionType
FunctionType |
'(' SimpleType ')'
SingletonType = STRING | 'true' | 'false'
Type =
Type ['?'] |
Type ['|' Type] |
Type ['&' Type] |
'(' Type ')'
UnionSuffix = {'?'} ['|' SimpleType]
IntersectionSuffix = ['&' SimpleType]
Type = SimpleType {UnionSuffix | IntersectionSuffix}
GenericTypePackParameter = NAME '...'
GenericTypeList = NAME [',' GenericTypeList] | GenericTypePackParameter {',' GenericTypePackParameter}