mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Fix incorrect returning of completion entries when in string literal of property assignment expression
Fixes #11232
This commit is contained in:
parent
7f07d160b3
commit
ffe07e7e71
@ -4497,7 +4497,9 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (node.parent.kind === SyntaxKind.PropertyAssignment && node.parent.parent.kind === SyntaxKind.ObjectLiteralExpression) {
|
||||
if (node.parent.kind === SyntaxKind.PropertyAssignment &&
|
||||
node.parent.parent.kind === SyntaxKind.ObjectLiteralExpression &&
|
||||
(<PropertyAssignment>node.parent).name === node) {
|
||||
// Get quoted name of properties of the object literal expression
|
||||
// i.e. interface ConfigFiles {
|
||||
// 'jspm:dev': string
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var foo;
|
||||
////interface I {
|
||||
//// metadata: string;
|
||||
//// wat: string;
|
||||
////}
|
||||
////var x: I = {
|
||||
//// metadata: "/*1*/
|
||||
////}
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
verify.not.completionListContains("metadata");
|
||||
verify.not.completionListContains("wat");
|
||||
Loading…
x
Reference in New Issue
Block a user