Fix isNewIdentifierLocation after generator (#46491)
This commit is contained in:
parent
7799113e9a
commit
61f5ceb832
|
@ -2258,6 +2258,9 @@ namespace ts.Completions {
|
|||
case SyntaxKind.AsyncKeyword:
|
||||
return containingNodeKind === SyntaxKind.MethodDeclaration // const obj = { async c|()
|
||||
|| containingNodeKind === SyntaxKind.ShorthandPropertyAssignment; // const obj = { async c|
|
||||
|
||||
case SyntaxKind.AsteriskToken:
|
||||
return containingNodeKind === SyntaxKind.MethodDeclaration; // const obj = { * c|
|
||||
}
|
||||
|
||||
if (isClassMemberCompletionKeyword(tokenKind)) {
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// const obj = {
|
||||
//// a() {},
|
||||
//// * b/*1*/
|
||||
//// };
|
||||
//// const obj2 = {
|
||||
//// * /*2*/
|
||||
//// };
|
||||
//// const obj3 = {
|
||||
//// async * /*3*/
|
||||
//// };
|
||||
//// class Foo {
|
||||
//// * b/*4*/
|
||||
//// }
|
||||
//// class Foo2 {
|
||||
//// * /*5*/
|
||||
//// }
|
||||
//// class Bar {
|
||||
//// static * b/*6*/
|
||||
//// }
|
||||
|
||||
test.markerNames().forEach(marker => {
|
||||
verify.completions({
|
||||
marker,
|
||||
isNewIdentifierLocation: true
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue