File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -4500,6 +4500,8 @@ function tryGetObjectLikeCompletionContainer(contextToken: Node | undefined): Ob
45004500 break ;
45014501 case SyntaxKind . AsteriskToken :
45024502 return isMethodDeclaration ( parent ) ? tryCast ( parent . parent , isObjectLiteralExpression ) : undefined ;
4503+ case SyntaxKind . AsyncKeyword :
4504+ return tryCast ( parent . parent , isObjectLiteralExpression ) ;
45034505 case SyntaxKind . Identifier :
45044506 return ( contextToken as Identifier ) . text === "async" && isShorthandPropertyAssignment ( contextToken . parent )
45054507 ? contextToken . parent . parent : undefined ;
Original file line number Diff line number Diff line change 1+ /// <reference path="fourslash.ts" />
2+
3+ // @Filename : a.ts
4+ ////type T = {
5+ //// foo: () => Promise<void>;
6+ //// }
7+ ////const foo: T = {
8+ //// async f/**/
9+ //// }
10+
11+ verify . completions ( {
12+ marker : "" ,
13+ includes : [
14+ {
15+ name : "foo" ,
16+ sortText : completion . SortText . LocationPriority ,
17+ } ,
18+ ] ,
19+ } ) ;
You can’t perform that action at this time.
0 commit comments