mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 11:24:49 -05:00
"function" without followed by "(" should be considered as Global function type
This commit is contained in:
@@ -6855,6 +6855,7 @@ namespace ts {
|
||||
case "Object":
|
||||
return anyType;
|
||||
case "Function":
|
||||
case "function":
|
||||
return globalFunctionType;
|
||||
case "Array":
|
||||
case "array":
|
||||
|
||||
@@ -6075,7 +6075,10 @@ namespace ts {
|
||||
case SyntaxKind.OpenBraceToken:
|
||||
return parseJSDocRecordType();
|
||||
case SyntaxKind.FunctionKeyword:
|
||||
return parseJSDocFunctionType();
|
||||
if (lookAhead(nextTokenIsOpenParen)) {
|
||||
return parseJSDocFunctionType();
|
||||
}
|
||||
break;
|
||||
case SyntaxKind.DotDotDotToken:
|
||||
return parseJSDocVariadicType();
|
||||
case SyntaxKind.NewKeyword:
|
||||
|
||||
Reference in New Issue
Block a user