File tree 2 files changed +21
-0
lines changed
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
4500
4500
break ;
4501
4501
case SyntaxKind . AsteriskToken :
4502
4502
return isMethodDeclaration ( parent ) ? tryCast ( parent . parent , isObjectLiteralExpression ) : undefined ;
4503
+ case SyntaxKind . AsyncKeyword :
4504
+ return tryCast ( parent . parent , isObjectLiteralExpression ) ;
4503
4505
case SyntaxKind . Identifier :
4504
4506
return ( contextToken as Identifier ) . text === "async" && isShorthandPropertyAssignment ( contextToken . parent )
4505
4507
? 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