From f2391131b706725c3b8c919187b7f5cb6135dbe5 Mon Sep 17 00:00:00 2001 From: Federico Cassano Date: Wed, 2 Aug 2023 12:09:44 -0700 Subject: [PATCH] Add param to fn type --- docs/_pages/grammar.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/_pages/grammar.md b/docs/_pages/grammar.md index 96d40230..53e1bfdd 100644 --- a/docs/_pages/grammar.md +++ b/docs/_pages/grammar.md @@ -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 ```