diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index 37661b28d0f54..df11f6c445f60 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -208,11 +208,12 @@ namespace ts.FindAllReferences { const node = getTouchingPropertyName(sourceFile, position); const referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, { use: FindReferencesUse.References }); const checker = program.getTypeChecker(); + const symbol = checker.getSymbolAtLocation(node); return !referencedSymbols || !referencedSymbols.length ? undefined : mapDefined(referencedSymbols, ({ definition, references }) => // Only include referenced symbols that have a valid definition. definition && { definition: checker.runWithCancellationToken(cancellationToken, checker => definitionToReferencedSymbolDefinitionInfo(definition, checker, node)), - references: references.map(toReferenceEntry) + references: references.map(r => toReferenceEntry(r, symbol)) }); } @@ -387,7 +388,7 @@ namespace ts.FindAllReferences { return { ...entryToDocumentSpan(entry), ...(providePrefixAndSuffixText && getPrefixAndSuffixText(entry, originalNode, checker)) }; } - export function toReferenceEntry(entry: Entry): ReferenceEntry { + export function toReferenceEntry(entry: Entry, symbol: Symbol | undefined): ReferenceEntry { const documentSpan = entryToDocumentSpan(entry); if (entry.kind === EntryKind.Span) { return { ...documentSpan, isWriteAccess: false, isDefinition: false }; @@ -396,7 +397,7 @@ namespace ts.FindAllReferences { return { ...documentSpan, isWriteAccess: isWriteAccessForReference(node), - isDefinition: isDefinitionForReference(node), + isDefinition: isDeclarationOfSymbol(node, symbol), isInString: kind === EntryKind.StringLiteral ? true : undefined, }; } @@ -544,11 +545,16 @@ namespace ts.FindAllReferences { return !!decl && declarationIsWriteAccess(decl) || node.kind === SyntaxKind.DefaultKeyword || isWriteAccess(node); } - function isDefinitionForReference(node: Node): boolean { - return node.kind === SyntaxKind.DefaultKeyword - || !!getDeclarationFromName(node) - || isLiteralComputedPropertyDeclarationName(node) - || (node.kind === SyntaxKind.ConstructorKeyword && isConstructorDeclaration(node.parent)); + /** Whether a reference, `node`, is a definition of the `target` symbol */ + function isDeclarationOfSymbol(node: Node, target: Symbol | undefined): boolean { + if (!target) return false; + const source = getDeclarationFromName(node) || + (node.kind === SyntaxKind.DefaultKeyword ? node.parent + : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent + : node.kind === SyntaxKind.ConstructorKeyword && isConstructorDeclaration(node.parent) ? node.parent.parent + : undefined); + const commonjsSource = source && isBinaryExpression(source) ? source.left as unknown as Declaration : undefined; + return !!(source && target.declarations?.some(d => d === source || d === commonjsSource)); } /** diff --git a/src/services/services.ts b/src/services/services.ts index 426fe7a52690d..3817eae5f9639 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1763,7 +1763,7 @@ namespace ts { function getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined { synchronizeHostData(); - return getReferencesWorker(getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: FindAllReferences.FindReferencesUse.References }, FindAllReferences.toReferenceEntry); + return getReferencesWorker(getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: FindAllReferences.FindReferencesUse.References }, (entry, node, checker) => FindAllReferences.toReferenceEntry(entry, checker.getSymbolAtLocation(node))); } function getReferencesWorker(node: Node, position: number, options: FindAllReferences.Options, cb: FindAllReferences.ToReferenceOrRenameEntry): T[] | undefined { @@ -1784,7 +1784,8 @@ namespace ts { function getFileReferences(fileName: string): ReferenceEntry[] { synchronizeHostData(); - return FindAllReferences.Core.getReferencesForFileName(fileName, program, program.getSourceFiles()).map(FindAllReferences.toReferenceEntry); + const moduleSymbol = program.getSourceFile(fileName)?.symbol; + return FindAllReferences.Core.getReferencesForFileName(fileName, program, program.getSourceFiles()).map(r => FindAllReferences.toReferenceEntry(r, moduleSymbol)); } function getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles = false): NavigateToItem[] { diff --git a/src/testRunner/unittests/tsserver/getExportReferences.ts b/src/testRunner/unittests/tsserver/getExportReferences.ts index 45bd08e39b8de..2312c7b823d07 100644 --- a/src/testRunner/unittests/tsserver/getExportReferences.ts +++ b/src/testRunner/unittests/tsserver/getExportReferences.ts @@ -32,7 +32,8 @@ ${exportNestedObject} const referenceMainTs = (mainTs: File, text: string): protocol.ReferencesResponseItem => makeReferenceItem({ file: mainTs, - isDefinition: true, + isDefinition: false, + isWriteAccess: true, lineText: mainTs.content, contextText: mainTs.content, text, @@ -113,8 +114,11 @@ ${exportNestedObject} referenceMainTs(mainTs, "valueC"), referenceModTs( { text: "valueC", lineText: exportObjectDestructured, contextText: "valueC: 0" }, - { options: { index: 1 } }, - ), + { + options: { index: 1 }, + isDefinition: false, + isWriteAccess: true, + }), ], symbolDisplayString: "const valueC: number", symbolName: "valueC", @@ -171,7 +175,11 @@ ${exportNestedObject} lineText: exportNestedObject, contextText: "valueF: 1", }, - { options: { index: 1 } }, + { + options: { index: 1 }, + isDefinition: false, + isWriteAccess: true, + }, ), ], symbolDisplayString: "const valueF: number", diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index 65e11ee56cc01..bae075912be5f 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -186,7 +186,8 @@ function foo() { file: keyboardTestTs, text: searchStr, contextText: importStr, - isDefinition: true, + isDefinition: false, + isWriteAccess: true, lineText: importStr }), makeReferenceItem({ @@ -200,7 +201,8 @@ function foo() { file: terminalTs, text: searchStr, contextText: importStr, - isDefinition: true, + isDefinition: false, + isWriteAccess: true, lineText: importStr }), makeReferenceItem({ diff --git a/tests/baselines/reference/duplicatePackageServices.baseline.jsonc b/tests/baselines/reference/duplicatePackageServices.baseline.jsonc index 5769b2172f612..64bea82c076e9 100644 --- a/tests/baselines/reference/duplicatePackageServices.baseline.jsonc +++ b/tests/baselines/reference/duplicatePackageServices.baseline.jsonc @@ -141,7 +141,7 @@ "length": 49 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -219,7 +219,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -368,7 +368,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -455,7 +455,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -613,7 +613,7 @@ "length": 49 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -691,7 +691,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllReferencesDynamicImport3.baseline.jsonc b/tests/baselines/reference/findAllReferencesDynamicImport3.baseline.jsonc index d7c1a25ed9793..7c3e36b89df83 100644 --- a/tests/baselines/reference/findAllReferencesDynamicImport3.baseline.jsonc +++ b/tests/baselines/reference/findAllReferencesDynamicImport3.baseline.jsonc @@ -78,7 +78,7 @@ "length": 7 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -151,7 +151,7 @@ "length": 39 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc b/tests/baselines/reference/findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc new file mode 100644 index 0000000000000..23df3d35dac4a --- /dev/null +++ b/tests/baselines/reference/findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc @@ -0,0 +1,425 @@ +// === /typings/global.d.ts === +// import * as _THREE from '[|three|]'; +// declare global { +// const [|THREE|]: typeof _THREE; +// } + +// === /src/index.ts === +// export const a = {}; +// let v = new [|THREE|].Vector2(); + +// === /node_modules/@types/three/index.d.ts === +// export * from "./three-core"; +// export as namespace /*FIND ALL REFS*/[|THREE|]; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/node_modules/@types/three/index.d.ts", + "kind": "var", + "name": "module THREE\nvar THREE: typeof import(\"/node_modules/@types/three/index\")", + "textSpan": { + "start": 0, + "length": 56 + }, + "displayParts": [ + { + "text": "module", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "THREE", + "kind": "localName" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "var", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "THREE", + "kind": "localName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "typeof", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "\"/node_modules/@types/three/index\"", + "kind": "stringLiteral" + }, + { + "text": ")", + "kind": "punctuation" + } + ] + }, + "references": [ + { + "textSpan": { + "start": 50, + "length": 5 + }, + "fileName": "/node_modules/@types/three/index.d.ts", + "contextSpan": { + "start": 30, + "length": 26 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 25, + "length": 5 + }, + "fileName": "/typings/global.d.ts", + "contextSpan": { + "start": 0, + "length": 32 + }, + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 60, + "length": 5 + }, + "fileName": "/typings/global.d.ts", + "contextSpan": { + "start": 54, + "length": 27 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 33, + "length": 5 + }, + "fileName": "/src/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } +] + +// === /typings/global.d.ts === +// import * as _THREE from '/*FIND ALL REFS*/[|three|]'; +// declare global { +// const [|THREE|]: typeof _THREE; +// } + +// === /src/index.ts === +// export const a = {}; +// let v = new [|THREE|].Vector2(); + +// === /node_modules/@types/three/index.d.ts === +// export * from "./three-core"; +// export as namespace [|THREE|]; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/node_modules/@types/three/index.d.ts", + "kind": "var", + "name": "module THREE\nvar THREE: typeof import(\"/node_modules/@types/three/index\")", + "textSpan": { + "start": 0, + "length": 56 + }, + "displayParts": [ + { + "text": "module", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "THREE", + "kind": "localName" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "var", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "THREE", + "kind": "localName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "typeof", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "\"/node_modules/@types/three/index\"", + "kind": "stringLiteral" + }, + { + "text": ")", + "kind": "punctuation" + } + ] + }, + "references": [ + { + "textSpan": { + "start": 50, + "length": 5 + }, + "fileName": "/node_modules/@types/three/index.d.ts", + "contextSpan": { + "start": 30, + "length": 26 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 25, + "length": 5 + }, + "fileName": "/typings/global.d.ts", + "contextSpan": { + "start": 0, + "length": 32 + }, + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 60, + "length": 5 + }, + "fileName": "/typings/global.d.ts", + "contextSpan": { + "start": 54, + "length": 27 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 33, + "length": 5 + }, + "fileName": "/src/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } +] + +// === /typings/global.d.ts === +// import * as _THREE from '[|three|]'; +// declare global { +// const /*FIND ALL REFS*/[|THREE|]: typeof _THREE; +// } + +// === /src/index.ts === +// export const a = {}; +// let v = new [|THREE|].Vector2(); + +// === /node_modules/@types/three/index.d.ts === +// export * from "./three-core"; +// export as namespace [|THREE|]; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/node_modules/@types/three/index.d.ts", + "kind": "var", + "name": "module THREE\nvar THREE: typeof import(\"/node_modules/@types/three/index\")", + "textSpan": { + "start": 0, + "length": 56 + }, + "displayParts": [ + { + "text": "module", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "THREE", + "kind": "localName" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "var", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "THREE", + "kind": "localName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "typeof", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "\"/node_modules/@types/three/index\"", + "kind": "stringLiteral" + }, + { + "text": ")", + "kind": "punctuation" + } + ] + }, + "references": [ + { + "textSpan": { + "start": 50, + "length": 5 + }, + "fileName": "/node_modules/@types/three/index.d.ts", + "contextSpan": { + "start": 30, + "length": 26 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 25, + "length": 5 + }, + "fileName": "/typings/global.d.ts", + "contextSpan": { + "start": 0, + "length": 32 + }, + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 60, + "length": 5 + }, + "fileName": "/typings/global.d.ts", + "contextSpan": { + "start": 54, + "length": 27 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 33, + "length": 5 + }, + "fileName": "/src/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/findAllRefsClassExpression0.baseline.jsonc b/tests/baselines/reference/findAllRefsClassExpression0.baseline.jsonc index ef7565d6cd2a5..07a252adb4738 100644 --- a/tests/baselines/reference/findAllRefsClassExpression0.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsClassExpression0.baseline.jsonc @@ -181,7 +181,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -379,7 +379,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -577,7 +577,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -775,7 +775,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsClassExpression1.baseline.jsonc b/tests/baselines/reference/findAllRefsClassExpression1.baseline.jsonc index 61cf18eb46462..7039ff5024b23 100644 --- a/tests/baselines/reference/findAllRefsClassExpression1.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsClassExpression1.baseline.jsonc @@ -170,7 +170,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -366,7 +366,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -553,7 +553,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsClassExpression2.baseline.jsonc b/tests/baselines/reference/findAllRefsClassExpression2.baseline.jsonc index 6cd243313779d..7be94939314e3 100644 --- a/tests/baselines/reference/findAllRefsClassExpression2.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsClassExpression2.baseline.jsonc @@ -174,7 +174,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -374,7 +374,7 @@ "length": 21 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -565,7 +565,7 @@ "length": 21 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsCommonJsRequire.baseline.jsonc b/tests/baselines/reference/findAllRefsCommonJsRequire.baseline.jsonc index d6bed0659ba93..a96fc586e7a53 100644 --- a/tests/baselines/reference/findAllRefsCommonJsRequire.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsCommonJsRequire.baseline.jsonc @@ -176,7 +176,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -189,7 +189,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsCommonJsRequire2.baseline.jsonc b/tests/baselines/reference/findAllRefsCommonJsRequire2.baseline.jsonc index 3037fcb5bbed0..76cb466413422 100644 --- a/tests/baselines/reference/findAllRefsCommonJsRequire2.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsCommonJsRequire2.baseline.jsonc @@ -208,7 +208,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsCommonJsRequire3.baseline.jsonc b/tests/baselines/reference/findAllRefsCommonJsRequire3.baseline.jsonc index 87d82f1ae6ed2..4fe9e51a75498 100644 --- a/tests/baselines/reference/findAllRefsCommonJsRequire3.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsCommonJsRequire3.baseline.jsonc @@ -176,7 +176,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -185,7 +185,7 @@ }, "fileName": "/a.js", "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsDefaultImport.baseline.jsonc b/tests/baselines/reference/findAllRefsDefaultImport.baseline.jsonc index 9cf1d55f570e4..6acc86644c282 100644 --- a/tests/baselines/reference/findAllRefsDefaultImport.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsDefaultImport.baseline.jsonc @@ -165,7 +165,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -338,7 +338,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsDestructureGeneric.baseline.jsonc b/tests/baselines/reference/findAllRefsDestructureGeneric.baseline.jsonc index 3baeadb401a7e..fd9f24341998b 100644 --- a/tests/baselines/reference/findAllRefsDestructureGeneric.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsDestructureGeneric.baseline.jsonc @@ -101,7 +101,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -197,7 +197,7 @@ "length": 11 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/findAllRefsDestructureGetter.baseline.jsonc b/tests/baselines/reference/findAllRefsDestructureGetter.baseline.jsonc index fbd2894192725..fed2ca061c58a 100644 --- a/tests/baselines/reference/findAllRefsDestructureGetter.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsDestructureGetter.baseline.jsonc @@ -91,7 +91,7 @@ "length": 28 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -177,7 +177,7 @@ "length": 21 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -422,7 +422,7 @@ "length": 28 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -508,7 +508,7 @@ "length": 19 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/findAllRefsDestructureGetter2.baseline.jsonc b/tests/baselines/reference/findAllRefsDestructureGetter2.baseline.jsonc index 9752033718efe..957e5c93b1b3e 100644 --- a/tests/baselines/reference/findAllRefsDestructureGetter2.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsDestructureGetter2.baseline.jsonc @@ -90,7 +90,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -175,7 +175,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -331,7 +331,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -416,7 +416,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/findAllRefsExportAsNamespace.baseline.jsonc b/tests/baselines/reference/findAllRefsExportAsNamespace.baseline.jsonc index 284382f245ce8..a2c855544c20f 100644 --- a/tests/baselines/reference/findAllRefsExportAsNamespace.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsExportAsNamespace.baseline.jsonc @@ -178,7 +178,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -355,7 +355,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -550,7 +550,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsExportConstEqualToClass.baseline.jsonc b/tests/baselines/reference/findAllRefsExportConstEqualToClass.baseline.jsonc index 97152aefeeab2..31017d06ea760 100644 --- a/tests/baselines/reference/findAllRefsExportConstEqualToClass.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsExportConstEqualToClass.baseline.jsonc @@ -166,7 +166,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -340,7 +340,7 @@ "length": 19 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsExportEquals.baseline.jsonc b/tests/baselines/reference/findAllRefsExportEquals.baseline.jsonc index d31c3546ac478..14b72c702eee9 100644 --- a/tests/baselines/reference/findAllRefsExportEquals.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsExportEquals.baseline.jsonc @@ -199,7 +199,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -271,7 +271,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -406,7 +406,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -613,7 +613,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -807,7 +807,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -947,7 +947,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1082,7 +1082,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsForComputedProperties.baseline.jsonc b/tests/baselines/reference/findAllRefsForComputedProperties.baseline.jsonc index 5d4fca2c6c67d..90a37123bfb0c 100644 --- a/tests/baselines/reference/findAllRefsForComputedProperties.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForComputedProperties.baseline.jsonc @@ -119,7 +119,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -197,7 +197,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } @@ -311,7 +311,7 @@ "length": 22 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -324,7 +324,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -516,7 +516,7 @@ "length": 22 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -607,7 +607,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsForComputedProperties2.baseline.jsonc b/tests/baselines/reference/findAllRefsForComputedProperties2.baseline.jsonc index 9bdecdd5bb602..2566b42dcf930 100644 --- a/tests/baselines/reference/findAllRefsForComputedProperties2.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForComputedProperties2.baseline.jsonc @@ -107,7 +107,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -185,7 +185,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } @@ -287,7 +287,7 @@ "length": 13 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -300,7 +300,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -480,7 +480,7 @@ "length": 13 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -571,7 +571,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsForDefaultExport.baseline.jsonc b/tests/baselines/reference/findAllRefsForDefaultExport.baseline.jsonc index 6694faed28058..9bab597a12901 100644 --- a/tests/baselines/reference/findAllRefsForDefaultExport.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForDefaultExport.baseline.jsonc @@ -166,7 +166,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsForDefaultExport04.baseline.jsonc b/tests/baselines/reference/findAllRefsForDefaultExport04.baseline.jsonc index 86d5233e7e864..1bf463b2871cb 100644 --- a/tests/baselines/reference/findAllRefsForDefaultExport04.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForDefaultExport04.baseline.jsonc @@ -164,7 +164,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -345,7 +345,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -553,7 +553,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -770,7 +770,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -978,7 +978,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsForDefaultExportAnonymous.baseline.jsonc b/tests/baselines/reference/findAllRefsForDefaultExportAnonymous.baseline.jsonc index b9072776ca151..1fefc3dd46bd5 100644 --- a/tests/baselines/reference/findAllRefsForDefaultExportAnonymous.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForDefaultExportAnonymous.baseline.jsonc @@ -109,7 +109,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -226,7 +226,7 @@ "length": 28 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsForDefaultExport_anonymous.baseline.jsonc b/tests/baselines/reference/findAllRefsForDefaultExport_anonymous.baseline.jsonc index 18294458d6cfa..a3c930d97521c 100644 --- a/tests/baselines/reference/findAllRefsForDefaultExport_anonymous.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForDefaultExport_anonymous.baseline.jsonc @@ -109,7 +109,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsForDefaultExport_reExport.baseline.jsonc b/tests/baselines/reference/findAllRefsForDefaultExport_reExport.baseline.jsonc index c059386ac9f09..ab6f50f8aab89 100644 --- a/tests/baselines/reference/findAllRefsForDefaultExport_reExport.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForDefaultExport_reExport.baseline.jsonc @@ -166,7 +166,7 @@ "length": 35 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -256,7 +256,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -430,7 +430,7 @@ "length": 35 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -520,7 +520,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -713,7 +713,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -771,7 +771,7 @@ "length": 14 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -977,7 +977,7 @@ "length": 35 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1035,7 +1035,7 @@ "length": 14 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsForDefaultExport_reExport_allowSyntheticDefaultImports.baseline.jsonc b/tests/baselines/reference/findAllRefsForDefaultExport_reExport_allowSyntheticDefaultImports.baseline.jsonc index 42046fd565b18..856c9ceefffc8 100644 --- a/tests/baselines/reference/findAllRefsForDefaultExport_reExport_allowSyntheticDefaultImports.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForDefaultExport_reExport_allowSyntheticDefaultImports.baseline.jsonc @@ -166,7 +166,7 @@ "length": 35 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -256,7 +256,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -430,7 +430,7 @@ "length": 35 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -520,7 +520,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -713,7 +713,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -771,7 +771,7 @@ "length": 14 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -977,7 +977,7 @@ "length": 35 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1035,7 +1035,7 @@ "length": 14 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsForMappedType.baseline.jsonc b/tests/baselines/reference/findAllRefsForMappedType.baseline.jsonc new file mode 100644 index 0000000000000..5e6dc75bbff23 --- /dev/null +++ b/tests/baselines/reference/findAllRefsForMappedType.baseline.jsonc @@ -0,0 +1,109 @@ +// === /tests/cases/fourslash/findAllRefsForMappedType.ts === +// interface T { /*FIND ALL REFS*/[|a|]: number }; +// type U = { [K in keyof T]: string }; +// type V = { [K in keyof U]: boolean }; +// const u: U = { [|a|]: "" } +// const v: V = { [|a|]: true } + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsForMappedType.ts", + "kind": "property", + "name": "(property) T.a: number", + "textSpan": { + "start": 14, + "length": 1 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "T", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "a", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 14, + "length": 9 + } + }, + "references": [ + { + "textSpan": { + "start": 14, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/findAllRefsForMappedType.ts", + "contextSpan": { + "start": 14, + "length": 9 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 117, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/findAllRefsForMappedType.ts", + "contextSpan": { + "start": 117, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 140, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/findAllRefsForMappedType.ts", + "contextSpan": { + "start": 140, + "length": 7 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/findAllRefsForModuleGlobal.baseline.jsonc b/tests/baselines/reference/findAllRefsForModuleGlobal.baseline.jsonc new file mode 100644 index 0000000000000..36f76543467f6 --- /dev/null +++ b/tests/baselines/reference/findAllRefsForModuleGlobal.baseline.jsonc @@ -0,0 +1,71 @@ +// === /b.ts === +// /// +// import { x } from "/*FIND ALL REFS*/[|foo|]"; +// declare module "[|foo|]" {} + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/node_modules/foo/index.d.ts", + "kind": "module", + "name": "module \"/node_modules/foo/index\"", + "textSpan": { + "start": 0, + "length": 19 + }, + "displayParts": [ + { + "text": "module", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "\"/node_modules/foo/index\"", + "kind": "stringLiteral" + } + ] + }, + "references": [ + { + "textSpan": { + "start": 22, + "length": 3 + }, + "fileName": "/b.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 49, + "length": 3 + }, + "fileName": "/b.ts", + "contextSpan": { + "start": 30, + "length": 24 + }, + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 71, + "length": 3 + }, + "fileName": "/b.ts", + "contextSpan": { + "start": 55, + "length": 23 + }, + "isWriteAccess": true, + "isDefinition": true + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/findAllRefsForStaticInstanceMethodInheritance.baseline.jsonc b/tests/baselines/reference/findAllRefsForStaticInstanceMethodInheritance.baseline.jsonc index a0c70801a9f45..e1010b6d23ca9 100644 --- a/tests/baselines/reference/findAllRefsForStaticInstanceMethodInheritance.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForStaticInstanceMethodInheritance.baseline.jsonc @@ -200,7 +200,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -551,7 +551,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsForStaticInstancePropertyInheritance.baseline.jsonc b/tests/baselines/reference/findAllRefsForStaticInstancePropertyInheritance.baseline.jsonc index 1a9f41df03fed..5141376600653 100644 --- a/tests/baselines/reference/findAllRefsForStaticInstancePropertyInheritance.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForStaticInstancePropertyInheritance.baseline.jsonc @@ -184,7 +184,7 @@ "length": 7 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -511,7 +511,7 @@ "length": 7 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -804,7 +804,7 @@ "length": 7 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1005,7 +1005,7 @@ "length": 7 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1114,7 +1114,7 @@ "length": 7 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsImportDefault.baseline.jsonc b/tests/baselines/reference/findAllRefsImportDefault.baseline.jsonc index 0dff03029feb7..02647e0d517a2 100644 --- a/tests/baselines/reference/findAllRefsImportDefault.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsImportDefault.baseline.jsonc @@ -262,7 +262,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -400,7 +400,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsImportNamed.baseline.jsonc b/tests/baselines/reference/findAllRefsImportNamed.baseline.jsonc index b38afeb149c26..25a6b6f96f469 100644 --- a/tests/baselines/reference/findAllRefsImportNamed.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsImportNamed.baseline.jsonc @@ -260,7 +260,7 @@ "length": 21 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsImportStarOfExportEquals.baseline.jsonc b/tests/baselines/reference/findAllRefsImportStarOfExportEquals.baseline.jsonc index e56b647225196..5cdb00e53f3c1 100644 --- a/tests/baselines/reference/findAllRefsImportStarOfExportEquals.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsImportStarOfExportEquals.baseline.jsonc @@ -250,7 +250,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -398,7 +398,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -674,7 +674,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -822,7 +822,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1098,7 +1098,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1246,7 +1246,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1826,7 +1826,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1839,7 +1839,7 @@ "length": 51 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1982,7 +1982,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2250,7 +2250,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2263,7 +2263,7 @@ "length": 51 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2406,7 +2406,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2674,7 +2674,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2687,7 +2687,7 @@ "length": 51 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2830,7 +2830,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsInClassExpression.baseline.jsonc b/tests/baselines/reference/findAllRefsInClassExpression.baseline.jsonc index 5306f5b98ddd6..c50d563aa24a5 100644 --- a/tests/baselines/reference/findAllRefsInClassExpression.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsInClassExpression.baseline.jsonc @@ -165,7 +165,7 @@ "length": 8 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -256,7 +256,7 @@ "length": 13 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/findAllRefsInheritedProperties3.baseline.jsonc b/tests/baselines/reference/findAllRefsInheritedProperties3.baseline.jsonc index c689a210ad41b..25c2c22dca91b 100644 --- a/tests/baselines/reference/findAllRefsInheritedProperties3.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsInheritedProperties3.baseline.jsonc @@ -177,7 +177,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -355,7 +355,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -549,7 +549,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -727,7 +727,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -839,7 +839,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -921,7 +921,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1115,7 +1115,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1197,7 +1197,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1383,7 +1383,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1457,7 +1457,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1635,7 +1635,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1709,7 +1709,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/findAllRefsInheritedProperties4.baseline.jsonc b/tests/baselines/reference/findAllRefsInheritedProperties4.baseline.jsonc index 08e74e25ede2b..c513e29015c45 100644 --- a/tests/baselines/reference/findAllRefsInheritedProperties4.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsInheritedProperties4.baseline.jsonc @@ -157,7 +157,7 @@ "length": 14 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -257,7 +257,7 @@ "length": 14 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -431,7 +431,7 @@ "length": 14 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/findAllRefsIsDefinition.baseline.jsonc b/tests/baselines/reference/findAllRefsIsDefinition.baseline.jsonc new file mode 100644 index 0000000000000..9fc5c92f3b19f --- /dev/null +++ b/tests/baselines/reference/findAllRefsIsDefinition.baseline.jsonc @@ -0,0 +1,945 @@ +// === /tests/cases/fourslash/findAllRefsIsDefinition.ts === +// declare function [|foo|](a: number): number; +// declare function [|foo|](a: string): string; +// declare function [|foo|]/*FIND ALL REFS*/(a: string | number): string | number; +// +// function foon(a: number): number; +// function foon(a: string): string; +// function foon(a: string | number): string | number { +// return a +// } +// +// [|foo|]; foon; +// +// export const bar = 123; +// console.log({ bar }); +// +// interface IFoo { +// foo(): void; +// } +// class Foo implements IFoo { +// constructor(n: number) +// constructor() +// constructor(n: number?) { } +// foo(): void { } +// static init() { return new this() } +// } + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "kind": "function", + "name": "function foo(a: number): number (+2 overloads)", + "textSpan": { + "start": 17, + "length": 3 + }, + "displayParts": [ + { + "text": "function", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "foo", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "a", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "+", + "kind": "operator" + }, + { + "text": "2", + "kind": "numericLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "overloads", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + } + ], + "contextSpan": { + "start": 0, + "length": 40 + } + }, + "references": [ + { + "textSpan": { + "start": 17, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 0, + "length": 40 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 58, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 41, + "length": 40 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 99, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 82, + "length": 58 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 279, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } +] + +// === /tests/cases/fourslash/findAllRefsIsDefinition.ts === +// declare function foo(a: number): number; +// declare function foo(a: string): string; +// declare function foo(a: string | number): string | number; +// +// function [|foon|](a: number): number; +// function [|foon|](a: string): string; +// function [|foon|]/*FIND ALL REFS*/(a: string | number): string | number { +// return a +// } +// +// foo; [|foon|]; +// +// export const bar = 123; +// console.log({ bar }); +// +// interface IFoo { +// foo(): void; +// } +// class Foo implements IFoo { +// constructor(n: number) +// constructor() +// constructor(n: number?) { } +// foo(): void { } +// static init() { return new this() } +// } + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "kind": "function", + "name": "function foon(a: number): number (+1 overload)", + "textSpan": { + "start": 151, + "length": 4 + }, + "displayParts": [ + { + "text": "function", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "foon", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "a", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "+", + "kind": "operator" + }, + { + "text": "1", + "kind": "numericLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "overload", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + } + ], + "contextSpan": { + "start": 142, + "length": 33 + } + }, + "references": [ + { + "textSpan": { + "start": 151, + "length": 4 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 142, + "length": 33 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 185, + "length": 4 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 176, + "length": 33 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 219, + "length": 4 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 210, + "length": 67 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 284, + "length": 4 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } +] + +// === /tests/cases/fourslash/findAllRefsIsDefinition.ts === +// declare function foo(a: number): number; +// declare function foo(a: string): string; +// declare function foo(a: string | number): string | number; +// +// function foon(a: number): number; +// function foon(a: string): string; +// function foon(a: string | number): string | number { +// return a +// } +// +// foo; foon; +// +// export const [|bar|]/*FIND ALL REFS*/ = 123; +// console.log({ [|bar|] }); +// +// interface IFoo { +// foo(): void; +// } +// class Foo implements IFoo { +// constructor(n: number) +// constructor() +// constructor(n: number?) { } +// foo(): void { } +// static init() { return new this() } +// } + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "kind": "const", + "name": "const bar: 123", + "textSpan": { + "start": 304, + "length": 3 + }, + "displayParts": [ + { + "text": "const", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "bar", + "kind": "localName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "123", + "kind": "stringLiteral" + } + ], + "contextSpan": { + "start": 291, + "length": 23 + } + }, + "references": [ + { + "textSpan": { + "start": 304, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 291, + "length": 23 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 329, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] + +// === /tests/cases/fourslash/findAllRefsIsDefinition.ts === +// declare function foo(a: number): number; +// declare function foo(a: string): string; +// declare function foo(a: string | number): string | number; +// +// function foon(a: number): number; +// function foon(a: string): string; +// function foon(a: string | number): string | number { +// return a +// } +// +// foo; foon; +// +// export const bar = 123; +// console.log({ bar }); +// +// interface IFoo { +// [|foo|]/*FIND ALL REFS*/(): void; +// } +// class Foo implements IFoo { +// constructor(n: number) +// constructor() +// constructor(n: number?) { } +// [|foo|](): void { } +// static init() { return new this() } +// } + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "kind": "method", + "name": "(method) IFoo.foo(): void", + "textSpan": { + "start": 359, + "length": 3 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "IFoo", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "foo", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 359, + "length": 12 + } + }, + "references": [ + { + "textSpan": { + "start": 359, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 359, + "length": 12 + }, + "isWriteAccess": false, + "isDefinition": true + } + ] + }, + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "kind": "method", + "name": "(method) Foo.foo(): void", + "textSpan": { + "start": 483, + "length": 3 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Foo", + "kind": "className" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "foo", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 483, + "length": 15 + } + }, + "references": [ + { + "textSpan": { + "start": 483, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 483, + "length": 15 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] + +// === /tests/cases/fourslash/findAllRefsIsDefinition.ts === +// declare function foo(a: number): number; +// declare function foo(a: string): string; +// declare function foo(a: string | number): string | number; +// +// function foon(a: number): number; +// function foon(a: string): string; +// function foon(a: string | number): string | number { +// return a +// } +// +// foo; foon; +// +// export const bar = 123; +// console.log({ bar }); +// +// interface IFoo { +// foo(): void; +// } +// class Foo implements IFoo { +// [|constructor|](n: number) +// [|constructor|]() +// /*FIND ALL REFS*/[|constructor|](n: number?) { } +// foo(): void { } +// static init() { return new [|this|]() } +// } + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "kind": "class", + "name": "class Foo", + "textSpan": { + "start": 380, + "length": 3 + }, + "displayParts": [ + { + "text": "class", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Foo", + "kind": "className" + } + ], + "contextSpan": { + "start": 374, + "length": 166 + } + }, + "references": [ + { + "textSpan": { + "start": 406, + "length": 11 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 406, + "length": 22 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 433, + "length": 11 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 433, + "length": 13 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 451, + "length": 11 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 451, + "length": 27 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 530, + "length": 4 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } +] + +// === /tests/cases/fourslash/findAllRefsIsDefinition.ts === +// declare function foo(a: number): number; +// declare function foo(a: string): string; +// declare function foo(a: string | number): string | number; +// +// function foon(a: number): number; +// function foon(a: string): string; +// function foon(a: string | number): string | number { +// return a +// } +// +// foo; foon; +// +// export const bar = 123; +// console.log({ bar }); +// +// interface IFoo { +// [|foo|](): void; +// } +// class Foo implements IFoo { +// constructor(n: number) +// constructor() +// constructor(n: number?) { } +// [|foo|]/*FIND ALL REFS*/(): void { } +// static init() { return new this() } +// } + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "kind": "method", + "name": "(method) IFoo.foo(): void", + "textSpan": { + "start": 359, + "length": 3 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "IFoo", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "foo", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 359, + "length": 12 + } + }, + "references": [ + { + "textSpan": { + "start": 359, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 359, + "length": 12 + }, + "isWriteAccess": false, + "isDefinition": false + } + ] + }, + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "kind": "method", + "name": "(method) Foo.foo(): void", + "textSpan": { + "start": 483, + "length": 3 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Foo", + "kind": "className" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "foo", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 483, + "length": 15 + } + }, + "references": [ + { + "textSpan": { + "start": 483, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsIsDefinition.ts", + "contextSpan": { + "start": 483, + "length": 15 + }, + "isWriteAccess": true, + "isDefinition": true + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName03.baseline.jsonc b/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName03.baseline.jsonc index a4fab74d119e2..580591ae40b07 100644 --- a/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName03.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName03.baseline.jsonc @@ -104,7 +104,7 @@ "length": 68 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -190,7 +190,7 @@ "length": 18 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName04.baseline.jsonc b/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName04.baseline.jsonc index 9265fa627f4a6..51871f2c214c4 100644 --- a/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName04.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName04.baseline.jsonc @@ -108,7 +108,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -224,7 +224,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -314,7 +314,7 @@ "length": 18 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName06.baseline.jsonc b/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName06.baseline.jsonc index b1e5c0d7343bf..512f43791b7aa 100644 --- a/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName06.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName06.baseline.jsonc @@ -112,7 +112,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -138,7 +138,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -258,7 +258,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -284,7 +284,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -404,7 +404,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -430,7 +430,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -524,7 +524,7 @@ "length": 18 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -550,7 +550,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -670,7 +670,7 @@ "length": 18 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -709,7 +709,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName07.baseline.jsonc b/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName07.baseline.jsonc new file mode 100644 index 0000000000000..437475ce3de77 --- /dev/null +++ b/tests/baselines/reference/findAllRefsObjectBindingElementPropertyName07.baseline.jsonc @@ -0,0 +1,86 @@ +// === /tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName07.ts === +// let p, b; +// +// p, [{ /*FIND ALL REFS*/[|a|]: p, b }] = [{ [|a|]: 10, b: true }]; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName07.ts", + "kind": "property", + "name": "(property) a: any", + "textSpan": { + "start": 17, + "length": 1 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "a", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 14, + "length": 36 + } + }, + "references": [ + { + "textSpan": { + "start": 17, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName07.ts", + "contextSpan": { + "start": 14, + "length": 36 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 33, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName07.ts", + "contextSpan": { + "start": 33, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/findAllRefsOfConstructor_multipleFiles.baseline.jsonc b/tests/baselines/reference/findAllRefsOfConstructor_multipleFiles.baseline.jsonc index c9770e8846e0a..00716621ee9fe 100644 --- a/tests/baselines/reference/findAllRefsOfConstructor_multipleFiles.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsOfConstructor_multipleFiles.baseline.jsonc @@ -72,7 +72,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -118,7 +118,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -274,7 +274,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/findAllRefsOnImportAliases.baseline.jsonc b/tests/baselines/reference/findAllRefsOnImportAliases.baseline.jsonc index 76c8329df5468..5a404adaaf0ba 100644 --- a/tests/baselines/reference/findAllRefsOnImportAliases.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsOnImportAliases.baseline.jsonc @@ -131,7 +131,7 @@ "length": 28 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -218,7 +218,7 @@ "length": 28 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -366,7 +366,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -444,7 +444,7 @@ "length": 28 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -592,7 +592,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -670,7 +670,7 @@ "length": 28 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsOnImportAliases2.baseline.jsonc b/tests/baselines/reference/findAllRefsOnImportAliases2.baseline.jsonc index ff58b1ff5ca6b..f23cb5b4bf56e 100644 --- a/tests/baselines/reference/findAllRefsOnImportAliases2.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsOnImportAliases2.baseline.jsonc @@ -155,7 +155,7 @@ "length": 34 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -242,7 +242,7 @@ "length": 34 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -405,7 +405,7 @@ "length": 34 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -492,7 +492,7 @@ "length": 34 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -655,7 +655,7 @@ "length": 34 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -742,7 +742,7 @@ "length": 34 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsParameterPropertyDeclaration_inheritance.baseline.jsonc b/tests/baselines/reference/findAllRefsParameterPropertyDeclaration_inheritance.baseline.jsonc index b349ae93e06ba..d289432f90cb5 100644 --- a/tests/baselines/reference/findAllRefsParameterPropertyDeclaration_inheritance.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsParameterPropertyDeclaration_inheritance.baseline.jsonc @@ -217,7 +217,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -466,7 +466,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsPrefixSuffixPreference.baseline.jsonc b/tests/baselines/reference/findAllRefsPrefixSuffixPreference.baseline.jsonc index 2c405b9122be3..182801f510345 100644 --- a/tests/baselines/reference/findAllRefsPrefixSuffixPreference.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsPrefixSuffixPreference.baseline.jsonc @@ -81,7 +81,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -171,7 +171,7 @@ "length": 28 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -256,7 +256,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -359,7 +359,7 @@ "length": 28 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -543,7 +543,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -556,7 +556,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -731,7 +731,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -744,7 +744,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -836,7 +836,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -915,7 +915,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/findAllRefsPropertyContextuallyTypedByTypeParam01.baseline.jsonc b/tests/baselines/reference/findAllRefsPropertyContextuallyTypedByTypeParam01.baseline.jsonc new file mode 100644 index 0000000000000..3fb151b80c310 --- /dev/null +++ b/tests/baselines/reference/findAllRefsPropertyContextuallyTypedByTypeParam01.baseline.jsonc @@ -0,0 +1,129 @@ +// === /tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts === +// interface IFoo { +// /*FIND ALL REFS*/[|a|]: string; +// } +// class C { +// method() { +// var x: T = { +// [|a|]: "" +// }; +// x.[|a|]; +// } +// } +// +// +// var x: IFoo = { +// [|a|]: "ss" +// }; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts", + "kind": "property", + "name": "(property) IFoo.a: string", + "textSpan": { + "start": 21, + "length": 1 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "IFoo", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "a", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 21, + "length": 10 + } + }, + "references": [ + { + "textSpan": { + "start": 21, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts", + "contextSpan": { + "start": 21, + "length": 10 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 108, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts", + "contextSpan": { + "start": 108, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 135, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 168, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts", + "contextSpan": { + "start": 168, + "length": 7 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/findAllRefsReExportLocal.baseline.jsonc b/tests/baselines/reference/findAllRefsReExportLocal.baseline.jsonc index db7b4693bf963..86c7fa9e6bc3c 100644 --- a/tests/baselines/reference/findAllRefsReExportLocal.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsReExportLocal.baseline.jsonc @@ -75,7 +75,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -178,7 +178,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -277,7 +277,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -367,7 +367,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -446,7 +446,7 @@ "length": 6 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -562,7 +562,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -661,7 +661,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -751,7 +751,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -843,7 +843,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -946,7 +946,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1045,7 +1045,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1135,7 +1135,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1313,7 +1313,7 @@ "length": 6 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1326,7 +1326,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1429,7 +1429,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1519,7 +1519,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1697,7 +1697,7 @@ "length": 6 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1710,7 +1710,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1813,7 +1813,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1903,7 +1903,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2104,7 +2104,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2314,7 +2314,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2515,7 +2515,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc b/tests/baselines/reference/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc index f87592b41ae05..0d420a476462c 100644 --- a/tests/baselines/reference/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsReExportRightNameWrongSymbol.baseline.jsonc @@ -151,7 +151,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -322,7 +322,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -412,7 +412,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -606,7 +606,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -664,7 +664,7 @@ "length": 19 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -832,7 +832,7 @@ "length": 19 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1000,7 +1000,7 @@ "length": 19 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1194,7 +1194,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1252,7 +1252,7 @@ "length": 19 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsReExportStar.baseline.jsonc b/tests/baselines/reference/findAllRefsReExportStar.baseline.jsonc index d7214a8092c3e..782c388606862 100644 --- a/tests/baselines/reference/findAllRefsReExportStar.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsReExportStar.baseline.jsonc @@ -165,7 +165,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -338,7 +338,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsReExportStarAs.baseline.jsonc b/tests/baselines/reference/findAllRefsReExportStarAs.baseline.jsonc index 5b0c470f74abf..ce2af697cad82 100644 --- a/tests/baselines/reference/findAllRefsReExportStarAs.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsReExportStarAs.baseline.jsonc @@ -288,7 +288,7 @@ "length": 35 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -408,7 +408,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -519,7 +519,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsReExports.baseline.jsonc b/tests/baselines/reference/findAllRefsReExports.baseline.jsonc index bfe953f19400a..11fc8017eb525 100644 --- a/tests/baselines/reference/findAllRefsReExports.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsReExports.baseline.jsonc @@ -204,7 +204,7 @@ "length": 33 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -302,7 +302,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -409,7 +409,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -520,7 +520,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -618,7 +618,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -725,7 +725,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -832,7 +832,7 @@ "length": 38 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1053,7 +1053,7 @@ "length": 33 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1151,7 +1151,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1258,7 +1258,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1369,7 +1369,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1467,7 +1467,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1574,7 +1574,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1681,7 +1681,7 @@ "length": 38 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1902,7 +1902,7 @@ "length": 33 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -2000,7 +2000,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2107,7 +2107,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2218,7 +2218,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -2316,7 +2316,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2423,7 +2423,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2530,7 +2530,7 @@ "length": 38 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2748,7 +2748,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2975,7 +2975,7 @@ "length": 33 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -3193,7 +3193,7 @@ "length": 33 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -3418,7 +3418,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -3516,7 +3516,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3623,7 +3623,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3730,7 +3730,7 @@ "length": 38 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3964,7 +3964,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -4062,7 +4062,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -4169,7 +4169,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -4276,7 +4276,7 @@ "length": 38 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -4503,7 +4503,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -4578,7 +4578,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -4702,7 +4702,7 @@ "length": 33 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -4800,7 +4800,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -4907,7 +4907,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -5018,7 +5018,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -5125,7 +5125,7 @@ "length": 38 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -5355,7 +5355,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -5466,7 +5466,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -5564,7 +5564,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -5671,7 +5671,7 @@ "length": 38 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -5901,7 +5901,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -6012,7 +6012,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -6110,7 +6110,7 @@ "length": 23 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -6217,7 +6217,7 @@ "length": 38 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -6687,7 +6687,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -6753,7 +6753,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -6877,7 +6877,7 @@ "length": 33 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -6975,7 +6975,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -7082,7 +7082,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -7193,7 +7193,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -7300,7 +7300,7 @@ "length": 38 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -7536,7 +7536,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -7602,7 +7602,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -7726,7 +7726,7 @@ "length": 33 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -7824,7 +7824,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -7931,7 +7931,7 @@ "length": 37 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -8042,7 +8042,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -8149,7 +8149,7 @@ "length": 38 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsReExports2.baseline.jsonc b/tests/baselines/reference/findAllRefsReExports2.baseline.jsonc index 39c39a886b0cc..600f16e4ff960 100644 --- a/tests/baselines/reference/findAllRefsReExports2.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsReExports2.baseline.jsonc @@ -178,7 +178,7 @@ "length": 33 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/findAllRefsReExportsUseInImportType.baseline.jsonc b/tests/baselines/reference/findAllRefsReExportsUseInImportType.baseline.jsonc index c275bea6c7df5..0d929793e10cb 100644 --- a/tests/baselines/reference/findAllRefsReExportsUseInImportType.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsReExportsUseInImportType.baseline.jsonc @@ -448,7 +448,7 @@ "length": 15 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -536,7 +536,7 @@ "length": 34 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -604,7 +604,7 @@ "length": 31 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -705,7 +705,7 @@ "length": 34 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -828,7 +828,7 @@ "length": 31 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -841,7 +841,7 @@ "length": 15 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -997,7 +997,7 @@ "length": 31 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1010,7 +1010,7 @@ "length": 15 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1111,7 +1111,7 @@ "length": 31 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1212,7 +1212,7 @@ "length": 34 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsRedeclaredPropertyInDerivedInterface.baseline.jsonc b/tests/baselines/reference/findAllRefsRedeclaredPropertyInDerivedInterface.baseline.jsonc index d9d86139b1435..49bc6b68dc623 100644 --- a/tests/baselines/reference/findAllRefsRedeclaredPropertyInDerivedInterface.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsRedeclaredPropertyInDerivedInterface.baseline.jsonc @@ -108,7 +108,7 @@ "length": 4 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -182,7 +182,7 @@ "length": 19 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -195,7 +195,7 @@ "length": 4 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -298,7 +298,7 @@ "length": 28 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -311,7 +311,7 @@ "length": 4 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -398,7 +398,7 @@ "length": 4 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -501,7 +501,7 @@ "length": 28 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -588,7 +588,7 @@ "length": 19 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -601,7 +601,7 @@ "length": 4 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -704,7 +704,7 @@ "length": 28 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -717,7 +717,7 @@ "length": 4 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -791,7 +791,7 @@ "length": 19 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsRenameImportWithSameName.baseline.jsonc b/tests/baselines/reference/findAllRefsRenameImportWithSameName.baseline.jsonc index d31be8a14b083..f84c9355fb6b7 100644 --- a/tests/baselines/reference/findAllRefsRenameImportWithSameName.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsRenameImportWithSameName.baseline.jsonc @@ -163,7 +163,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -343,7 +343,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsUnionProperty.baseline.jsonc b/tests/baselines/reference/findAllRefsUnionProperty.baseline.jsonc index 3b4a2c67b3edc..a14a9084a21a5 100644 --- a/tests/baselines/reference/findAllRefsUnionProperty.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsUnionProperty.baseline.jsonc @@ -89,7 +89,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -164,7 +164,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -335,7 +335,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -348,7 +348,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -607,7 +607,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -866,7 +866,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -941,7 +941,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1112,7 +1112,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1125,7 +1125,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1371,7 +1371,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1568,7 +1568,7 @@ "length": 7 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1634,7 +1634,7 @@ "length": 12 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } @@ -1718,7 +1718,7 @@ "length": 12 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1731,7 +1731,7 @@ "length": 7 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1881,7 +1881,7 @@ "length": 12 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsWithShorthandPropertyAssignment.baseline.jsonc b/tests/baselines/reference/findAllRefsWithShorthandPropertyAssignment.baseline.jsonc index cdd612e570500..181759aee5d34 100644 --- a/tests/baselines/reference/findAllRefsWithShorthandPropertyAssignment.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsWithShorthandPropertyAssignment.baseline.jsonc @@ -69,7 +69,7 @@ }, "fileName": "/tests/cases/fourslash/findAllRefsWithShorthandPropertyAssignment.ts", "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -155,7 +155,7 @@ }, "fileName": "/tests/cases/fourslash/findAllRefsWithShorthandPropertyAssignment.ts", "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -232,7 +232,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsWithShorthandPropertyAssignment2.baseline.jsonc b/tests/baselines/reference/findAllRefsWithShorthandPropertyAssignment2.baseline.jsonc index bc069428aeb0c..4c04ab2050d47 100644 --- a/tests/baselines/reference/findAllRefsWithShorthandPropertyAssignment2.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsWithShorthandPropertyAssignment2.baseline.jsonc @@ -151,7 +151,7 @@ }, "fileName": "/tests/cases/fourslash/findAllRefsWithShorthandPropertyAssignment2.ts", "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -230,7 +230,7 @@ "length": 14 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findAllRefsWriteAccess.baseline.jsonc b/tests/baselines/reference/findAllRefsWriteAccess.baseline.jsonc new file mode 100644 index 0000000000000..8a77f4e0fe04b --- /dev/null +++ b/tests/baselines/reference/findAllRefsWriteAccess.baseline.jsonc @@ -0,0 +1,161 @@ +// === /tests/cases/fourslash/findAllRefsWriteAccess.ts === +// interface Obj { +// [`/*FIND ALL REFS*/[|num|]`]: number; +// } +// +// let o: Obj = { +// [`[|num|]`]: 0 +// }; +// +// o = { +// ['[|num|]']: 1 +// }; +// +// o['[|num|]'] = 2; +// o[`[|num|]`] = 3; +// +// o['[|num|]']; +// o[`[|num|]`]; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/findAllRefsWriteAccess.ts", + "kind": "property", + "name": "(property) Obj[`num`]: number", + "textSpan": { + "start": 22, + "length": 3 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Obj", + "kind": "interfaceName" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "`num`", + "kind": "propertyName" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 20, + "length": 16 + } + }, + "references": [ + { + "textSpan": { + "start": 22, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsWriteAccess.ts", + "contextSpan": { + "start": 20, + "length": 16 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 61, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsWriteAccess.ts", + "contextSpan": { + "start": 59, + "length": 10 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 86, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsWriteAccess.ts", + "contextSpan": { + "start": 84, + "length": 10 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 102, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsWriteAccess.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 116, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsWriteAccess.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 131, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsWriteAccess.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 141, + "length": 3 + }, + "fileName": "/tests/cases/fourslash/findAllRefsWriteAccess.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/findAllRefs_importType_exportEquals.baseline.jsonc b/tests/baselines/reference/findAllRefs_importType_exportEquals.baseline.jsonc index 45e946921682c..b71b73a700f70 100644 --- a/tests/baselines/reference/findAllRefs_importType_exportEquals.baseline.jsonc +++ b/tests/baselines/reference/findAllRefs_importType_exportEquals.baseline.jsonc @@ -457,7 +457,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -470,7 +470,7 @@ "length": 43 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -643,7 +643,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -656,7 +656,7 @@ "length": 43 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -774,7 +774,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -787,7 +787,7 @@ "length": 43 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/findReferencesJSXTagName.baseline.jsonc b/tests/baselines/reference/findReferencesJSXTagName.baseline.jsonc index d692212cc70c1..d8072720cc700 100644 --- a/tests/baselines/reference/findReferencesJSXTagName.baseline.jsonc +++ b/tests/baselines/reference/findReferencesJSXTagName.baseline.jsonc @@ -239,7 +239,7 @@ "length": 64 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -473,7 +473,7 @@ "length": 51 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/getOccurrencesIsDefinitionOfBindingPattern.baseline.jsonc b/tests/baselines/reference/getOccurrencesIsDefinitionOfBindingPattern.baseline.jsonc index bd522ccb16d92..e2243dd1ff786 100644 --- a/tests/baselines/reference/getOccurrencesIsDefinitionOfBindingPattern.baseline.jsonc +++ b/tests/baselines/reference/getOccurrencesIsDefinitionOfBindingPattern.baseline.jsonc @@ -132,7 +132,7 @@ "length": 4 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -205,7 +205,7 @@ "length": 32 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/getOccurrencesIsDefinitionOfExport.baseline.jsonc b/tests/baselines/reference/getOccurrencesIsDefinitionOfExport.baseline.jsonc index cf91ce97c90b0..6b63823c32d17 100644 --- a/tests/baselines/reference/getOccurrencesIsDefinitionOfExport.baseline.jsonc +++ b/tests/baselines/reference/getOccurrencesIsDefinitionOfExport.baseline.jsonc @@ -150,7 +150,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -326,7 +326,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/indirectJsRequireRename.baseline.jsonc b/tests/baselines/reference/indirectJsRequireRename.baseline.jsonc index 50cf3e98ee76e..120447be10962 100644 --- a/tests/baselines/reference/indirectJsRequireRename.baseline.jsonc +++ b/tests/baselines/reference/indirectJsRequireRename.baseline.jsonc @@ -128,7 +128,7 @@ "length": 66 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/referencesBloomFilters.baseline.jsonc b/tests/baselines/reference/referencesBloomFilters.baseline.jsonc new file mode 100644 index 0000000000000..64293ca758e62 --- /dev/null +++ b/tests/baselines/reference/referencesBloomFilters.baseline.jsonc @@ -0,0 +1,111 @@ +// === /tests/cases/fourslash/redeclaration.ts === +// container = { "[|searchProp|]" : 18 }; + +// === /tests/cases/fourslash/declaration.ts === +// var container = { /*FIND ALL REFS*/[|searchProp|] : 1 }; + +// === /tests/cases/fourslash/stringIndexer.ts === +// function blah2() { container["[|searchProp|]"] }; + +// === /tests/cases/fourslash/expression.ts === +// function blah() { return (1 + 2 + container.[|searchProp|]()) === 2; }; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/declaration.ts", + "kind": "property", + "name": "(property) searchProp: number", + "textSpan": { + "start": 18, + "length": 10 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "searchProp", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 18, + "length": 14 + } + }, + "references": [ + { + "textSpan": { + "start": 18, + "length": 10 + }, + "fileName": "/tests/cases/fourslash/declaration.ts", + "contextSpan": { + "start": 18, + "length": 14 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 44, + "length": 10 + }, + "fileName": "/tests/cases/fourslash/expression.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 30, + "length": 10 + }, + "fileName": "/tests/cases/fourslash/stringIndexer.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 15, + "length": 10 + }, + "fileName": "/tests/cases/fourslash/redeclaration.ts", + "contextSpan": { + "start": 14, + "length": 17 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/referencesBloomFilters2.baseline.jsonc b/tests/baselines/reference/referencesBloomFilters2.baseline.jsonc new file mode 100644 index 0000000000000..21d5d4a50e9d0 --- /dev/null +++ b/tests/baselines/reference/referencesBloomFilters2.baseline.jsonc @@ -0,0 +1,111 @@ +// === /tests/cases/fourslash/redeclaration.ts === +// container = { "[|42|]" : 18 }; + +// === /tests/cases/fourslash/declaration.ts === +// var container = { /*FIND ALL REFS*/[|42|]: 1 }; + +// === /tests/cases/fourslash/stringIndexer.ts === +// function blah2() { container["[|42|]"] }; + +// === /tests/cases/fourslash/expression.ts === +// function blah() { return (container[[|42|]]) === 2; }; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/declaration.ts", + "kind": "property", + "name": "(property) 42: number", + "textSpan": { + "start": 18, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "42", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 18, + "length": 5 + } + }, + "references": [ + { + "textSpan": { + "start": 18, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/declaration.ts", + "contextSpan": { + "start": 18, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 36, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/expression.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 30, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/stringIndexer.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 15, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/redeclaration.ts", + "contextSpan": { + "start": 14, + "length": 9 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/referencesForClassMembers.baseline.jsonc b/tests/baselines/reference/referencesForClassMembers.baseline.jsonc index 2ef7c744172f5..dd4fdbd40e146 100644 --- a/tests/baselines/reference/referencesForClassMembers.baseline.jsonc +++ b/tests/baselines/reference/referencesForClassMembers.baseline.jsonc @@ -157,7 +157,7 @@ "length": 2 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -257,7 +257,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -431,7 +431,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -695,7 +695,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -803,7 +803,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -993,7 +993,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/referencesForClassMembersExtendingAbstractClass.baseline.jsonc b/tests/baselines/reference/referencesForClassMembersExtendingAbstractClass.baseline.jsonc index 1eb8f5a8d89d8..c50c64f55fd27 100644 --- a/tests/baselines/reference/referencesForClassMembersExtendingAbstractClass.baseline.jsonc +++ b/tests/baselines/reference/referencesForClassMembersExtendingAbstractClass.baseline.jsonc @@ -157,7 +157,7 @@ "length": 2 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -257,7 +257,7 @@ "length": 19 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -431,7 +431,7 @@ "length": 19 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -695,7 +695,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -803,7 +803,7 @@ "length": 24 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -993,7 +993,7 @@ "length": 24 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/referencesForClassMembersExtendingGenericClass.baseline.jsonc b/tests/baselines/reference/referencesForClassMembersExtendingGenericClass.baseline.jsonc index 290058af05866..83c498a8df19a 100644 --- a/tests/baselines/reference/referencesForClassMembersExtendingGenericClass.baseline.jsonc +++ b/tests/baselines/reference/referencesForClassMembersExtendingGenericClass.baseline.jsonc @@ -169,7 +169,7 @@ "length": 2 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -281,7 +281,7 @@ "length": 8 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -467,7 +467,7 @@ "length": 8 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -803,7 +803,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -983,7 +983,7 @@ "length": 31 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1245,7 +1245,7 @@ "length": 31 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/referencesForContextuallyTypedObjectLiteralProperties.baseline.jsonc b/tests/baselines/reference/referencesForContextuallyTypedObjectLiteralProperties.baseline.jsonc new file mode 100644 index 0000000000000..60b60e672a3f1 --- /dev/null +++ b/tests/baselines/reference/referencesForContextuallyTypedObjectLiteralProperties.baseline.jsonc @@ -0,0 +1,206 @@ +// === /tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts === +// interface IFoo { /*FIND ALL REFS*/[|xy|]: number; } +// +// // Assignment +// var a1: IFoo = { [|xy|]: 0 }; +// var a2: IFoo = { [|xy|]: 0 }; +// +// // Function call +// function consumer(f: IFoo) { } +// consumer({ [|xy|]: 1 }); +// +// // Type cast +// var c = { [|xy|]: 0 }; +// +// // Array literal +// var ar: IFoo[] = [{ [|xy|]: 1 }, { [|xy|]: 2 }]; +// +// // Nested object literal +// var ob: { ifoo: IFoo } = { ifoo: { [|xy|]: 0 } }; +// +// // Widened type +// var w: IFoo = { [|xy|]: undefined }; +// +// // Untped -- should not be included +// var u = { xy: 0 }; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts", + "kind": "property", + "name": "(property) IFoo.xy: number", + "textSpan": { + "start": 17, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "IFoo", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "xy", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 17, + "length": 11 + } + }, + "references": [ + { + "textSpan": { + "start": 17, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts", + "contextSpan": { + "start": 17, + "length": 11 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 63, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts", + "contextSpan": { + "start": 63, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 89, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts", + "contextSpan": { + "start": 89, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 158, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts", + "contextSpan": { + "start": 158, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 198, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts", + "contextSpan": { + "start": 198, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 245, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts", + "contextSpan": { + "start": 245, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 256, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts", + "contextSpan": { + "start": 256, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 327, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts", + "contextSpan": { + "start": 327, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 371, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts", + "contextSpan": { + "start": 371, + "length": 13 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/referencesForContextuallyTypedUnionProperties.baseline.jsonc b/tests/baselines/reference/referencesForContextuallyTypedUnionProperties.baseline.jsonc index 4e88f9d803311..9c5ff760dd68e 100644 --- a/tests/baselines/reference/referencesForContextuallyTypedUnionProperties.baseline.jsonc +++ b/tests/baselines/reference/referencesForContextuallyTypedUnionProperties.baseline.jsonc @@ -186,7 +186,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -199,7 +199,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -212,7 +212,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -225,7 +225,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -238,7 +238,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -251,7 +251,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -264,7 +264,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -277,7 +277,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -471,7 +471,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -484,7 +484,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -497,7 +497,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -510,7 +510,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -523,7 +523,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -536,7 +536,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -549,7 +549,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -562,7 +562,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -674,7 +674,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -748,7 +748,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -843,7 +843,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -856,7 +856,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -869,7 +869,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -882,7 +882,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -895,7 +895,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -908,7 +908,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -921,7 +921,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1033,7 +1033,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1107,7 +1107,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1189,7 +1189,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1215,7 +1215,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1228,7 +1228,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1241,7 +1241,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1254,7 +1254,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1267,7 +1267,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1280,7 +1280,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1392,7 +1392,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1466,7 +1466,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1548,7 +1548,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1561,7 +1561,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1587,7 +1587,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1600,7 +1600,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1613,7 +1613,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1626,7 +1626,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1639,7 +1639,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1751,7 +1751,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1825,7 +1825,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1907,7 +1907,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1920,7 +1920,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1933,7 +1933,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1959,7 +1959,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1972,7 +1972,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1985,7 +1985,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1998,7 +1998,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2110,7 +2110,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -2184,7 +2184,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -2266,7 +2266,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2279,7 +2279,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2292,7 +2292,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2305,7 +2305,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2331,7 +2331,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2344,7 +2344,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2357,7 +2357,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2469,7 +2469,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -2543,7 +2543,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -2625,7 +2625,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2638,7 +2638,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2651,7 +2651,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2664,7 +2664,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2677,7 +2677,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2703,7 +2703,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2716,7 +2716,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2828,7 +2828,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -2902,7 +2902,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -2984,7 +2984,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2997,7 +2997,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3010,7 +3010,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3023,7 +3023,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3036,7 +3036,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3049,7 +3049,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3075,7 +3075,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -3187,7 +3187,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -3261,7 +3261,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -3343,7 +3343,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3356,7 +3356,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3369,7 +3369,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3382,7 +3382,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3395,7 +3395,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3408,7 +3408,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3421,7 +3421,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/referencesForContextuallyTypedUnionProperties2.baseline.jsonc b/tests/baselines/reference/referencesForContextuallyTypedUnionProperties2.baseline.jsonc new file mode 100644 index 0000000000000..340cd79121f3e --- /dev/null +++ b/tests/baselines/reference/referencesForContextuallyTypedUnionProperties2.baseline.jsonc @@ -0,0 +1,189 @@ +// === /tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts === +// interface A { +// a: number; +// common: string; +// } +// +// interface B { +// /*FIND ALL REFS*/[|b|]: number; +// common: number; +// } +// +// // Assignment +// var v1: A | B = { a: 0, common: "" }; +// var v2: A | B = { [|b|]: 0, common: 3 }; +// +// // Function call +// function consumer(f: A | B) { } +// consumer({ a: 0, [|b|]: 0, common: 1 }); +// +// // Type cast +// var c = { common: 0, [|b|]: 0 }; +// +// // Array literal +// var ar: Array = [{ a: 0, common: "" }, { [|b|]: 0, common: 0 }]; +// +// // Nested object literal +// var ob: { aorb: A|B } = { aorb: { [|b|]: 0, common: 0 } }; +// +// // Widened type +// var w: A|B = { [|b|]:undefined, common: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts", + "kind": "property", + "name": "(property) B.b: number", + "textSpan": { + "start": 70, + "length": 1 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "B", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "b", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 70, + "length": 10 + } + }, + "references": [ + { + "textSpan": { + "start": 70, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts", + "contextSpan": { + "start": 70, + "length": 10 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 174, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts", + "contextSpan": { + "start": 174, + "length": 4 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 261, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts", + "contextSpan": { + "start": 261, + "length": 4 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 324, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts", + "contextSpan": { + "start": 324, + "length": 4 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 396, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts", + "contextSpan": { + "start": 396, + "length": 4 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 476, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts", + "contextSpan": { + "start": 476, + "length": 4 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 529, + "length": 1 + }, + "fileName": "/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts", + "contextSpan": { + "start": 529, + "length": 11 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/referencesForDeclarationKeywords.baseline.jsonc b/tests/baselines/reference/referencesForDeclarationKeywords.baseline.jsonc index 75b22accc0122..fe37f52b5423e 100644 --- a/tests/baselines/reference/referencesForDeclarationKeywords.baseline.jsonc +++ b/tests/baselines/reference/referencesForDeclarationKeywords.baseline.jsonc @@ -132,7 +132,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -220,7 +220,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -329,7 +329,7 @@ undefined "length": 21 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -342,7 +342,7 @@ undefined "length": 11 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -440,7 +440,7 @@ undefined "length": 21 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -453,7 +453,7 @@ undefined "length": 11 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -523,7 +523,7 @@ undefined "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -593,7 +593,7 @@ undefined "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -703,7 +703,7 @@ undefined "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -773,7 +773,7 @@ undefined "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -843,7 +843,7 @@ undefined "length": 15 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -913,7 +913,7 @@ undefined "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1085,7 +1085,7 @@ undefined "length": 6 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } @@ -1167,7 +1167,7 @@ undefined "length": 6 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } @@ -1249,7 +1249,7 @@ undefined "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/referencesForExpressionKeywords.baseline.jsonc b/tests/baselines/reference/referencesForExpressionKeywords.baseline.jsonc index 111f5f2e3be3b..24bcc1f1fe6bc 100644 --- a/tests/baselines/reference/referencesForExpressionKeywords.baseline.jsonc +++ b/tests/baselines/reference/referencesForExpressionKeywords.baseline.jsonc @@ -57,7 +57,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -203,7 +203,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -349,7 +349,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -495,7 +495,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -641,7 +641,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -787,7 +787,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -933,7 +933,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1079,7 +1079,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1253,7 +1253,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/referencesForInheritedProperties.baseline.jsonc b/tests/baselines/reference/referencesForInheritedProperties.baseline.jsonc index 4ab1edbd2a2be..cf1f7261dc264 100644 --- a/tests/baselines/reference/referencesForInheritedProperties.baseline.jsonc +++ b/tests/baselines/reference/referencesForInheritedProperties.baseline.jsonc @@ -181,7 +181,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -263,7 +263,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -379,7 +379,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -543,7 +543,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -659,7 +659,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -741,7 +741,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -939,7 +939,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1021,7 +1021,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/referencesForInheritedProperties2.baseline.jsonc b/tests/baselines/reference/referencesForInheritedProperties2.baseline.jsonc index 079accfe643d4..fb877023de3a3 100644 --- a/tests/baselines/reference/referencesForInheritedProperties2.baseline.jsonc +++ b/tests/baselines/reference/referencesForInheritedProperties2.baseline.jsonc @@ -184,7 +184,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -266,7 +266,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/referencesForInheritedProperties5.baseline.jsonc b/tests/baselines/reference/referencesForInheritedProperties5.baseline.jsonc index 33cdb53c3432f..3a7dc41e44c5f 100644 --- a/tests/baselines/reference/referencesForInheritedProperties5.baseline.jsonc +++ b/tests/baselines/reference/referencesForInheritedProperties5.baseline.jsonc @@ -182,7 +182,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } @@ -356,7 +356,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/referencesForInheritedProperties6.baseline.jsonc b/tests/baselines/reference/referencesForInheritedProperties6.baseline.jsonc index 51653df42e2be..c7524d7b6f6a4 100644 --- a/tests/baselines/reference/referencesForInheritedProperties6.baseline.jsonc +++ b/tests/baselines/reference/referencesForInheritedProperties6.baseline.jsonc @@ -170,7 +170,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/referencesForInheritedProperties7.baseline.jsonc b/tests/baselines/reference/referencesForInheritedProperties7.baseline.jsonc index b75c5e4ce8dc9..a9c70ce5e5975 100644 --- a/tests/baselines/reference/referencesForInheritedProperties7.baseline.jsonc +++ b/tests/baselines/reference/referencesForInheritedProperties7.baseline.jsonc @@ -177,7 +177,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -355,7 +355,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -549,7 +549,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -727,7 +727,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -839,7 +839,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -921,7 +921,7 @@ "length": 16 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1107,7 +1107,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1181,7 +1181,7 @@ "length": 17 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/referencesForInheritedProperties8.baseline.jsonc b/tests/baselines/reference/referencesForInheritedProperties8.baseline.jsonc index 18843bf2611bc..89fc6a2f31314 100644 --- a/tests/baselines/reference/referencesForInheritedProperties8.baseline.jsonc +++ b/tests/baselines/reference/referencesForInheritedProperties8.baseline.jsonc @@ -155,7 +155,7 @@ "length": 14 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/referencesForModifiers.baseline.jsonc b/tests/baselines/reference/referencesForModifiers.baseline.jsonc index 786b3832fc3d9..6838b5a141d02 100644 --- a/tests/baselines/reference/referencesForModifiers.baseline.jsonc +++ b/tests/baselines/reference/referencesForModifiers.baseline.jsonc @@ -54,7 +54,7 @@ "length": 105 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -116,7 +116,7 @@ "length": 105 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -206,7 +206,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -296,7 +296,7 @@ "length": 11 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -386,7 +386,7 @@ "length": 9 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -476,7 +476,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -566,7 +566,7 @@ "length": 10 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -636,7 +636,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -730,7 +730,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -792,7 +792,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/referencesForNumericLiteralPropertyNames.baseline.jsonc b/tests/baselines/reference/referencesForNumericLiteralPropertyNames.baseline.jsonc new file mode 100644 index 0000000000000..6fbde50f0aba8 --- /dev/null +++ b/tests/baselines/reference/referencesForNumericLiteralPropertyNames.baseline.jsonc @@ -0,0 +1,125 @@ +// === /tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts === +// class Foo { +// public /*FIND ALL REFS*/[|12|]: any; +// } +// +// var x: Foo; +// x[[|12|]]; +// x = { "[|12|]": 0 }; +// x = { [|12|]: 0 }; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts", + "kind": "property", + "name": "(property) Foo[12]: any", + "textSpan": { + "start": 23, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Foo", + "kind": "className" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "12", + "kind": "stringLiteral" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 16, + "length": 15 + } + }, + "references": [ + { + "textSpan": { + "start": 23, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts", + "contextSpan": { + "start": 16, + "length": 15 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 49, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 61, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts", + "contextSpan": { + "start": 60, + "length": 7 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 77, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts", + "contextSpan": { + "start": 77, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/referencesForOverrides.baseline.jsonc b/tests/baselines/reference/referencesForOverrides.baseline.jsonc index 13a2ee5a5ca8b..99fc0b42bf450 100644 --- a/tests/baselines/reference/referencesForOverrides.baseline.jsonc +++ b/tests/baselines/reference/referencesForOverrides.baseline.jsonc @@ -251,7 +251,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -519,7 +519,7 @@ "length": 13 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -787,7 +787,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1039,7 +1039,7 @@ "length": 14 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1121,7 +1121,7 @@ "length": 14 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1203,7 +1203,7 @@ "length": 21 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1285,7 +1285,7 @@ "length": 21 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1553,7 +1553,7 @@ "length": 15 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -1643,7 +1643,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/referencesForStatementKeywords.baseline.jsonc b/tests/baselines/reference/referencesForStatementKeywords.baseline.jsonc index 94ab0b5c4a8e3..7f8ebfbc94680 100644 --- a/tests/baselines/reference/referencesForStatementKeywords.baseline.jsonc +++ b/tests/baselines/reference/referencesForStatementKeywords.baseline.jsonc @@ -95,7 +95,7 @@ "length": 26 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -289,7 +289,7 @@ "length": 14 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -399,7 +399,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -445,7 +445,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -555,7 +555,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -601,7 +601,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -747,7 +747,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -822,7 +822,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -897,7 +897,7 @@ "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1078,7 +1078,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1124,7 +1124,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1234,7 +1234,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1280,7 +1280,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1545,7 +1545,7 @@ undefined "length": 40 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1904,7 +1904,7 @@ undefined "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -1979,7 +1979,7 @@ undefined "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2054,7 +2054,7 @@ undefined "length": 30 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2235,7 +2235,7 @@ undefined "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -2281,7 +2281,7 @@ undefined "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2391,7 +2391,7 @@ undefined "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -2437,7 +2437,7 @@ undefined "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2702,7 +2702,7 @@ undefined "length": 40 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2793,7 +2793,7 @@ undefined "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2806,7 +2806,7 @@ undefined "length": 19 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2897,7 +2897,7 @@ undefined "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -2910,7 +2910,7 @@ undefined "length": 19 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -2989,7 +2989,7 @@ undefined "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -3058,7 +3058,7 @@ undefined "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -3140,7 +3140,7 @@ undefined "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/referencesForStringLiteralPropertyNames.baseline.jsonc b/tests/baselines/reference/referencesForStringLiteralPropertyNames.baseline.jsonc new file mode 100644 index 0000000000000..d8721ea9b4038 --- /dev/null +++ b/tests/baselines/reference/referencesForStringLiteralPropertyNames.baseline.jsonc @@ -0,0 +1,135 @@ +// === /tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts === +// class Foo { +// public "/*FIND ALL REFS*/[|ss|]": any; +// } +// +// var x: Foo; +// x.[|ss|]; +// x["[|ss|]"]; +// x = { "[|ss|]": 0 }; +// x = { [|ss|]: 0 }; + +[ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts", + "kind": "property", + "name": "(property) Foo[\"ss\"]: any", + "textSpan": { + "start": 24, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Foo", + "kind": "className" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "\"ss\"", + "kind": "stringLiteral" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 16, + "length": 17 + } + }, + "references": [ + { + "textSpan": { + "start": 24, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts", + "contextSpan": { + "start": 16, + "length": 17 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 51, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 58, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 71, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts", + "contextSpan": { + "start": 70, + "length": 7 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 87, + "length": 2 + }, + "fileName": "/tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts", + "contextSpan": { + "start": 87, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } +] \ No newline at end of file diff --git a/tests/baselines/reference/referencesForStringLiteralPropertyNames7.baseline.jsonc b/tests/baselines/reference/referencesForStringLiteralPropertyNames7.baseline.jsonc index 36a86facf736e..e335f25838ee5 100644 --- a/tests/baselines/reference/referencesForStringLiteralPropertyNames7.baseline.jsonc +++ b/tests/baselines/reference/referencesForStringLiteralPropertyNames7.baseline.jsonc @@ -79,7 +79,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -92,7 +92,7 @@ "length": 19 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -179,7 +179,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -192,7 +192,7 @@ "length": 19 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/referencesForTypeKeywords.baseline.jsonc b/tests/baselines/reference/referencesForTypeKeywords.baseline.jsonc index 57a6ac4774fd2..993430a6c1d55 100644 --- a/tests/baselines/reference/referencesForTypeKeywords.baseline.jsonc +++ b/tests/baselines/reference/referencesForTypeKeywords.baseline.jsonc @@ -50,7 +50,7 @@ "length": 14 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -165,7 +165,7 @@ }, "fileName": "/tests/cases/fourslash/referencesForTypeKeywords.ts", "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -232,7 +232,7 @@ }, "fileName": "/tests/cases/fourslash/referencesForTypeKeywords.ts", "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -298,7 +298,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -392,7 +392,7 @@ }, "fileName": "/tests/cases/fourslash/referencesForTypeKeywords.ts", "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -495,7 +495,7 @@ }, "fileName": "/tests/cases/fourslash/referencesForTypeKeywords.ts", "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/referencesForUnionProperties.baseline.jsonc b/tests/baselines/reference/referencesForUnionProperties.baseline.jsonc index d217060d9d349..3766d8594c3db 100644 --- a/tests/baselines/reference/referencesForUnionProperties.baseline.jsonc +++ b/tests/baselines/reference/referencesForUnionProperties.baseline.jsonc @@ -336,7 +336,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, @@ -580,7 +580,7 @@ "length": 10 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] }, diff --git a/tests/baselines/reference/renameDefaultImport.baseline.jsonc b/tests/baselines/reference/renameDefaultImport.baseline.jsonc index f99f3402750b7..9d1ae7fb20a00 100644 --- a/tests/baselines/reference/renameDefaultImport.baseline.jsonc +++ b/tests/baselines/reference/renameDefaultImport.baseline.jsonc @@ -130,7 +130,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -286,7 +286,7 @@ "length": 45 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/renameDefaultImportDifferentName.baseline.jsonc b/tests/baselines/reference/renameDefaultImportDifferentName.baseline.jsonc index bbbe334953760..7cc5a4f60a07b 100644 --- a/tests/baselines/reference/renameDefaultImportDifferentName.baseline.jsonc +++ b/tests/baselines/reference/renameDefaultImportDifferentName.baseline.jsonc @@ -130,7 +130,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/renameImportAndExportInDiffFiles.baseline.jsonc b/tests/baselines/reference/renameImportAndExportInDiffFiles.baseline.jsonc index 7d9db4a248b0a..b4e57b572a3a4 100644 --- a/tests/baselines/reference/renameImportAndExportInDiffFiles.baseline.jsonc +++ b/tests/baselines/reference/renameImportAndExportInDiffFiles.baseline.jsonc @@ -150,7 +150,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -163,7 +163,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -276,7 +276,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -334,7 +334,7 @@ "length": 13 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } @@ -434,7 +434,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -505,7 +505,7 @@ "length": 13 }, "isWriteAccess": false, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/renameImportOfExportEquals.baseline.jsonc b/tests/baselines/reference/renameImportOfExportEquals.baseline.jsonc index f14d7413e44fa..6f72fd60a831e 100644 --- a/tests/baselines/reference/renameImportOfExportEquals.baseline.jsonc +++ b/tests/baselines/reference/renameImportOfExportEquals.baseline.jsonc @@ -148,7 +148,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -161,7 +161,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -239,7 +239,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -358,7 +358,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -404,7 +404,7 @@ "length": 49 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -495,7 +495,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -688,7 +688,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -701,7 +701,7 @@ "length": 13 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -747,7 +747,7 @@ "length": 49 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/renameImportOfExportEquals2.baseline.jsonc b/tests/baselines/reference/renameImportOfExportEquals2.baseline.jsonc index 3e6f5ea328464..ddc77eecb9b2f 100644 --- a/tests/baselines/reference/renameImportOfExportEquals2.baseline.jsonc +++ b/tests/baselines/reference/renameImportOfExportEquals2.baseline.jsonc @@ -148,7 +148,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -239,7 +239,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -330,7 +330,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -527,7 +527,7 @@ "length": 18 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -618,7 +618,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -815,7 +815,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/renameImportOfReExport.baseline.jsonc b/tests/baselines/reference/renameImportOfReExport.baseline.jsonc index 84aaf12fe3950..25f969066c4d6 100644 --- a/tests/baselines/reference/renameImportOfReExport.baseline.jsonc +++ b/tests/baselines/reference/renameImportOfReExport.baseline.jsonc @@ -131,7 +131,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -209,7 +209,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -279,7 +279,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -435,7 +435,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -624,7 +624,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -670,7 +670,7 @@ "length": 17 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/renameImportOfReExport2.baseline.jsonc b/tests/baselines/reference/renameImportOfReExport2.baseline.jsonc index 61f8f5c83211f..412ef297a15e6 100644 --- a/tests/baselines/reference/renameImportOfReExport2.baseline.jsonc +++ b/tests/baselines/reference/renameImportOfReExport2.baseline.jsonc @@ -144,7 +144,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -222,7 +222,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -402,7 +402,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -591,7 +591,7 @@ "length": 27 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/renameJsExports02.baseline.jsonc b/tests/baselines/reference/renameJsExports02.baseline.jsonc index d0b2d0cc3ef38..8fddd69fe4606 100644 --- a/tests/baselines/reference/renameJsExports02.baseline.jsonc +++ b/tests/baselines/reference/renameJsExports02.baseline.jsonc @@ -141,7 +141,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/renameJsExports03.baseline.jsonc b/tests/baselines/reference/renameJsExports03.baseline.jsonc index f74f1eae0e356..641624ea168da 100644 --- a/tests/baselines/reference/renameJsExports03.baseline.jsonc +++ b/tests/baselines/reference/renameJsExports03.baseline.jsonc @@ -142,7 +142,7 @@ "length": 25 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/transitiveExportImports.baseline.jsonc b/tests/baselines/reference/transitiveExportImports.baseline.jsonc index 77b6c0a859cc0..c50f7315edf51 100644 --- a/tests/baselines/reference/transitiveExportImports.baseline.jsonc +++ b/tests/baselines/reference/transitiveExportImports.baseline.jsonc @@ -172,7 +172,7 @@ "length": 33 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/transitiveExportImports2.baseline.jsonc b/tests/baselines/reference/transitiveExportImports2.baseline.jsonc index c0723784c3eaa..1c2aae6bbe7b4 100644 --- a/tests/baselines/reference/transitiveExportImports2.baseline.jsonc +++ b/tests/baselines/reference/transitiveExportImports2.baseline.jsonc @@ -156,7 +156,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -243,7 +243,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -434,7 +434,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -616,7 +616,7 @@ "length": 20 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { diff --git a/tests/baselines/reference/transitiveExportImports3.baseline.jsonc b/tests/baselines/reference/transitiveExportImports3.baseline.jsonc index e8d4e19a1be4d..25a2e20aa6288 100644 --- a/tests/baselines/reference/transitiveExportImports3.baseline.jsonc +++ b/tests/baselines/reference/transitiveExportImports3.baseline.jsonc @@ -180,7 +180,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -278,7 +278,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -376,7 +376,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -580,7 +580,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -784,7 +784,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } @@ -959,7 +959,7 @@ "length": 22 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -1070,7 +1070,7 @@ "length": 29 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] }, @@ -1168,7 +1168,7 @@ "length": 24 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js index 5901780c9dffa..97452f09da4bd 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js @@ -119,4 +119,4 @@ Open files: response:{"responseRequired":false} request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 2000 undefined WatchType: Missing source map file -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js index 258b6b79e8859..14506aa873cf1 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js @@ -123,4 +123,4 @@ Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js index a6859ae240db6..9675f9aceb516 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js @@ -121,4 +121,4 @@ Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js index a6859ae240db6..9675f9aceb516 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js @@ -121,4 +121,4 @@ Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js index 37cc377662500..d240cf5f50f5b 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js @@ -119,4 +119,4 @@ Open files: response:{"responseRequired":false} request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 2000 undefined WatchType: Missing source map file -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js index 4d90499268b05..86197a4a62841 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js @@ -123,4 +123,4 @@ Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js index 3ed70fa177f0a..7dfe811088ca2 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js @@ -121,4 +121,4 @@ Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js index 3ed70fa177f0a..7dfe811088ca2 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js @@ -121,4 +121,4 @@ Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js index 370807fd8fa88..9802936b4f05e 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js @@ -73,4 +73,4 @@ Open files: response:{"responseRequired":false} request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 2000 undefined WatchType: Missing source map file -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js index 1aa92560056ef..0a3f5852f993a 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js @@ -78,4 +78,4 @@ Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js index 12f42d1d33f8d..9ded214384a27 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js @@ -76,4 +76,4 @@ Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js index 12f42d1d33f8d..9ded214384a27 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js @@ -76,4 +76,4 @@ Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js index 288f1a102d7d8..e0558ac23e961 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js @@ -73,4 +73,4 @@ Open files: response:{"responseRequired":false} request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 2000 undefined WatchType: Missing source map file -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js index 408f8b2a90783..518b4d0347f4f 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js @@ -105,4 +105,4 @@ Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) ----------------------------------------------- Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js index c35c1351dd813..36260b89369b9 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js @@ -103,4 +103,4 @@ Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) ----------------------------------------------- Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js index c35c1351dd813..36260b89369b9 100644 --- a/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js +++ b/tests/baselines/reference/tsserver/projectReferences/find-refs-to-decl-in-other-proj-when-proj-is-not-loaded-and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js @@ -103,4 +103,4 @@ Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) ----------------------------------------------- Search path: /user/username/projects/myproject/b For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/finding-local-reference-doesnt-load-ancestor/sibling-projects.js b/tests/baselines/reference/tsserver/projectReferences/finding-local-reference-doesnt-load-ancestor/sibling-projects.js index b3b922c4b2c3b..c61e2337a44ee 100644 --- a/tests/baselines/reference/tsserver/projectReferences/finding-local-reference-doesnt-load-ancestor/sibling-projects.js +++ b/tests/baselines/reference/tsserver/projectReferences/finding-local-reference-doesnt-load-ancestor/sibling-projects.js @@ -129,4 +129,4 @@ Project '/user/username/projects/solution/services/tsconfig.json' (Configured) FileWatcher:: Added:: WatchInfo: /user/username/projects/solution/compiler/types.d.ts 2000 undefined Project: /user/username/projects/solution/compiler/tsconfig.json WatchType: Missing generated file Search path: /user/username/projects/solution/compiler For info: /user/username/projects/solution/compiler/types.ts :: Config file name: /user/username/projects/solution/compiler/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/solution/compiler/types.ts","start":{"line":4,"offset":25},"end":{"line":4,"offset":39},"contextStart":{"line":4,"offset":25},"contextEnd":{"line":4,"offset":52},"lineText":" getSourceFiles(): string[];","isWriteAccess":false,"isDefinition":true},{"file":"/user/username/projects/solution/compiler/program.ts","start":{"line":4,"offset":25},"end":{"line":4,"offset":39},"contextStart":{"line":4,"offset":25},"contextEnd":{"line":4,"offset":64},"lineText":" getSourceFiles: () => [getSourceFile()]","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/solution/services/services.ts","start":{"line":3,"offset":44},"end":{"line":3,"offset":58},"lineText":" const result = program.getSourceFiles();","isWriteAccess":false,"isDefinition":false}],"symbolName":"getSourceFiles","symbolStartOffset":25,"symbolDisplayString":"(method) ts.Program.getSourceFiles(): string[]"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/solution/compiler/types.ts","start":{"line":4,"offset":25},"end":{"line":4,"offset":39},"contextStart":{"line":4,"offset":25},"contextEnd":{"line":4,"offset":52},"lineText":" getSourceFiles(): string[];","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/solution/compiler/program.ts","start":{"line":4,"offset":25},"end":{"line":4,"offset":39},"contextStart":{"line":4,"offset":25},"contextEnd":{"line":4,"offset":64},"lineText":" getSourceFiles: () => [getSourceFile()]","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/solution/services/services.ts","start":{"line":3,"offset":44},"end":{"line":3,"offset":58},"lineText":" const result = program.getSourceFiles();","isWriteAccess":false,"isDefinition":false}],"symbolName":"getSourceFiles","symbolStartOffset":25,"symbolDisplayString":"(method) ts.Program.getSourceFiles(): string[]"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/project-is-directly-referenced-by-solution.js b/tests/baselines/reference/tsserver/projectReferences/project-is-directly-referenced-by-solution.js index 0491fc90397c8..ef3ad923ca34f 100644 --- a/tests/baselines/reference/tsserver/projectReferences/project-is-directly-referenced-by-solution.js +++ b/tests/baselines/reference/tsserver/projectReferences/project-is-directly-referenced-by-solution.js @@ -470,7 +470,7 @@ Open files: request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/src/main.ts","line":2,"offset":10},"seq":2,"type":"request"} FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/target/src/helpers/functions.d.ts 500 undefined WatchType: Closed Script info FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/target/src/helpers/functions.d.ts.map 500 undefined WatchType: Closed Script info -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":true}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nexport foo"},"responseRequired":true} +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nexport foo"},"responseRequired":true} FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Project '/user/username/projects/myproject/tsconfig.json' (Configured) Files (0) @@ -686,4 +686,4 @@ Search path: /user/username/projects/myproject/src/helpers For info: /user/username/projects/myproject/src/helpers/functions.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Search path: /user/username/projects/myproject/src/helpers For info: /user/username/projects/myproject/src/helpers/functions.ts :: Config file name: /user/username/projects/myproject/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":true}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nimport foo"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nimport foo"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/project-is-indirectly-referenced-by-solution.js b/tests/baselines/reference/tsserver/projectReferences/project-is-indirectly-referenced-by-solution.js index 1fc3aca66dd00..4b739c46d7b7a 100644 --- a/tests/baselines/reference/tsserver/projectReferences/project-is-indirectly-referenced-by-solution.js +++ b/tests/baselines/reference/tsserver/projectReferences/project-is-indirectly-referenced-by-solution.js @@ -660,7 +660,7 @@ Search path: /user/username/projects/myproject/src/helpers For info: /user/username/projects/myproject/src/helpers/functions.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Search path: /user/username/projects/myproject/src For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nexport foo"},"responseRequired":true} +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nexport foo"},"responseRequired":true} FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Project '/user/username/projects/myproject/tsconfig.json' (Configured) Files (0) @@ -1050,4 +1050,4 @@ Search path: /user/username/projects/myproject/src/helpers For info: /user/username/projects/myproject/src/helpers/functions.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Search path: /user/username/projects/myproject/src For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nimport foo"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nimport foo"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/root-file-is-file-from-referenced-project-and-using-declaration-maps.js b/tests/baselines/reference/tsserver/projectReferences/root-file-is-file-from-referenced-project-and-using-declaration-maps.js index 0730f12780e09..a7911b68fa173 100644 --- a/tests/baselines/reference/tsserver/projectReferences/root-file-is-file-from-referenced-project-and-using-declaration-maps.js +++ b/tests/baselines/reference/tsserver/projectReferences/root-file-is-file-from-referenced-project-and-using-declaration-maps.js @@ -150,4 +150,4 @@ Search path: /user/username/projects/project/src/common/input For info: /user/username/projects/project/src/common/input/keyboard.ts :: Config file name: /user/username/projects/project/src/common/tsconfig.json Search path: /user/username/projects/project/src/common/input For info: /user/username/projects/project/src/common/input/keyboard.ts :: Config file name: /user/username/projects/project/src/common/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/project/src/common/input/keyboard.ts","start":{"line":2,"offset":17},"end":{"line":2,"offset":38},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":44},"lineText":"export function evaluateKeyboardEvent() { }","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/project/src/common/input/keyboard.test.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":31},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":63},"lineText":"import { evaluateKeyboardEvent } from 'common/input/keyboard';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/project/src/common/input/keyboard.test.ts","start":{"line":3,"offset":12},"end":{"line":3,"offset":33},"lineText":" return evaluateKeyboardEvent();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/project/src/terminal.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":31},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":63},"lineText":"import { evaluateKeyboardEvent } from 'common/input/keyboard';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/project/src/terminal.ts","start":{"line":3,"offset":12},"end":{"line":3,"offset":33},"lineText":" return evaluateKeyboardEvent();","isWriteAccess":false,"isDefinition":false}],"symbolName":"evaluateKeyboardEvent","symbolStartOffset":17,"symbolDisplayString":"function evaluateKeyboardEvent(): void"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/project/src/common/input/keyboard.ts","start":{"line":2,"offset":17},"end":{"line":2,"offset":38},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":44},"lineText":"export function evaluateKeyboardEvent() { }","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/project/src/common/input/keyboard.test.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":31},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":63},"lineText":"import { evaluateKeyboardEvent } from 'common/input/keyboard';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/project/src/common/input/keyboard.test.ts","start":{"line":3,"offset":12},"end":{"line":3,"offset":33},"lineText":" return evaluateKeyboardEvent();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/project/src/terminal.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":31},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":63},"lineText":"import { evaluateKeyboardEvent } from 'common/input/keyboard';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/project/src/terminal.ts","start":{"line":3,"offset":12},"end":{"line":3,"offset":33},"lineText":" return evaluateKeyboardEvent();","isWriteAccess":false,"isDefinition":false}],"symbolName":"evaluateKeyboardEvent","symbolStartOffset":17,"symbolDisplayString":"function evaluateKeyboardEvent(): void"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/root-file-is-file-from-referenced-project.js b/tests/baselines/reference/tsserver/projectReferences/root-file-is-file-from-referenced-project.js index 6c9ab0042f3ae..4d465989862f8 100644 --- a/tests/baselines/reference/tsserver/projectReferences/root-file-is-file-from-referenced-project.js +++ b/tests/baselines/reference/tsserver/projectReferences/root-file-is-file-from-referenced-project.js @@ -147,4 +147,4 @@ Search path: /user/username/projects/project/src/common/input For info: /user/username/projects/project/src/common/input/keyboard.ts :: Config file name: /user/username/projects/project/src/common/tsconfig.json Search path: /user/username/projects/project/src/common/input For info: /user/username/projects/project/src/common/input/keyboard.test.ts :: Config file name: /user/username/projects/project/src/common/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/project/src/common/input/keyboard.ts","start":{"line":2,"offset":17},"end":{"line":2,"offset":38},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":44},"lineText":"export function evaluateKeyboardEvent() { }","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/project/src/common/input/keyboard.test.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":31},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":63},"lineText":"import { evaluateKeyboardEvent } from 'common/input/keyboard';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/project/src/common/input/keyboard.test.ts","start":{"line":3,"offset":12},"end":{"line":3,"offset":33},"lineText":" return evaluateKeyboardEvent();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/project/src/terminal.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":31},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":63},"lineText":"import { evaluateKeyboardEvent } from 'common/input/keyboard';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/project/src/terminal.ts","start":{"line":3,"offset":12},"end":{"line":3,"offset":33},"lineText":" return evaluateKeyboardEvent();","isWriteAccess":false,"isDefinition":false}],"symbolName":"evaluateKeyboardEvent","symbolStartOffset":17,"symbolDisplayString":"function evaluateKeyboardEvent(): void"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/project/src/common/input/keyboard.ts","start":{"line":2,"offset":17},"end":{"line":2,"offset":38},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":44},"lineText":"export function evaluateKeyboardEvent() { }","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/project/src/common/input/keyboard.test.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":31},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":63},"lineText":"import { evaluateKeyboardEvent } from 'common/input/keyboard';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/project/src/common/input/keyboard.test.ts","start":{"line":3,"offset":12},"end":{"line":3,"offset":33},"lineText":" return evaluateKeyboardEvent();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/project/src/terminal.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":31},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":63},"lineText":"import { evaluateKeyboardEvent } from 'common/input/keyboard';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/project/src/terminal.ts","start":{"line":3,"offset":12},"end":{"line":3,"offset":33},"lineText":" return evaluateKeyboardEvent();","isWriteAccess":false,"isDefinition":false}],"symbolName":"evaluateKeyboardEvent","symbolStartOffset":17,"symbolDisplayString":"function evaluateKeyboardEvent(): void"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-found-is-not-solution-but-references-open-file-through-project-reference.js b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-found-is-not-solution-but-references-open-file-through-project-reference.js index 5e41243f1dbdc..664a2cd86d378 100644 --- a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-found-is-not-solution-but-references-open-file-through-project-reference.js +++ b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-found-is-not-solution-but-references-open-file-through-project-reference.js @@ -545,7 +545,7 @@ Search path: /user/username/projects/myproject/src/helpers For info: /user/username/projects/myproject/src/helpers/functions.ts :: Config file name: /user/username/projects/myproject/tsconfig.json FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/target/src/helpers/functions.d.ts 500 undefined WatchType: Closed Script info FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/target/src/helpers/functions.d.ts.map 500 undefined WatchType: Closed Script info -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/own/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/own/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nexport foo"},"responseRequired":true} +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/own/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/own/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nexport foo"},"responseRequired":true} FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Project '/user/username/projects/myproject/tsconfig.json' (Configured) Files (4) @@ -800,4 +800,4 @@ Search path: /user/username/projects/myproject/src For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Search path: /user/username/projects/myproject/src/helpers For info: /user/username/projects/myproject/src/helpers/functions.ts :: Config file name: /user/username/projects/myproject/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/own/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/own/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nimport foo"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/own/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/own/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nimport foo"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-is-indirectly-referenced-by-solution.js b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-is-indirectly-referenced-by-solution.js index ae073122bf4a7..19738d8114ced 100644 --- a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-is-indirectly-referenced-by-solution.js +++ b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-is-indirectly-referenced-by-solution.js @@ -758,7 +758,7 @@ Search path: /user/username/projects/myproject/src For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Search path: /user/username/projects/myproject/src/helpers For info: /user/username/projects/myproject/src/helpers/functions.ts :: Config file name: /user/username/projects/myproject/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nexport foo"},"responseRequired":true} +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nexport foo"},"responseRequired":true} FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Project '/user/username/projects/myproject/tsconfig.json' (Configured) Files (5) @@ -1195,4 +1195,4 @@ Search path: /user/username/projects/myproject/src/helpers For info: /user/username/projects/myproject/src/helpers/functions.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Search path: /user/username/projects/myproject/indirect1 For info: /user/username/projects/myproject/indirect1/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json -response:{"response":{"refs":[{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nimport foo"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect3/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":41},"lineText":"import { foo } from 'helpers/functions';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/src/main.ts","start":{"line":2,"offset":10},"end":{"line":2,"offset":13},"contextStart":{"line":2,"offset":1},"contextEnd":{"line":2,"offset":16},"lineText":"export { foo };","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/src/helpers/functions.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":17},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":22},"lineText":"export const foo = 1;","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect1/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":13},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":28},"lineText":"import { foo } from 'main';","isWriteAccess":true,"isDefinition":false},{"file":"/user/username/projects/myproject/indirect2/main.ts","start":{"line":2,"offset":1},"end":{"line":2,"offset":4},"lineText":"foo;","isWriteAccess":false,"isDefinition":false}],"symbolName":"foo","symbolStartOffset":10,"symbolDisplayString":"(alias) const foo: 1\nimport foo"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/with-disableSolutionSearching-solution-and-siblings-are-not-loaded.js b/tests/baselines/reference/tsserver/projectReferences/with-disableSolutionSearching-solution-and-siblings-are-not-loaded.js index af244659e889f..edcecf983129c 100644 --- a/tests/baselines/reference/tsserver/projectReferences/with-disableSolutionSearching-solution-and-siblings-are-not-loaded.js +++ b/tests/baselines/reference/tsserver/projectReferences/with-disableSolutionSearching-solution-and-siblings-are-not-loaded.js @@ -49,4 +49,4 @@ Open files: Projects: /user/username/projects/solution/compiler/tsconfig.json response:{"responseRequired":false} request:{"command":"references","arguments":{"file":"/user/username/projects/solution/compiler/program.ts","line":4,"offset":25},"seq":1,"type":"request"} -response:{"response":{"refs":[{"file":"/user/username/projects/solution/compiler/types.ts","start":{"line":4,"offset":25},"end":{"line":4,"offset":39},"contextStart":{"line":4,"offset":25},"contextEnd":{"line":4,"offset":52},"lineText":" getSourceFiles(): string[];","isWriteAccess":false,"isDefinition":true},{"file":"/user/username/projects/solution/compiler/program.ts","start":{"line":4,"offset":25},"end":{"line":4,"offset":39},"contextStart":{"line":4,"offset":25},"contextEnd":{"line":4,"offset":64},"lineText":" getSourceFiles: () => [getSourceFile()]","isWriteAccess":true,"isDefinition":true}],"symbolName":"getSourceFiles","symbolStartOffset":25,"symbolDisplayString":"(method) ts.Program.getSourceFiles(): string[]"},"responseRequired":true} \ No newline at end of file +response:{"response":{"refs":[{"file":"/user/username/projects/solution/compiler/types.ts","start":{"line":4,"offset":25},"end":{"line":4,"offset":39},"contextStart":{"line":4,"offset":25},"contextEnd":{"line":4,"offset":52},"lineText":" getSourceFiles(): string[];","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/solution/compiler/program.ts","start":{"line":4,"offset":25},"end":{"line":4,"offset":39},"contextStart":{"line":4,"offset":25},"contextEnd":{"line":4,"offset":64},"lineText":" getSourceFiles: () => [getSourceFile()]","isWriteAccess":true,"isDefinition":true}],"symbolName":"getSourceFiles","symbolStartOffset":25,"symbolDisplayString":"(method) ts.Program.getSourceFiles(): string[]"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsxFindAllReferences10.baseline.jsonc b/tests/baselines/reference/tsxFindAllReferences10.baseline.jsonc index 618dbe42e1971..5b17c5f3f0b9e 100644 --- a/tests/baselines/reference/tsxFindAllReferences10.baseline.jsonc +++ b/tests/baselines/reference/tsxFindAllReferences10.baseline.jsonc @@ -137,7 +137,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -150,7 +150,7 @@ "length": 16 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/tsxFindAllReferences2.baseline.jsonc b/tests/baselines/reference/tsxFindAllReferences2.baseline.jsonc index a5c6ede293346..d11b669806d1e 100644 --- a/tests/baselines/reference/tsxFindAllReferences2.baseline.jsonc +++ b/tests/baselines/reference/tsxFindAllReferences2.baseline.jsonc @@ -91,7 +91,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/tsxFindAllReferences3.baseline.jsonc b/tests/baselines/reference/tsxFindAllReferences3.baseline.jsonc index 398d4094c88b9..6d1dd82fad127 100644 --- a/tests/baselines/reference/tsxFindAllReferences3.baseline.jsonc +++ b/tests/baselines/reference/tsxFindAllReferences3.baseline.jsonc @@ -94,7 +94,7 @@ "length": 12 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/tsxFindAllReferences7.baseline.jsonc b/tests/baselines/reference/tsxFindAllReferences7.baseline.jsonc index ffdaba983cb0d..6c4d570088d53 100644 --- a/tests/baselines/reference/tsxFindAllReferences7.baseline.jsonc +++ b/tests/baselines/reference/tsxFindAllReferences7.baseline.jsonc @@ -100,7 +100,7 @@ "length": 11 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -113,7 +113,7 @@ "length": 11 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/baselines/reference/tsxFindAllReferences9.baseline.jsonc b/tests/baselines/reference/tsxFindAllReferences9.baseline.jsonc index 7b486c7933afd..af91e657757ea 100644 --- a/tests/baselines/reference/tsxFindAllReferences9.baseline.jsonc +++ b/tests/baselines/reference/tsxFindAllReferences9.baseline.jsonc @@ -110,7 +110,7 @@ "length": 11 }, "isWriteAccess": true, - "isDefinition": true + "isDefinition": false }, { "textSpan": { @@ -119,7 +119,7 @@ }, "fileName": "/tests/cases/fourslash/file.tsx", "isWriteAccess": true, - "isDefinition": true + "isDefinition": false } ] } diff --git a/tests/cases/fourslash/findAllReferencesUmdModuleAsGlobalConst.ts b/tests/cases/fourslash/findAllReferencesUmdModuleAsGlobalConst.ts index 3198a4f027326..e8da058671715 100644 --- a/tests/cases/fourslash/findAllReferencesUmdModuleAsGlobalConst.ts +++ b/tests/cases/fourslash/findAllReferencesUmdModuleAsGlobalConst.ts @@ -9,17 +9,17 @@ // @Filename: /node_modules/@types/three/index.d.ts ////export * from "./three-core"; -////[|export as namespace [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}THREE|];|] +////export as namespace /*0*/THREE; // @Filename: /typings/global.d.ts -////[|import * as _THREE from '[|{| "contextRangeIndex": 2 |}three|]';|] +////import * as _THREE from '/*1*/three'; ////declare global { -//// [|const [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}THREE|]: typeof _THREE;|] +//// const /*2*/THREE: typeof _THREE; ////} // @Filename: /src/index.ts ////export const a = {}; -////let v = new [|THREE|].Vector2(); +////let v = new /*3*/THREE.Vector2(); // @Filename: /tsconfig.json ////{ @@ -38,6 +38,4 @@ //// "files": ["/src/index.ts", "typings/global.d.ts"] ////} -const [r0Def, r0, r1Def, r1, r2Def, ...rest] = test.ranges(); -verify.singleReferenceGroup(`module THREE -var THREE: typeof import("/node_modules/@types/three/index")`, [r0, r1, ...rest]); \ No newline at end of file +verify.baselineFindAllReferences('0', '1', '2') diff --git a/tests/cases/fourslash/findAllRefsForMappedType.ts b/tests/cases/fourslash/findAllRefsForMappedType.ts index 5c6aa30b3bb29..716ed84ce959c 100644 --- a/tests/cases/fourslash/findAllRefsForMappedType.ts +++ b/tests/cases/fourslash/findAllRefsForMappedType.ts @@ -1,9 +1,9 @@ /// -////interface T { [|[|{| "isDefinition": true, "contextRangeIndex": 0 |}a|]: number|] }; +////interface T { /*1*/a: number }; ////type U = { [K in keyof T]: string }; ////type V = { [K in keyof U]: boolean }; -////const u: U = { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}a|]: ""|] } -////const v: V = { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}a|]: true|] } +////const u: U = { a: "" } +////const v: V = { a: true } -verify.singleReferenceGroup("(property) T.a: number", "a"); +verify.baselineFindAllReferences('1') diff --git a/tests/cases/fourslash/findAllRefsForModuleGlobal.ts b/tests/cases/fourslash/findAllRefsForModuleGlobal.ts index 1ad69e018561e..69ad98c7e3fe2 100644 --- a/tests/cases/fourslash/findAllRefsForModuleGlobal.ts +++ b/tests/cases/fourslash/findAllRefsForModuleGlobal.ts @@ -4,9 +4,9 @@ ////export const x = 0; // @Filename: /b.ts -/////// -////[|import { x } from "[|{| "contextRangeIndex": 1 |}foo|]";|] -////[|declare module "[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 3 |}foo|]" {}|] +/////// +////import { x } from "/*1*/foo"; +////declare module "foo" {} verify.noErrors(); -verify.singleReferenceGroup('module "/node_modules/foo/index"', "foo"); +verify.baselineFindAllReferences('1') diff --git a/tests/cases/fourslash/findAllRefsIsDefinition.ts b/tests/cases/fourslash/findAllRefsIsDefinition.ts new file mode 100644 index 0000000000000..2553fde263d2a --- /dev/null +++ b/tests/cases/fourslash/findAllRefsIsDefinition.ts @@ -0,0 +1,29 @@ +// from #42889 +/// +//// declare function foo(a: number): number; +//// declare function foo(a: string): string; +//// declare function foo/*1*/(a: string | number): string | number; +//// +//// function foon(a: number): number; +//// function foon(a: string): string; +//// function foon/*2*/(a: string | number): string | number { +//// return a +//// } +//// +//// foo; foon; +//// +//// export const bar/*3*/ = 123; +//// console.log({ bar }); +//// +//// interface IFoo { +//// foo/*4*/(): void; +//// } +//// class Foo implements IFoo { +//// constructor(n: number) +//// constructor() +//// /*5*/constructor(n: number?) { } +//// foo/*6*/(): void { } +//// static init() { return new this() } +//// } + +verify.baselineFindAllReferences('1', '2', '3', '4', '5', '6') diff --git a/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName07.ts b/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName07.ts index 6fa268a2b7bed..320d6882a8d97 100644 --- a/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName07.ts +++ b/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName07.ts @@ -2,6 +2,6 @@ ////let p, b; //// -////p, [|[{ [|{| "isDefinition": true, "contextRangeIndex": 0 |}a|]: p, b }] = [{ [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}a|]: 10|], b: true }]|]; +////p, [{ /*1*/a: p, b }] = [{ a: 10, b: true }]; -verify.singleReferenceGroup("(property) a: any", "a"); +verify.baselineFindAllReferences('1') diff --git a/tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts b/tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts index 22c69a1616f23..c4b378163db14 100644 --- a/tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts +++ b/tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts @@ -1,20 +1,20 @@ /// ////interface IFoo { -//// [|[|{| "isDefinition": true, "contextRangeIndex": 0 |}a|]: string;|] +//// /*1*/a: string; ////} ////class C { //// method() { //// var x: T = { -//// [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}a|]: ""|] +//// a: "" //// }; -//// x.[|a|]; +//// x.a; //// } ////} //// //// ////var x: IFoo = { -//// [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 5 |}a|]: "ss"|] +//// a: "ss" ////}; -verify.singleReferenceGroup("(property) IFoo.a: string", "a"); +verify.baselineFindAllReferences('1') diff --git a/tests/cases/fourslash/findAllRefsWriteAccess.ts b/tests/cases/fourslash/findAllRefsWriteAccess.ts index 550938a7c0f55..58530bf81eeff 100644 --- a/tests/cases/fourslash/findAllRefsWriteAccess.ts +++ b/tests/cases/fourslash/findAllRefsWriteAccess.ts @@ -1,21 +1,21 @@ /// ////interface Obj { -//// [|[`[|{| "isDefinition": true, "contextRangeIndex": 0 |}num|]`]: number;|] +//// [`/*1*/num`]: number; ////} //// ////let o: Obj = { -//// [|[`[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}num|]`]: 0|] +//// [`num`]: 0 ////}; //// ////o = { -//// [|['[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}num|]']: 1|] +//// ['num']: 1 ////}; //// -////o['[|num|]'] = 2; -////o[`[|num|]`] = 3; +////o['num'] = 2; +////o[`num`] = 3; //// -////o['[|num|]']; -////o[`[|num|]`]; +////o['num']; +////o[`num`]; -verify.singleReferenceGroup("(property) Obj[`num`]: number", "num"); +verify.baselineFindAllReferences('1') diff --git a/tests/cases/fourslash/referencesBloomFilters.ts b/tests/cases/fourslash/referencesBloomFilters.ts index c71ec7533c6ab..6996b237d5c0e 100644 --- a/tests/cases/fourslash/referencesBloomFilters.ts +++ b/tests/cases/fourslash/referencesBloomFilters.ts @@ -3,15 +3,15 @@ // Ensure BloomFilter building logic is correct, by having one reference per file // @Filename: declaration.ts -////var container = { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}searchProp|] : 1|] }; +////var container = { /*1*/searchProp : 1 }; // @Filename: expression.ts -////function blah() { return (1 + 2 + container.[|searchProp|]()) === 2; }; +////function blah() { return (1 + 2 + container.searchProp()) === 2; }; // @Filename: stringIndexer.ts -////function blah2() { container["[|searchProp|]"] }; +////function blah2() { container["searchProp"] }; // @Filename: redeclaration.ts -////container = { [|"[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}searchProp|]" : 18|] }; +////container = { "searchProp" : 18 }; -verify.singleReferenceGroup("(property) searchProp: number", "searchProp"); +verify.baselineFindAllReferences('1') diff --git a/tests/cases/fourslash/referencesBloomFilters2.ts b/tests/cases/fourslash/referencesBloomFilters2.ts index ee74343c462c6..43606be21597f 100644 --- a/tests/cases/fourslash/referencesBloomFilters2.ts +++ b/tests/cases/fourslash/referencesBloomFilters2.ts @@ -3,15 +3,15 @@ // Ensure BloomFilter building logic is correct, by having one reference per file // @Filename: declaration.ts -////var container = { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}42|]: 1|] }; +////var container = { /*1*/42: 1 }; // @Filename: expression.ts -////function blah() { return (container[[|42|]]) === 2; }; +////function blah() { return (container[42]) === 2; }; // @Filename: stringIndexer.ts -////function blah2() { container["[|42|]"] }; +////function blah2() { container["42"] }; // @Filename: redeclaration.ts -////container = { [|"[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}42|]" : 18|] }; +////container = { "42" : 18 }; -verify.singleReferenceGroup("(property) 42: number", "42"); +verify.baselineFindAllReferences('1') diff --git a/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts b/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts index 4cd843926902d..b700d9327be75 100644 --- a/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts +++ b/tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts @@ -1,28 +1,28 @@ /// -////interface IFoo { [|[|{| "isDefinition": true, "contextRangeIndex": 0 |}xy|]: number;|] } +////interface IFoo { /*xy*/xy: number; } //// ////// Assignment -////var a1: IFoo = { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}xy|]: 0|] }; -////var a2: IFoo = { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}xy|]: 0|] }; +////var a1: IFoo = { xy: 0 }; +////var a2: IFoo = { xy: 0 }; //// ////// Function call ////function consumer(f: IFoo) { } -////consumer({ [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 6 |}xy|]: 1|] }); +////consumer({ xy: 1 }); //// ////// Type cast -////var c = { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 8 |}xy|]: 0|] }; +////var c = { xy: 0 }; //// ////// Array literal -////var ar: IFoo[] = [{ [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 10 |}xy|]: 1|] }, { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 12 |}xy|]: 2|] }]; +////var ar: IFoo[] = [{ xy: 1 }, { xy: 2 }]; //// ////// Nested object literal -////var ob: { ifoo: IFoo } = { ifoo: { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 14 |}xy|]: 0|] } }; +////var ob: { ifoo: IFoo } = { ifoo: { xy: 0 } }; //// ////// Widened type -////var w: IFoo = { [|[|{| "isWriteAccess": true, "isDefinition": true, "type": "undefined", "contextRangeIndex": 16 |}xy|]: undefined|] }; +////var w: IFoo = { xy: undefined }; //// ////// Untped -- should not be included ////var u = { xy: 0 }; -verify.singleReferenceGroup("(property) IFoo.xy: number", "xy"); +verify.baselineFindAllReferences('xy') diff --git a/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts b/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts index 22e5da052b0d5..fdbac65d93326 100644 --- a/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts +++ b/tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts @@ -6,32 +6,32 @@ ////} //// ////interface B { -//// [|[|{| "isDefinition": true, "contextRangeIndex": 0 |}b|]: number;|] +//// /*1*/b: number; //// common: number; ////} //// ////// Assignment ////var v1: A | B = { a: 0, common: "" }; -////var v2: A | B = { [|[|{| "isWriteAccess": true, "isDefinition": true, "type": "number", "contextRangeIndex": 2 |}b|]: 0|], common: 3 }; +////var v2: A | B = { b: 0, common: 3 }; //// ////// Function call ////function consumer(f: A | B) { } -////consumer({ a: 0, [|[|{| "isWriteAccess": true, "isDefinition": true, "type": "number", "contextRangeIndex": 4 |}b|]: 0|], common: 1 }); +////consumer({ a: 0, b: 0, common: 1 }); //// ////// Type cast -////var c = { common: 0, [|[|{| "isWriteAccess": true, "isDefinition": true, "type": "number", "contextRangeIndex": 6 |}b|]: 0|] }; +////var c = { common: 0, b: 0 }; //// ////// Array literal -////var ar: Array = [{ a: 0, common: "" }, { [|[|{| "isWriteAccess": true, "isDefinition": true, "type": "number", "contextRangeIndex": 8 |}b|]: 0|], common: 0 }]; +////var ar: Array = [{ a: 0, common: "" }, { b: 0, common: 0 }]; //// ////// Nested object literal -////var ob: { aorb: A|B } = { aorb: { [|[|{| "isWriteAccess": true, "isDefinition": true, "type": "number", "contextRangeIndex": 10 |}b|]: 0|], common: 0 } }; +////var ob: { aorb: A|B } = { aorb: { b: 0, common: 0 } }; //// ////// Widened type -////var w: A|B = { [|[|{| "isWriteAccess": true, "isDefinition": true, "type": "undefined", "contextRangeIndex": 12 |}b|]:undefined|], common: undefined }; +////var w: A|B = { b:undefined, common: undefined }; //// ////// Untped -- should not be included ////var u1 = { a: 0, b: 0, common: "" }; ////var u2 = { b: 0, common: 0 }; -verify.singleReferenceGroup("(property) B.b: number", "b"); +verify.baselineFindAllReferences('1') diff --git a/tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts b/tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts index 153460912b58d..f064996fe4a6c 100644 --- a/tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts +++ b/tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts @@ -1,12 +1,12 @@ /// ////class Foo { -//// [|public [|{| "isDefinition": true, "contextRangeIndex": 0 |}12|]: any;|] +//// public /*1*/12: any; ////} //// ////var x: Foo; -////x[[|12|]]; -////x = { [|"[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 3 |}12|]": 0|] }; -////x = { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 5 |}12|]: 0|] }; +////x[12]; +////x = { "12": 0 }; +////x = { 12: 0 }; -verify.singleReferenceGroup("(property) Foo[12]: any", "12"); +verify.baselineFindAllReferences('1') diff --git a/tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts b/tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts index b0497753f90dd..e9a9ca2773238 100644 --- a/tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts +++ b/tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts @@ -1,13 +1,13 @@ /// ////class Foo { -//// [|public "[|{| "isDefinition": true, "contextRangeIndex": 0 |}ss|]": any;|] +//// public "/*1*/ss": any; ////} //// ////var x: Foo; -////x.[|ss|]; -////x["[|ss|]"]; -////x = { [|"[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}ss|]": 0|] }; -////x = { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 6 |}ss|]: 0|] }; +////x.ss; +////x["ss"]; +////x = { "ss": 0 }; +////x = { ss: 0 }; -verify.singleReferenceGroup('(property) Foo["ss"]: any', "ss"); +verify.baselineFindAllReferences('1')