diff --git a/src/services/completions.ts b/src/services/completions.ts index 209d04f763e..8392a884cfb 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -925,7 +925,8 @@ namespace ts.Completions { isJsxInitializer = true; break; case SyntaxKind.Identifier: - if (previousToken !== (parent as JsxAttribute).name) { + // For `
// @Filename: /a.tsx +////declare namespace JSX { +//// interface IntrinsicElements { +//// div: { a: string, b: string } +//// } +////} ////const foo = 0; -////
; +////
; +//// +////
+////
const [replacementSpan] = test.ranges(); -goTo.marker(); +goTo.marker("0"); verify.completionListContains("foo", "const foo: 0", undefined, "const", undefined, undefined, { includeInsertTextCompletions: true, insertText: "{foo}", replacementSpan, }); + +verify.completionsAt("1", ["b"]); +verify.completionsAt("2", ["b"]);