File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,9 @@ namespace ts.Completions {
138
138
return undefined ;
139
139
}
140
140
141
- if ( node . parent . kind === SyntaxKind . PropertyAssignment && node . parent . parent . kind === SyntaxKind . ObjectLiteralExpression ) {
141
+ if ( node . parent . kind === SyntaxKind . PropertyAssignment &&
142
+ node . parent . parent . kind === SyntaxKind . ObjectLiteralExpression &&
143
+ ( < PropertyAssignment > node . parent ) . name === node ) {
142
144
// Get quoted name of properties of the object literal expression
143
145
// i.e. interface ConfigFiles {
144
146
// 'jspm:dev': string
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts' />
2
+
3
+ ////var foo;
4
+ ////interface I {
5
+ //// metadata: string;
6
+ //// wat: string;
7
+ //// }
8
+ ////var x: I = {
9
+ //// metadata: "/*1*/
10
+ //// }
11
+
12
+ goTo . marker ( '1' ) ;
13
+
14
+ verify . not . completionListContains ( "metadata" ) ;
15
+ verify . not . completionListContains ( "wat" ) ;
You can’t perform that action at this time.
0 commit comments