File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -1868,7 +1868,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1868
1868
const nodeLinks = getNodeLinks(node);
1869
1869
cachedResolvedSignatures.push([nodeLinks, nodeLinks.resolvedSignature] as const);
1870
1870
nodeLinks.resolvedSignature = undefined;
1871
- if (isFunctionLike (node)) {
1871
+ if (isFunctionExpressionOrArrowFunction (node)) {
1872
1872
const symbolLinks = getSymbolLinks(getSymbolOfDeclaration(node));
1873
1873
const type = symbolLinks.type;
1874
1874
cachedTypes.push([symbolLinks, type] as const);
Original file line number Diff line number Diff line change 5
5
ArrayBindingElement ,
6
6
ArrayBindingOrAssignmentElement ,
7
7
ArrayBindingOrAssignmentPattern ,
8
+ ArrowFunction ,
8
9
AssertionExpression ,
9
10
AssignmentDeclarationKind ,
10
11
AssignmentPattern ,
@@ -64,6 +65,7 @@ import {
64
65
ForInitializer ,
65
66
ForInOrOfStatement ,
66
67
FunctionBody ,
68
+ FunctionExpression ,
67
69
FunctionLikeDeclaration ,
68
70
FunctionTypeNode ,
69
71
GeneratedIdentifier ,
@@ -119,6 +121,7 @@ import {
119
121
isExportSpecifier ,
120
122
isFunctionBlock ,
121
123
isFunctionExpression ,
124
+ isFunctionExpressionOrArrowFunction ,
122
125
isFunctionTypeNode ,
123
126
isIdentifier ,
124
127
isImportSpecifier ,
@@ -1928,8 +1931,8 @@ export function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAcc
1928
1931
}
1929
1932
1930
1933
/** @internal */
1931
- export function isCallLikeOrFunctionLikeExpression ( node : Node ) : node is CallLikeExpression | SignatureDeclaration {
1932
- return isCallLikeExpression ( node ) || isFunctionLike ( node ) ;
1934
+ export function isCallLikeOrFunctionLikeExpression ( node : Node ) : node is CallLikeExpression | FunctionExpression | ArrowFunction {
1935
+ return isCallLikeExpression ( node ) || isFunctionExpressionOrArrowFunction ( node ) ;
1933
1936
}
1934
1937
1935
1938
export function isCallLikeExpression ( node : Node ) : node is CallLikeExpression {
Original file line number Diff line number Diff line change
1
+ ///<reference path="fourslash.ts" />
2
+
3
+ //// /**
4
+ //// * @returns {function/**/(): string }
5
+ //// */
6
+ //// function updateCalendarEvent() {
7
+ //// return "";
8
+ //// }
9
+
10
+ verify . completions ( {
11
+ marker : "" ,
12
+ exact : completion . globalTypes
13
+ } ) ;
You can’t perform that action at this time.
0 commit comments