diff --git a/internal/fourslash/_scripts/convertFourslash.mts b/internal/fourslash/_scripts/convertFourslash.mts index 3d0743a40b..7dff8086e8 100644 --- a/internal/fourslash/_scripts/convertFourslash.mts +++ b/internal/fourslash/_scripts/convertFourslash.mts @@ -97,7 +97,7 @@ function parseFileContent(filename: string, content: string): GoTest | undefined } function getTestInput(content: string): string { - const lines = content.split("\n"); + const lines = content.split("\n").map(line => line.trimEnd()); let testInput: string[] = []; for (const line of lines) { let newLine = ""; @@ -118,7 +118,14 @@ function getTestInput(content: string): string { } // chomp leading spaces - if (!testInput.some(line => line.length != 0 && !line.startsWith(" ") && !line.startsWith("// "))) { + if ( + !testInput.some(line => + line.length != 0 && + !line.startsWith(" ") && + !line.startsWith("// ") && + !line.startsWith("//@") + ) + ) { testInput = testInput.map(line => { if (line.startsWith(" ")) return line.substring(1); return line; @@ -182,6 +189,13 @@ function parseFourslashStatement(statement: ts.Statement): Cmd[] | undefined { // - `verify.baselineGetDefinitionAtPosition(...)` called getDefinitionAtPosition // LSP doesn't have two separate commands though. It's unclear how we would model bound spans though. return parseBaselineGoToDefinitionArgs(callExpression.arguments); + case "baselineRename": + case "baselineRenameAtRangesWithText": + // `verify.baselineRename...(...)` + return parseBaselineRenameArgs(func.text, callExpression.arguments); + case "renameInfoSucceeded": + case "renameInfoFailed": + return parseRenameInfo(func.text, callExpression.arguments); } } // `goTo....` @@ -793,6 +807,151 @@ function parseBaselineGoToDefinitionArgs(args: readonly ts.Expression[]): [Verif }]; } +function parseRenameInfo(funcName: "renameInfoSucceeded" | "renameInfoFailed", args: readonly ts.Expression[]): [VerifyRenameInfoCmd] | undefined { + let preferences = "nil /*preferences*/"; + let prefArg; + switch (funcName) { + case "renameInfoSucceeded": + if (args[6]) { + prefArg = args[6]; + } + break; + case "renameInfoFailed": + if (args[1]) { + prefArg = args[1]; + } + break; + } + if (prefArg) { + if (!ts.isObjectLiteralExpression(prefArg)) { + console.error(`Expected object literal expression for preferences, got ${prefArg.getText()}`); + return undefined; + } + const parsedPreferences = parseUserPreferences(prefArg); + if (!parsedPreferences) { + console.error(`Unrecognized user preferences in ${funcName}: ${prefArg.getText()}`); + return undefined; + } + } + return [{ kind: funcName, preferences }]; +} + +function parseBaselineRenameArgs(funcName: string, args: readonly ts.Expression[]): [VerifyBaselineRenameCmd] | undefined { + let newArgs: string[] = []; + let preferences: string | undefined; + for (const arg of args) { + let typedArg; + if ((typedArg = getArrayLiteralExpression(arg))) { + for (const elem of typedArg.elements) { + const newArg = parseBaselineRenameArg(elem); + if (!newArg) { + return undefined; + } + newArgs.push(newArg); + } + } + else if (ts.isObjectLiteralExpression(arg)) { + preferences = parseUserPreferences(arg); + if (!preferences) { + console.error(`Unrecognized user preferences in verify.baselineRename: ${arg.getText()}`); + return undefined; + } + continue; + } + else if (typedArg = parseBaselineRenameArg(arg)) { + newArgs.push(typedArg); + } + else { + return undefined; + } + } + return [{ + kind: funcName === "baselineRenameAtRangesWithText" ? "verifyBaselineRenameAtRangesWithText" : "verifyBaselineRename", + args: newArgs, + preferences: preferences ? preferences : "nil /*preferences*/", + }]; +} + +function parseUserPreferences(arg: ts.ObjectLiteralExpression): string | undefined { + const preferences: string[] = []; + for (const prop of arg.properties) { + if (ts.isPropertyAssignment(prop)) { + switch (prop.name.getText()) { + // !!! other preferences + case "providePrefixAndSuffixTextForRename": + preferences.push(`UseAliasesForRename: PtrTo(${prop.initializer.getText()})`); + break; + case "quotePreference": + preferences.push(`QuotePreference: PtrTo(ls.QuotePreference(${prop.initializer.getText()}))`); + break; + } + } + else { + return undefined; + } + } + if (preferences.length === 0) { + return "nil /*preferences*/"; + } + return `&ls.UserPreferences{${preferences.join(",")}}`; +} + +function parseBaselineRenameArg(arg: ts.Expression): string | undefined { + if (ts.isStringLiteral(arg)) { + return getGoStringLiteral(arg.text); + } + else if (ts.isIdentifier(arg) || (ts.isElementAccessExpression(arg) && ts.isIdentifier(arg.expression))) { + const argName = ts.isIdentifier(arg) ? arg.text : (arg.expression as ts.Identifier).text; + const file = arg.getSourceFile(); + const varStmts = file.statements.filter(ts.isVariableStatement); + for (const varStmt of varStmts) { + for (const decl of varStmt.declarationList.declarations) { + if (ts.isArrayBindingPattern(decl.name) && decl.initializer?.getText().includes("ranges")) { + for (let i = 0; i < decl.name.elements.length; i++) { + const elem = decl.name.elements[i]; + if (ts.isBindingElement(elem) && ts.isIdentifier(elem.name) && elem.name.text === argName) { + // `const [range_0, ..., range_n, ...] = test.ranges();` and arg is `range_n` + if (elem.dotDotDotToken === undefined) { + return `f.Ranges()[${i}]`; + } + // `const [range_0, ..., ...rest] = test.ranges();` and arg is `rest[n]` + if (ts.isElementAccessExpression(arg)) { + return `f.Ranges()[${i + parseInt(arg.argumentExpression!.getText())}]`; + } + // `const [range_0, ..., ...rest] = test.ranges();` and arg is `rest` + return `ToAny(f.Ranges()[${i}:])...`; + } + } + } + } + } + const init = getNodeOfKind(arg, ts.isCallExpression); + if (init) { + const result = getRangesByTextArg(init); + if (result) { + return result; + } + } + } + else if (ts.isCallExpression(arg)) { + const result = getRangesByTextArg(arg); + if (result) { + return result; + } + } + console.error(`Unrecognized argument in verify.baselineRename: ${arg.getText()}`); + return undefined; +} + +function getRangesByTextArg(arg: ts.CallExpression): string | undefined { + if (arg.getText().startsWith("test.rangesByText()")) { + if (ts.isStringLiteralLike(arg.arguments[0])) { + return `ToAny(f.GetRangesByText().Get(${getGoStringLiteral(arg.arguments[0].text)}))...`; + } + } + return undefined; +} + function parseBaselineQuickInfo(args: ts.NodeArray): VerifyBaselineQuickInfoCmd { if (args.length !== 0) { // All calls are currently empty! @@ -1097,6 +1256,12 @@ interface VerifyBaselineSignatureHelpCmd { kind: "verifyBaselineSignatureHelp"; } +interface VerifyBaselineRenameCmd { + kind: "verifyBaselineRename" | "verifyBaselineRenameAtRangesWithText"; + args: string[]; + preferences: string; +} + interface GoToCmd { kind: "goTo"; // !!! `selectRange` and `rangeStart` require parsing variables and `test.ranges()[n]` @@ -1116,6 +1281,11 @@ interface VerifyQuickInfoCmd { docs?: string; } +interface VerifyRenameInfoCmd { + kind: "renameInfoSucceeded" | "renameInfoFailed"; + preferences: string; +} + type Cmd = | VerifyCompletionsCmd | VerifyBaselineFindAllReferencesCmd @@ -1124,7 +1294,9 @@ type Cmd = | VerifyBaselineSignatureHelpCmd | GoToCmd | EditCmd - | VerifyQuickInfoCmd; + | VerifyQuickInfoCmd + | VerifyBaselineRenameCmd + | VerifyRenameInfoCmd; function generateVerifyCompletions({ marker, args, isNewIdentifierLocation }: VerifyCompletionsCmd): string { let expectedList: string; @@ -1185,6 +1357,15 @@ function generateQuickInfoCommand({ kind, marker, text, docs }: VerifyQuickInfoC } } +function generateBaselineRename({ kind, args, preferences }: VerifyBaselineRenameCmd): string { + switch (kind) { + case "verifyBaselineRename": + return `f.VerifyBaselineRename(t, ${preferences}, ${args.join(", ")})`; + case "verifyBaselineRenameAtRangesWithText": + return `f.VerifyBaselineRenameAtRangesWithText(t, ${preferences}, ${args.join(", ")})`; + } +} + function generateCmd(cmd: Cmd): string { switch (cmd.kind) { case "verifyCompletions": @@ -1207,6 +1388,13 @@ function generateCmd(cmd: Cmd): string { case "quickInfoExists": case "notQuickInfoExists": return generateQuickInfoCommand(cmd); + case "verifyBaselineRename": + case "verifyBaselineRenameAtRangesWithText": + return generateBaselineRename(cmd); + case "renameInfoSucceeded": + return `f.VerifyRenameSucceeded(t, ${cmd.preferences})`; + case "renameInfoFailed": + return `f.VerifyRenameFailed(t, ${cmd.preferences})`; default: let neverCommand: never = cmd; throw new Error(`Unknown command kind: ${neverCommand as Cmd["kind"]}`); @@ -1267,7 +1455,8 @@ function usesHelper(goTxt: string): boolean { } return goTxt.includes("Ignored") || goTxt.includes("DefaultCommitCharacters") - || goTxt.includes("PtrTo"); + || goTxt.includes("PtrTo") + || goTxt.includes("ToAny"); } function getNodeOfKind(node: ts.Node, hasKind: (n: ts.Node) => n is T): T | undefined { diff --git a/internal/fourslash/_scripts/failingTests.txt b/internal/fourslash/_scripts/failingTests.txt index a704de7162..909240a459 100644 --- a/internal/fourslash/_scripts/failingTests.txt +++ b/internal/fourslash/_scripts/failingTests.txt @@ -249,6 +249,7 @@ TestJsDocPropertyDescription6 TestJsDocPropertyDescription7 TestJsDocPropertyDescription8 TestJsDocPropertyDescription9 +TestJsDocSee_rename1 TestJsDocTagsWithHyphen TestJsQuickInfoGenerallyAcceptableSize TestJsRequireQuickInfo @@ -257,6 +258,7 @@ TestJsdocLink2 TestJsdocLink3 TestJsdocLink6 TestJsdocLink_findAllReferences1 +TestJsdocLink_rename1 TestJsdocTemplatePrototypeCompletions TestJsdocThrowsTagCompletion TestJsdocTypedefTag @@ -438,6 +440,13 @@ TestReferencesInComment TestReferencesInEmptyFile TestReferencesIsAvailableThroughGlobalNoCrash TestRegexDetection +TestRenameCrossJsTs01 +TestRenameForAliasingExport02 +TestRenameFromNodeModulesDep1 +TestRenameFromNodeModulesDep2 +TestRenameFromNodeModulesDep3 +TestRenameFromNodeModulesDep4 +TestRenamePrivateFields TestReverseMappedTypeQuickInfo TestSelfReferencedExternalModule TestSignatureHelpInferenceJsDocImportTag diff --git a/internal/fourslash/_scripts/makeManual.mts b/internal/fourslash/_scripts/makeManual.mts index 8f1893cc4e..09beb81cac 100644 --- a/internal/fourslash/_scripts/makeManual.mts +++ b/internal/fourslash/_scripts/makeManual.mts @@ -5,6 +5,7 @@ const scriptsDir = import.meta.dirname; const manualTestsPath = path.join(scriptsDir, "manualTests.txt"); const genDir = path.join(scriptsDir, "../", "tests", "gen"); const manualDir = path.join(scriptsDir, "../", "tests", "manual"); +const submoduleDir = path.join(scriptsDir, "../../../", "_submodules", "TypeScript", "tests", "cases", "fourslash"); function main() { const args = process.argv.slice(2); @@ -17,8 +18,24 @@ function main() { const testName = args[0]; const testFileName = testName; const genTestFile = path.join(genDir, testFileName + "_test.go"); - if (!fs.existsSync(genTestFile)) { - console.error(`Test file not found: '${genTestFile}'. Make sure the test exists in the gen directory first.`); + const submoduleTestFile = path.join(submoduleDir, testFileName + ".ts"); + const submoduleServerTestFile = path.join(submoduleDir, "server", testFileName + ".ts"); + let testKind: "gen" | "submodule" | "submoduleServer" | undefined; + if (fs.existsSync(genTestFile)) { + testKind = "gen"; + } + else if (fs.existsSync(submoduleTestFile)) { + testKind = "submodule"; + } + else if (fs.existsSync(submoduleServerTestFile)) { + testKind = "submoduleServer"; + } + + if (!testKind) { + console.error( + `Could not find test neither as '${genTestFile}', nor as '${submoduleTestFile}' or '${submoduleServerTestFile}'.` + + `Make sure the test exists in the gen directory or in the submodule.`, + ); process.exit(1); } @@ -26,8 +43,10 @@ function main() { fs.mkdirSync(manualDir, { recursive: true }); } - const manualTestFile = path.join(manualDir, path.basename(genTestFile)); - renameAndRemoveSkip(genTestFile, manualTestFile); + if (testKind === "gen") { + const manualTestFile = path.join(manualDir, path.basename(genTestFile)); + markAsManual(genTestFile, manualTestFile); + } let manualTests: string[] = []; if (fs.existsSync(manualTestsPath)) { @@ -42,7 +61,7 @@ function main() { } } -function renameAndRemoveSkip(genFilePath: string, manualFilePath: string) { +function markAsManual(genFilePath: string, manualFilePath: string) { const content = fs.readFileSync(genFilePath, "utf-8"); const updatedContent = content.replace(/^\s*t\.Skip\(\)\s*$/m, ""); fs.writeFileSync(manualFilePath, updatedContent, "utf-8"); diff --git a/internal/fourslash/_scripts/manualTests.txt b/internal/fourslash/_scripts/manualTests.txt index 9b8e2a61c4..e8f675db05 100644 --- a/internal/fourslash/_scripts/manualTests.txt +++ b/internal/fourslash/_scripts/manualTests.txt @@ -3,3 +3,4 @@ completionsAtIncompleteObjectLiteralProperty completionsSelfDeclaring1 completionsWithDeprecatedTag4 tsxCompletion12 +renameForDefaultExport01 diff --git a/internal/fourslash/_scripts/tsconfig.json b/internal/fourslash/_scripts/tsconfig.json index 2a320eaf55..4ef7cf9083 100644 --- a/internal/fourslash/_scripts/tsconfig.json +++ b/internal/fourslash/_scripts/tsconfig.json @@ -3,6 +3,7 @@ "strict": true, "noEmit": true, "module": "nodenext", - "allowImportingTsExtensions": true + "allowImportingTsExtensions": true, + "noFallthroughCasesInSwitch": true } } diff --git a/internal/fourslash/baselineutil.go b/internal/fourslash/baselineutil.go index d9c625f69d..5511028e3b 100644 --- a/internal/fourslash/baselineutil.go +++ b/internal/fourslash/baselineutil.go @@ -15,48 +15,126 @@ import ( "github.com/microsoft/typescript-go/internal/debug" "github.com/microsoft/typescript-go/internal/ls" "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil/baseline" "github.com/microsoft/typescript-go/internal/vfs" ) -type baselineFromTest struct { - content *strings.Builder +func (f *FourslashTest) addResultToBaseline(t *testing.T, command string, actual string) { + b, ok := f.baselines[command] + if !ok { + f.baselines[command] = &strings.Builder{} + b = f.baselines[command] + } + if b.Len() != 0 { + b.WriteString("\n\n\n\n") + } + b.WriteString(`// === ` + command + " ===\n" + actual) +} + +func (f *FourslashTest) writeToBaseline(command string, content string) { + b, ok := f.baselines[command] + if !ok { + f.baselines[command] = &strings.Builder{} + b = f.baselines[command] + } + b.WriteString(content) +} - baselineName, ext string +func getBaselineFileName(t *testing.T, command string) string { + return getBaseFileNameFromTest(t) + "." + getBaselineExtension(command) } -func (b *baselineFromTest) addResult(command, actual string) { - // state.baseline(command, actual) in strada - if b.content.Len() != 0 { - b.content.WriteString("\n\n\n\n") +func getBaselineExtension(command string) string { + switch command { + case "QuickInfo", "SignatureHelp": + return "baseline" + case "Auto Imports": + return "baseline.md" + case "findAllReferences", "goToDefinition", "findRenameLocations": + return "baseline.jsonc" + default: + return "baseline.jsonc" } - b.content.WriteString(`// === ` + command + " ===\n" + actual) } -func (b *baselineFromTest) getBaselineFileName() string { - return "fourslash/" + b.baselineName + b.ext +func getBaselineOptions(command string) baseline.Options { + switch command { + case "findRenameLocations": + return baseline.Options{ + Subfolder: "fourslash/" + command, + IsSubmodule: true, + DiffFixupOld: func(s string) string { + var commandLines []string + commandPrefix := regexp.MustCompile(`^// === ([a-z\sA-Z]*) ===`) + testFilePrefix := "/tests/cases/fourslash" + serverTestFilePrefix := "/server" + contextSpanOpening := "<|" + contextSpanClosing := "|>" + oldPreference := "providePrefixAndSuffixTextForRename" + newPreference := "useAliasesForRename" + replacer := strings.NewReplacer( + contextSpanOpening, "", + contextSpanClosing, "", + testFilePrefix, "", + serverTestFilePrefix, "", + oldPreference, newPreference, + ) + lines := strings.Split(s, "\n") + var isInCommand bool + for _, line := range lines { + if strings.HasPrefix(line, "// @findInStrings: ") || strings.HasPrefix(line, "// @findInComments: ") { + continue + } + matches := commandPrefix.FindStringSubmatch(line) + if len(matches) > 0 { + commandName := matches[1] + if commandName == command { + isInCommand = true + } else { + isInCommand = false + } + } + if isInCommand { + fixedLine := replacer.Replace(line) + commandLines = append(commandLines, fixedLine) + } + } + return strings.Join(commandLines, "\n") + }, + } + default: + return baseline.Options{ + Subfolder: "fourslash/" + command, + } + } } type baselineFourslashLocationsOptions struct { // markerInfo - marker *Marker // location - markerName string // name of the marker to be printed in baseline - - documentSpanId func(span *documentSpan) string - skipDocumentSpanDetails core.Tristate - skipDocumentContainingOnlyMarker core.Tristate - endMarker core.Tristate - - startMarkerPrefix func(span lsproto.Location) string - endMarkerSuffix func(span lsproto.Location) string - ignoredDocumentSpanProperties []string - additionalSpan *lsproto.Location + marker MarkerOrRange // location + markerName string // name of the marker to be printed in baseline + + endMarker string + + startMarkerPrefix func(span lsproto.Location) *string + endMarkerSuffix func(span lsproto.Location) *string } func (f *FourslashTest) getBaselineForLocationsWithFileContents(spans []lsproto.Location, options baselineFourslashLocationsOptions) string { - return f.getBaselineForGroupedLocationsWithFileContents(collections.GroupBy(spans, func(span lsproto.Location) lsproto.DocumentUri { return span.Uri }), options) + locationsByFile := collections.GroupBy(spans, func(span lsproto.Location) lsproto.DocumentUri { return span.Uri }) + rangesByFile := collections.MultiMap[lsproto.DocumentUri, lsproto.Range]{} + for file, locs := range locationsByFile.M { + for _, loc := range locs { + rangesByFile.Add(file, loc.Range) + } + } + return f.getBaselineForGroupedLocationsWithFileContents( + &rangesByFile, + options, + ) } -func (f *FourslashTest) getBaselineForGroupedLocationsWithFileContents(groupedLocations *collections.MultiMap[lsproto.DocumentUri, lsproto.Location], options baselineFourslashLocationsOptions) string { +func (f *FourslashTest) getBaselineForGroupedLocationsWithFileContents(groupedRanges *collections.MultiMap[lsproto.DocumentUri, lsproto.Range], options baselineFourslashLocationsOptions) string { // We must always print the file containing the marker, // but don't want to print it twice at the end if it already // found in a file with ranges. @@ -73,8 +151,8 @@ func (f *FourslashTest) getBaselineForGroupedLocationsWithFileContents(groupedLo } fileName := ls.FileNameToDocumentURI(path) - locations := groupedLocations.Get(fileName) - if len(locations) == 0 { + ranges := groupedRanges.Get(fileName) + if len(ranges) == 0 { return nil } @@ -88,12 +166,7 @@ func (f *FourslashTest) getBaselineForGroupedLocationsWithFileContents(groupedLo foundMarker = true } - documentSpans := core.Map(locations, func(location lsproto.Location) *documentSpan { - return &documentSpan{ - Location: location, - } - }) - baselineEntries = append(baselineEntries, f.getBaselineContentForFile(path, content, documentSpans, nil, options)) + baselineEntries = append(baselineEntries, f.getBaselineContentForFile(path, content, ranges, nil, options)) return nil }) @@ -115,102 +188,62 @@ func (f *FourslashTest) getBaselineForGroupedLocationsWithFileContents(groupedLo return strings.Join(baselineEntries, "\n\n") } -type documentSpan struct { - lsproto.Location - - // If the span represents a location that was remapped (e.g. via a .d.ts.map file), - // then the original filename and span will be specified here - originalLocation *lsproto.Location - - // If DocumentSpan.textSpan is the span for name of the declaration, - // then this is the span for relevant declaration - contextSpan *lsproto.Location - originalContextSpan *lsproto.Location -} - type baselineDetail struct { pos lsproto.Position positionMarker string - span *documentSpan + span *lsproto.Range kind string } func (f *FourslashTest) getBaselineContentForFile( fileName string, content string, - spansInFile []*documentSpan, - spanToContextId map[documentSpan]int, + spansInFile []lsproto.Range, + spanToContextId map[lsproto.Range]int, options baselineFourslashLocationsOptions, ) string { details := []*baselineDetail{} - detailPrefixes := map[baselineDetail]string{} - detailSuffixes := map[baselineDetail]string{} + detailPrefixes := map[*baselineDetail]string{} + detailSuffixes := map[*baselineDetail]string{} canDetermineContextIdInline := true - var groupedSpanForAdditionalSpan *documentSpan + uri := ls.FileNameToDocumentURI(fileName) if options.marker != nil && options.marker.FileName() == fileName { - details = append(details, &baselineDetail{pos: options.marker.LSPosition, positionMarker: options.markerName}) + details = append(details, &baselineDetail{pos: options.marker.LSPos(), positionMarker: options.markerName}) } for _, span := range spansInFile { - contextSpanIndex := len(details) - if span.contextSpan != nil { - details = append(details, &baselineDetail{pos: span.contextSpan.Range.Start, positionMarker: "<|", span: span, kind: "contextStart"}) - if canDetermineContextIdInline && ls.ComparePositions(span.contextSpan.Range.Start, span.Range.Start) > 0 { - // Need to do explicit pass to determine contextId since contextId starts after textStart - canDetermineContextIdInline = false - } - } - textSpanIndex := len(details) - textSpanEnd := span.Range.End details = append(details, - &baselineDetail{pos: span.Range.Start, positionMarker: "[|", span: span, kind: "textStart"}, - &baselineDetail{pos: span.Range.End, positionMarker: "|]", span: span, kind: "textEnd"}, + &baselineDetail{pos: span.Start, positionMarker: "[|", span: &span, kind: "textStart"}, + &baselineDetail{pos: span.End, positionMarker: core.OrElse(options.endMarker, "|]"), span: &span, kind: "textEnd"}, ) - var contextSpanEnd *lsproto.Position - if span.contextSpan != nil { - contextSpanEnd = &span.contextSpan.Range.End - details = append(details, &baselineDetail{pos: span.contextSpan.Range.End, positionMarker: "|>", span: span, kind: "contextEnd"}) - } - - if options.additionalSpan != nil && span.Location == *options.additionalSpan { - groupedSpanForAdditionalSpan = span - } - if options.startMarkerPrefix != nil { - if startPrefix := options.startMarkerPrefix(span.Location); startPrefix != "" { - if fileName == options.marker.FileName() && span.Range.Start == options.marker.LSPosition { - _, ok := detailPrefixes[*details[0]] + startPrefix := options.startMarkerPrefix(lsproto.Location{Uri: uri, Range: span}) + if startPrefix != nil { + // Special case: if this span starts at the same position as the provided marker, + // we want the span's prefix to appear before the marker name. + // i.e. We want `/*START PREFIX*/A: /*RENAME*/[|ARENAME|]`, + // not `/*RENAME*//*START PREFIX*/A: [|ARENAME|]` + if options.marker != nil && fileName == options.marker.FileName() && span.Start == options.marker.LSPos() { + _, ok := detailPrefixes[details[0]] debug.Assert(!ok, "Expected only single prefix at marker location") - detailPrefixes[*details[0]] = startPrefix - } else if span.contextSpan.Range.Start == span.Range.Start { - // Write it at contextSpan instead of textSpan - detailPrefixes[*details[contextSpanIndex]] = startPrefix + detailPrefixes[details[0]] = *startPrefix } else { - // At textSpan - detailPrefixes[*details[textSpanIndex]] = startPrefix + detailPrefixes[details[textSpanIndex]] = *startPrefix } } } if options.endMarkerSuffix != nil { - if endSuffix := options.endMarkerSuffix(span.Location); endSuffix != "" { - if fileName == options.marker.FileName() && textSpanEnd == options.marker.LSPosition { - _, ok := detailSuffixes[*details[0]] - debug.Assert(!ok, "Expected only single suffix at marker location") - detailSuffixes[*details[0]] = endSuffix - } else if *contextSpanEnd == textSpanEnd { - // Write it at contextSpan instead of textSpan - detailSuffixes[*details[textSpanIndex+2]] = endSuffix - } else { - // At textSpan - detailSuffixes[*details[textSpanIndex+1]] = endSuffix - } + endSuffix := options.endMarkerSuffix(lsproto.Location{Uri: uri, Range: span}) + if endSuffix != nil { + detailSuffixes[details[textSpanIndex+1]] = *endSuffix } } } + slices.SortStableFunc(details, func(d1, d2 *baselineDetail) int { return ls.ComparePositions(d1.pos, d2.pos) }) @@ -225,9 +258,6 @@ func (f *FourslashTest) getBaselineContentForFile( // Stable sort should handle first two cases but with that marker will be before rangeEnd if locations match // So we will defer writing marker in this case by checking and finding index of rangeEnd if same var deferredMarkerIndex *int - if options.documentSpanId == nil { - options.documentSpanId = func(span *documentSpan) string { return "" } - } for index, detail := range details { if detail.span == nil && deferredMarkerIndex == nil { @@ -248,7 +278,7 @@ func (f *FourslashTest) getBaselineContentForFile( textWithContext.add(detail) textWithContext.pos = detail.pos // Prefix - prefix := detailPrefixes[*detail] + prefix := detailPrefixes[detail] if prefix != "" { textWithContext.newContent.WriteString(prefix) } @@ -257,18 +287,6 @@ func (f *FourslashTest) getBaselineContentForFile( switch detail.kind { case "textStart": var text string - if options.skipDocumentSpanDetails.IsTrue() { - text = options.documentSpanId(detail.span) - } else { - text = convertDocumentSpanToString(detail.span, options.documentSpanId(detail.span), options.ignoredDocumentSpanProperties) - } - if groupedSpanForAdditionalSpan != nil && *(detail.span) == *groupedSpanForAdditionalSpan { - if text == "" { - text = `textSpan: true` - } else { - text = `textSpan: true` + `, ` + text - } - } if contextId, ok := spanToContextId[*detail.span]; ok { isAfterContextStart := false for textStartIndex := index - 1; textStartIndex >= 0; textStartIndex-- { @@ -307,7 +325,7 @@ func (f *FourslashTest) getBaselineContentForFile( detail = details[0] // Marker detail } } - if suffix, ok := detailSuffixes[*detail]; ok { + if suffix, ok := detailSuffixes[detail]; ok { textWithContext.newContent.WriteString(suffix) } } @@ -319,11 +337,6 @@ func (f *FourslashTest) getBaselineContentForFile( return textWithContext.readableContents.String() } -func convertDocumentSpanToString(location *documentSpan, prefix string, ignoredProperties []string) string { - // !!! - return prefix -} - var lineSplitter = regexp.MustCompile(`\r?\n`) type textWithContext struct { @@ -371,7 +384,7 @@ func newTextWithContext(fileName string, content string) *textWithContext { t.converters = ls.NewConverters(lsproto.PositionEncodingKindUTF8, func(_ string) *ls.LineMap { return t.lineStarts }) - t.readableContents.WriteString("// === " + fileName + " ===\n") + t.readableContents.WriteString("// === " + fileName + " ===") return t } @@ -443,8 +456,11 @@ func (t *textWithContext) add(detail *baselineDetail) { } func (t *textWithContext) readableJsoncBaseline(text string) { - for _, line := range lineSplitter.Split(text, -1) { - t.readableContents.WriteString(`// ` + line + "\n") + for i, line := range lineSplitter.Split(text, -1) { + if i > 0 { + t.readableContents.WriteString("\n") + } + t.readableContents.WriteString(`// ` + line) } } diff --git a/internal/fourslash/fourslash.go b/internal/fourslash/fourslash.go index c64cd1f72d..a12a7a5390 100644 --- a/internal/fourslash/fourslash.go +++ b/internal/fourslash/fourslash.go @@ -13,6 +13,7 @@ import ( "github.com/go-json-experiment/json" "github.com/google/go-cmp/cmp" "github.com/microsoft/typescript-go/internal/bundled" + "github.com/microsoft/typescript-go/internal/collections" "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/ls" "github.com/microsoft/typescript-go/internal/lsp" @@ -33,8 +34,9 @@ type FourslashTest struct { id int32 vfs vfs.FS - testData *TestData // !!! consolidate test files from test data and script info - baseline *baselineFromTest + testData *TestData // !!! consolidate test files from test data and script info + baselines map[string]*strings.Builder + rangesByText *collections.MultiMap[string, *RangeMarker] scriptInfos map[string]*scriptInfo converters *ls.Converters @@ -124,7 +126,7 @@ func NewFourslash(t *testing.T, capabilities *lsproto.ClientCapabilities, conten // Just skip this for now. t.Skip("bundled files are not embedded") } - fileName := getFileNameFromTest(t) + fileName := getBaseFileNameFromTest(t) + tspath.ExtensionTs testfs := make(map[string]string) scriptInfos := make(map[string]*scriptInfo) testData := ParseTestData(t, content, fileName) @@ -182,6 +184,7 @@ func NewFourslash(t *testing.T, capabilities *lsproto.ClientCapabilities, conten vfs: fs, scriptInfos: scriptInfos, converters: converters, + baselines: make(map[string]*strings.Builder), } // !!! temporary; remove when we have `handleDidChangeConfiguration`/implicit project config support @@ -195,14 +198,15 @@ func NewFourslash(t *testing.T, capabilities *lsproto.ClientCapabilities, conten t.Cleanup(func() { inputWriter.Close() + f.verifyBaselines(t) }) return f } -func getFileNameFromTest(t *testing.T) string { +func getBaseFileNameFromTest(t *testing.T) string { name := strings.TrimPrefix(t.Name(), "Test") char, size := utf8.DecodeRuneInString(name) - return string(unicode.ToLower(char)) + name[size:] + tspath.ExtensionTs + return string(unicode.ToLower(char)) + name[size:] } func (f *FourslashTest) nextID() int32 { @@ -296,8 +300,7 @@ func (f *FourslashTest) readMsg(t *testing.T) *lsproto.Message { } func (f *FourslashTest) GoToMarkerOrRange(t *testing.T, markerOrRange MarkerOrRange) { - // GoToRangeStart - f.goToMarker(t, markerOrRange.GetMarker()) + f.goToMarker(t, markerOrRange) } func (f *FourslashTest) GoToMarker(t *testing.T, markerName string) { @@ -308,10 +311,10 @@ func (f *FourslashTest) GoToMarker(t *testing.T, markerName string) { f.goToMarker(t, marker) } -func (f *FourslashTest) goToMarker(t *testing.T, marker *Marker) { - f.ensureActiveFile(t, marker.FileName()) - f.goToPosition(t, marker.LSPosition) - f.lastKnownMarkerName = marker.Name +func (f *FourslashTest) goToMarker(t *testing.T, markerOrRange MarkerOrRange) { + f.ensureActiveFile(t, markerOrRange.FileName()) + f.goToPosition(t, markerOrRange.LSPos()) + f.lastKnownMarkerName = markerOrRange.GetName() } func (f *FourslashTest) GoToEOF(t *testing.T) { @@ -764,21 +767,6 @@ func (f *FourslashTest) VerifyBaselineFindAllReferences( ) { referenceLocations := f.lookupMarkersOrGetRanges(t, markers) - if f.baseline != nil { - t.Fatalf("Error during test '%s': Another baseline is already in progress", t.Name()) - } else { - f.baseline = &baselineFromTest{ - content: &strings.Builder{}, - baselineName: "findAllRef/" + strings.TrimPrefix(t.Name(), "Test"), - ext: ".baseline.jsonc", - } - } - - // empty baseline after test completes - defer func() { - f.baseline = nil - }() - for _, markerOrRange := range referenceLocations { // worker in `baselineEachMarkerOrRange` f.GoToMarkerOrRange(t, markerOrRange) @@ -806,14 +794,12 @@ func (f *FourslashTest) VerifyBaselineFindAllReferences( } } - f.baseline.addResult("findAllReferences", f.getBaselineForLocationsWithFileContents(*result.Locations, baselineFourslashLocationsOptions{ - marker: markerOrRange.GetMarker(), + f.addResultToBaseline(t, "findAllReferences", f.getBaselineForLocationsWithFileContents(*result.Locations, baselineFourslashLocationsOptions{ + marker: markerOrRange, markerName: "/*FIND ALL REFS*/", })) } - - baseline.Run(t, f.baseline.getBaselineFileName(), f.baseline.content.String(), baseline.Options{}) } func (f *FourslashTest) VerifyBaselineGoToDefinition( @@ -822,21 +808,6 @@ func (f *FourslashTest) VerifyBaselineGoToDefinition( ) { referenceLocations := f.lookupMarkersOrGetRanges(t, markers) - if f.baseline != nil { - t.Fatalf("Error during test '%s': Another baseline is already in progress", t.Name()) - } else { - f.baseline = &baselineFromTest{ - content: &strings.Builder{}, - baselineName: "goToDef/" + strings.TrimPrefix(t.Name(), "Test"), - ext: ".baseline.jsonc", - } - } - - // empty baseline after test completes - defer func() { - f.baseline = nil - }() - for _, markerOrRange := range referenceLocations { // worker in `baselineEachMarkerOrRange` f.GoToMarkerOrRange(t, markerOrRange) @@ -873,31 +844,14 @@ func (f *FourslashTest) VerifyBaselineGoToDefinition( t.Fatalf("Unexpected definition response type at marker '%s': %T", *f.lastKnownMarkerName, result.DefinitionLinks) } - f.baseline.addResult("goToDefinition", f.getBaselineForLocationsWithFileContents(resultAsLocations, baselineFourslashLocationsOptions{ - marker: markerOrRange.GetMarker(), - markerName: "/*GO TO DEFINITION*/", + f.addResultToBaseline(t, "goToDefinition", f.getBaselineForLocationsWithFileContents(resultAsLocations, baselineFourslashLocationsOptions{ + marker: markerOrRange, + markerName: "/*GOTO DEF*/", })) } - - baseline.Run(t, f.baseline.getBaselineFileName(), f.baseline.content.String(), baseline.Options{}) } func (f *FourslashTest) VerifyBaselineHover(t *testing.T) { - if f.baseline != nil { - t.Fatalf("Error during test '%s': Another baseline is already in progress", t.Name()) - } else { - f.baseline = &baselineFromTest{ - content: &strings.Builder{}, - baselineName: "hover/" + strings.TrimPrefix(t.Name(), "Test"), - ext: ".baseline", - } - } - - // empty baseline after test completes - defer func() { - f.baseline = nil - }() - markersAndItems := core.MapFiltered(f.Markers(), func(marker *Marker) (markerAndItem[*lsproto.Hover], bool) { if marker.Name == nil { return markerAndItem[*lsproto.Hover]{}, false @@ -953,13 +907,12 @@ func (f *FourslashTest) VerifyBaselineHover(t *testing.T) { return result } - f.baseline.addResult("QuickInfo", annotateContentWithTooltips(t, f, markersAndItems, "quickinfo", getRange, getTooltipLines)) + f.addResultToBaseline(t, "QuickInfo", annotateContentWithTooltips(t, f, markersAndItems, "quickinfo", getRange, getTooltipLines)) if jsonStr, err := core.StringifyJson(markersAndItems, "", " "); err == nil { - f.baseline.content.WriteString(jsonStr) + f.writeToBaseline("QuickInfo", jsonStr) } else { t.Fatalf("Failed to stringify markers and items for baseline: %v", err) } - baseline.Run(t, f.baseline.getBaselineFileName(), f.baseline.content.String(), baseline.Options{}) } func appendLinesForMarkedStringWithLanguage(result []string, ms *lsproto.MarkedStringWithLanguage) []string { @@ -970,21 +923,6 @@ func appendLinesForMarkedStringWithLanguage(result []string, ms *lsproto.MarkedS } func (f *FourslashTest) VerifyBaselineSignatureHelp(t *testing.T) { - if f.baseline != nil { - t.Fatalf("Error during test '%s': Another baseline is already in progress", t.Name()) - } else { - f.baseline = &baselineFromTest{ - content: &strings.Builder{}, - baselineName: "signatureHelp/" + strings.TrimPrefix(t.Name(), "Test"), - ext: ".baseline", - } - } - - // empty baseline after test completes - defer func() { - f.baseline = nil - }() - markersAndItems := core.MapFiltered(f.Markers(), func(marker *Marker) (markerAndItem[*lsproto.SignatureHelp], bool) { if marker.Name == nil { return markerAndItem[*lsproto.SignatureHelp]{}, false @@ -1084,13 +1022,12 @@ func (f *FourslashTest) VerifyBaselineSignatureHelp(t *testing.T) { return result } - f.baseline.addResult("SignatureHelp", annotateContentWithTooltips(t, f, markersAndItems, "signaturehelp", getRange, getTooltipLines)) + f.addResultToBaseline(t, "SignatureHelp", annotateContentWithTooltips(t, f, markersAndItems, "signaturehelp", getRange, getTooltipLines)) if jsonStr, err := core.StringifyJson(markersAndItems, "", " "); err == nil { - f.baseline.content.WriteString(jsonStr) + f.writeToBaseline("SignatureHelp", jsonStr) } else { t.Fatalf("Failed to stringify markers and items for baseline: %v", err) } - baseline.Run(t, f.baseline.getBaselineFileName(), f.baseline.content.String(), baseline.Options{}) } // Collects all named markers if provided, or defaults to anonymous ranges @@ -1235,7 +1172,7 @@ func (f *FourslashTest) editScriptAndUpdateMarkers(t *testing.T, fileName string rangeMarker.LSRange = f.converters.ToLSPRange(script, rangeMarker.Range) } } - // !!! clean up ranges by text + f.rangesByText = nil } func updatePosition(pos int, editStart int, editEnd int, newText string) int { @@ -1434,15 +1371,6 @@ func (f *FourslashTest) getCurrentPositionPrefix() string { } func (f *FourslashTest) BaselineAutoImportsCompletions(t *testing.T, markerNames []string) { - if f.baseline != nil { - t.Fatalf("Error during test '%s': Another baseline is already in progress", t.Name()) - } else { - f.baseline = &baselineFromTest{ - content: &strings.Builder{}, - baselineName: "autoImport/" + strings.TrimPrefix(t.Name(), "Test"), - ext: ".baseline.md", - } - } for _, markerName := range markerNames { f.GoToMarker(t, markerName) params := &lsproto.CompletionParams{ @@ -1462,7 +1390,7 @@ func (f *FourslashTest) BaselineAutoImportsCompletions(t *testing.T, markerNames t.Fatalf(prefix+"Unexpected response type for completion request for autoimports: %T", resMsg.AsResponse().Result) } - f.baseline.content.WriteString("// === Auto Imports === \n") + f.writeToBaseline("Auto Imports", "// === Auto Imports === \n") fileContent, ok := f.vfs.ReadFile(f.activeFilename) if !ok { @@ -1472,10 +1400,10 @@ func (f *FourslashTest) BaselineAutoImportsCompletions(t *testing.T, markerNames marker := f.testData.MarkerPositions[markerName] ext := strings.TrimPrefix(tspath.GetAnyExtensionFromPath(f.activeFilename, nil, true), ".") lang := core.IfElse(ext == "mts" || ext == "cts", "ts", ext) - f.baseline.content.WriteString(codeFence( + f.writeToBaseline("Auto Imports", (codeFence( lang, "// @FileName: "+f.activeFilename+"\n"+fileContent[:marker.Position]+"/*"+markerName+"*/"+fileContent[marker.Position:], - )) + ))) currentFile := newScriptInfo(f.activeFilename, fileContent) converters := ls.NewConverters(lsproto.PositionEncodingKindUTF8, func(_ string) *ls.LineMap { @@ -1484,7 +1412,7 @@ func (f *FourslashTest) BaselineAutoImportsCompletions(t *testing.T, markerNames var list []*lsproto.CompletionItem if result.Items == nil || len(*result.Items) == 0 { if result.List == nil || result.List.Items == nil || len(result.List.Items) == 0 { - f.baseline.content.WriteString("no autoimport completions found" + "\n\n") + f.writeToBaseline("Auto Imports", "no autoimport completions found"+"\n\n") continue } @@ -1530,8 +1458,209 @@ func (f *FourslashTest) BaselineAutoImportsCompletions(t *testing.T, markerNames for _, change := range allChanges { newFileContent = newFileContent[:converters.LineAndCharacterToPosition(currentFile, change.Range.Start)] + change.NewText + newFileContent[converters.LineAndCharacterToPosition(currentFile, change.Range.End):] } - f.baseline.content.WriteString(codeFence(lang, newFileContent) + "\n\n") + f.writeToBaseline("Auto Imports", codeFence(lang, newFileContent)+"\n\n") + } + } +} + +// string | *Marker | *RangeMarker +type MarkerOrRangeOrName = any + +func (f *FourslashTest) VerifyBaselineRename( + t *testing.T, + preferences *ls.UserPreferences, + markerOrNameOrRanges ...MarkerOrRangeOrName, +) { + var markerOrRanges []MarkerOrRange + for _, markerOrNameOrRange := range markerOrNameOrRanges { + switch markerOrNameOrRange := markerOrNameOrRange.(type) { + case string: + marker, ok := f.testData.MarkerPositions[markerOrNameOrRange] + if !ok { + t.Fatalf("Marker '%s' not found", markerOrNameOrRange) + } + markerOrRanges = append(markerOrRanges, marker) + case *Marker: + markerOrRanges = append(markerOrRanges, markerOrNameOrRange) + case *RangeMarker: + markerOrRanges = append(markerOrRanges, markerOrNameOrRange) + default: + t.Fatalf("Invalid marker or range type: %T. Expected string, *Marker, or *RangeMarker.", markerOrNameOrRange) } } - baseline.Run(t, f.baseline.getBaselineFileName(), f.baseline.content.String(), baseline.Options{}) + + f.verifyBaselineRename(t, preferences, markerOrRanges) +} + +func (f *FourslashTest) verifyBaselineRename( + t *testing.T, + preferences *ls.UserPreferences, + markerOrRanges []MarkerOrRange, +) { + for _, markerOrRange := range markerOrRanges { + f.GoToMarkerOrRange(t, markerOrRange) + + // !!! set preferences + params := &lsproto.RenameParams{ + TextDocument: lsproto.TextDocumentIdentifier{ + Uri: ls.FileNameToDocumentURI(f.activeFilename), + }, + Position: f.currentCaretPosition, + NewName: "?", + } + + prefix := f.getCurrentPositionPrefix() + resMsg, result, resultOk := sendRequest(t, f, lsproto.TextDocumentRenameInfo, params) + if resMsg == nil { + t.Fatal(prefix + "Nil response received for rename request") + } + if !resultOk { + t.Fatalf(prefix+"Unexpected rename response type: %T", resMsg.AsResponse().Result) + } + + var changes map[lsproto.DocumentUri][]*lsproto.TextEdit + if result.WorkspaceEdit != nil && result.WorkspaceEdit.Changes != nil { + changes = *result.WorkspaceEdit.Changes + } + locationToText := map[lsproto.Location]string{} + fileToRange := collections.MultiMap[lsproto.DocumentUri, lsproto.Range]{} + for uri, edits := range changes { + for _, edit := range edits { + fileToRange.Add(uri, edit.Range) + locationToText[lsproto.Location{Uri: uri, Range: edit.Range}] = edit.NewText + } + } + + var renameOptions strings.Builder + if preferences != nil { + if preferences.UseAliasesForRename != nil { + fmt.Fprintf(&renameOptions, "// @useAliasesForRename: %v\n", *preferences.UseAliasesForRename) + } + if preferences.QuotePreference != nil { + fmt.Fprintf(&renameOptions, "// @quotePreference: %v\n", *preferences.QuotePreference) + } + } + + baselineFileContent := f.getBaselineForGroupedLocationsWithFileContents( + &fileToRange, + baselineFourslashLocationsOptions{ + marker: markerOrRange, + markerName: "/*RENAME*/", + endMarker: "RENAME|]", + startMarkerPrefix: func(span lsproto.Location) *string { + text := locationToText[span] + prefixAndSuffix := strings.Split(text, "?") + if prefixAndSuffix[0] != "" { + return ptrTo("/*START PREFIX*/" + prefixAndSuffix[0]) + } + return nil + }, + endMarkerSuffix: func(span lsproto.Location) *string { + text := locationToText[span] + prefixAndSuffix := strings.Split(text, "?") + if prefixAndSuffix[1] != "" { + return ptrTo(prefixAndSuffix[1] + "/*END SUFFIX*/") + } + return nil + }, + }, + ) + + var baselineResult string + if renameOptions.Len() > 0 { + baselineResult = renameOptions.String() + "\n" + baselineFileContent + } else { + baselineResult = baselineFileContent + } + + f.addResultToBaseline(t, + "findRenameLocations", + baselineResult, + ) + } +} + +func (f *FourslashTest) VerifyRenameSucceeded(t *testing.T, preferences *ls.UserPreferences) { + // !!! set preferences + params := &lsproto.RenameParams{ + TextDocument: lsproto.TextDocumentIdentifier{ + Uri: ls.FileNameToDocumentURI(f.activeFilename), + }, + Position: f.currentCaretPosition, + NewName: "?", + } + + prefix := f.getCurrentPositionPrefix() + resMsg, result, resultOk := sendRequest(t, f, lsproto.TextDocumentRenameInfo, params) + if resMsg == nil { + t.Fatal(prefix + "Nil response received for rename request") + } + if !resultOk { + t.Fatalf(prefix+"Unexpected rename response type: %T", resMsg.AsResponse().Result) + } + + if result.WorkspaceEdit == nil || result.WorkspaceEdit.Changes == nil || len(*result.WorkspaceEdit.Changes) == 0 { + t.Fatal(prefix + "Expected rename to succeed, but got no changes") + } +} + +func (f *FourslashTest) VerifyRenameFailed(t *testing.T, preferences *ls.UserPreferences) { + // !!! set preferences + params := &lsproto.RenameParams{ + TextDocument: lsproto.TextDocumentIdentifier{ + Uri: ls.FileNameToDocumentURI(f.activeFilename), + }, + Position: f.currentCaretPosition, + NewName: "?", + } + + prefix := f.getCurrentPositionPrefix() + resMsg, result, resultOk := sendRequest(t, f, lsproto.TextDocumentRenameInfo, params) + if resMsg == nil { + t.Fatal(prefix + "Nil response received for rename request") + } + if !resultOk { + t.Fatalf(prefix+"Unexpected rename response type: %T", resMsg.AsResponse().Result) + } + + if result.WorkspaceEdit != nil { + t.Fatalf(prefix+"Expected rename to fail, but got changes: %s", cmp.Diff(result.WorkspaceEdit, nil)) + } +} + +func (f *FourslashTest) VerifyBaselineRenameAtRangesWithText( + t *testing.T, + preferences *ls.UserPreferences, + texts ...string, +) { + var markerOrRanges []MarkerOrRange + for _, text := range texts { + ranges := core.Map(f.GetRangesByText().Get(text), func(r *RangeMarker) MarkerOrRange { return r }) + markerOrRanges = append(markerOrRanges, ranges...) + } + f.verifyBaselineRename(t, preferences, markerOrRanges) +} + +func (f *FourslashTest) GetRangesByText() *collections.MultiMap[string, *RangeMarker] { + if f.rangesByText != nil { + return f.rangesByText + } + rangesByText := collections.MultiMap[string, *RangeMarker]{} + for _, r := range f.testData.Ranges { + rangeText := f.getRangeText(r) + rangesByText.Add(rangeText, r) + } + f.rangesByText = &rangesByText + return &rangesByText +} + +func (f *FourslashTest) getRangeText(r *RangeMarker) string { + script := f.getScriptInfo(r.FileName()) + return script.content[r.Range.Pos():r.Range.End()] +} + +func (f *FourslashTest) verifyBaselines(t *testing.T) { + for command, content := range f.baselines { + baseline.Run(t, getBaselineFileName(t, command), content.String(), getBaselineOptions(command)) + } } diff --git a/internal/fourslash/test_parser.go b/internal/fourslash/test_parser.go index 697f54da53..346a5eb811 100644 --- a/internal/fourslash/test_parser.go +++ b/internal/fourslash/test_parser.go @@ -2,6 +2,7 @@ package fourslash import ( "fmt" + "slices" "strings" "testing" "unicode/utf8" @@ -22,9 +23,10 @@ import ( // // is a range with `text in range` "selected". type RangeMarker struct { - *Marker - Range core.TextRange - LSRange lsproto.Range + fileName string + Range core.TextRange + LSRange lsproto.Range + Marker *Marker } func (r *RangeMarker) LSPos() lsproto.Position { @@ -35,8 +37,11 @@ func (r *RangeMarker) FileName() string { return r.fileName } -func (r *RangeMarker) GetMarker() *Marker { - return r.Marker +func (r *RangeMarker) GetName() *string { + if r.Marker == nil { + return nil + } + return r.Marker.Name } type Marker struct { @@ -44,7 +49,7 @@ type Marker struct { Position int LSPosition lsproto.Position Name *string // `nil` for anonymous markers such as `{| "foo": "bar" |}` - Data map[string]interface{} + Data map[string]any } func (m *Marker) LSPos() lsproto.Position { @@ -55,14 +60,14 @@ func (m *Marker) FileName() string { return m.fileName } -func (m *Marker) GetMarker() *Marker { - return m +func (m *Marker) GetName() *string { + return m.Name } type MarkerOrRange interface { FileName() string LSPos() lsproto.Position - GetMarker() *Marker + GetName() *string } type TestData struct { @@ -244,14 +249,10 @@ func parseFileContent(fileName string, content string, fileOptions map[string]st rangeStart := openRanges[len(openRanges)-1] openRanges = openRanges[:len(openRanges)-1] - closedRange := &RangeMarker{Range: core.NewTextRange(rangeStart.position, (i-1)-difference)} - if rangeStart.marker != nil { - closedRange.Marker = rangeStart.marker - } else { - // A default RangeMarker is not added to list of markers. If the RangeMarker was created by parsing an actual marker within the range - // in the test file, then the marker should have been added to the marker list when the marker was parsed. - // Similarly, if the RangeMarker has a name, this means that there was a named marker parsed within the range (and has been already included in the marker list) - closedRange.Marker = &Marker{fileName: fileName} + closedRange := &RangeMarker{ + fileName: fileName, + Range: core.NewTextRange(rangeStart.position, (i-1)-difference), + Marker: rangeStart.marker, } rangeMarkers = append(rangeMarkers, closedRange) @@ -380,6 +381,13 @@ func parseFileContent(fileName string, content string, fileOptions map[string]st emit: emit, } + slices.SortStableFunc(rangeMarkers, func(a, b *RangeMarker) int { + if a.Range.Pos() != b.Range.Pos() { + return a.Range.Pos() - b.Range.Pos() + } + return b.Range.End() - a.Range.End() + }) + for _, marker := range markers { marker.LSPosition = converters.PositionToLineAndCharacter(testFileInfo, core.TextPos(marker.Position)) } diff --git a/internal/fourslash/tests/gen/commentsLinePreservation_test.go b/internal/fourslash/tests/gen/commentsLinePreservation_test.go index ff30730fb5..8b8cb30d01 100644 --- a/internal/fourslash/tests/gen/commentsLinePreservation_test.go +++ b/internal/fourslash/tests/gen/commentsLinePreservation_test.go @@ -13,39 +13,39 @@ func TestCommentsLinePreservation(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `/** This is firstLine * This is second Line - * + * * This is fourth Line */ var /*a*/a: string; -/** +/** * This is firstLine * This is second Line - * + * * This is fourth Line */ var /*b*/b: string; -/** +/** * This is firstLine * This is second Line - * + * * This is fourth Line * */ var /*c*/c: string; -/** +/** * This is firstLine * This is second Line * @param param * @random tag This should be third line */ function /*d*/d(param: string) { /*1*/param = "hello"; } -/** +/** * This is firstLine * This is second Line * @param param */ function /*e*/e(param: string) { /*2*/param = "hello"; } -/** +/** * This is firstLine * This is second Line * @param param1 first line of param @@ -54,7 +54,7 @@ function /*e*/e(param: string) { /*2*/param = "hello"; } * @random tag This should be third line */ function /*f*/f(param1: string) { /*3*/param1 = "hello"; } -/** +/** * This is firstLine * This is second Line * @param param1 @@ -63,7 +63,7 @@ function /*f*/f(param1: string) { /*3*/param1 = "hello"; } * @random tag This should be third line */ function /*g*/g(param1: string) { /*4*/param1 = "hello"; } -/** +/** * This is firstLine * This is second Line * @param param1 @@ -74,7 +74,7 @@ function /*g*/g(param1: string) { /*4*/param1 = "hello"; } * @random tag This should be third line */ function /*h*/h(param1: string) { /*5*/param1 = "hello"; } -/** +/** * This is firstLine * This is second Line * @param param1 @@ -85,7 +85,7 @@ function /*h*/h(param1: string) { /*5*/param1 = "hello"; } * */ function /*i*/i(param1: string) { /*6*/param1 = "hello"; } -/** +/** * This is firstLine * This is second Line * @param param1 @@ -95,28 +95,28 @@ function /*i*/i(param1: string) { /*6*/param1 = "hello"; } * param information third line */ function /*j*/j(param1: string) { /*7*/param1 = "hello"; } -/** +/** * This is firstLine * This is second Line - * @param param1 hello @randomtag + * @param param1 hello @randomtag * * random information first line * * random information third line */ function /*k*/k(param1: string) { /*8*/param1 = "hello"; } -/** +/** * This is firstLine * This is second Line * @param param1 first Line text * - * @param param1 + * @param param1 * - * blank line that shouldnt be shown when starting this + * blank line that shouldnt be shown when starting this * second time information about the param again */ function /*l*/l(param1: string) { /*9*/param1 = "hello"; } - /** + /** * This is firstLine This is second Line [1]: third * line diff --git a/internal/fourslash/tests/gen/completionAfterBrace_test.go b/internal/fourslash/tests/gen/completionAfterBrace_test.go index 9bfb94b058..db731e0b67 100644 --- a/internal/fourslash/tests/gen/completionAfterBrace_test.go +++ b/internal/fourslash/tests/gen/completionAfterBrace_test.go @@ -13,7 +13,7 @@ func TestCompletionAfterBrace(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = ` - }/**/ +}/**/ ` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ diff --git a/internal/fourslash/tests/gen/completionDetailsOfContextSensitiveParameterNoCrash_test.go b/internal/fourslash/tests/gen/completionDetailsOfContextSensitiveParameterNoCrash_test.go index 44adbe8bd4..9183835807 100644 --- a/internal/fourslash/tests/gen/completionDetailsOfContextSensitiveParameterNoCrash_test.go +++ b/internal/fourslash/tests/gen/completionDetailsOfContextSensitiveParameterNoCrash_test.go @@ -56,7 +56,7 @@ interface CurriedFunction4 { } declare var curry: { - (func: (t1: T1) => R, arity?: number): CurriedFunction1; + (func: (t1: T1) => R, arity?: number): CurriedFunction1; (func: (t1: T1, t2: T2) => R, arity?: number): CurriedFunction2; (func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): CurriedFunction3; (func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): CurriedFunction4; diff --git a/internal/fourslash/tests/gen/completionEntryAfterASIExpressionInClass_test.go b/internal/fourslash/tests/gen/completionEntryAfterASIExpressionInClass_test.go index 7e76fce8c7..02834c4360 100644 --- a/internal/fourslash/tests/gen/completionEntryAfterASIExpressionInClass_test.go +++ b/internal/fourslash/tests/gen/completionEntryAfterASIExpressionInClass_test.go @@ -19,13 +19,13 @@ func TestCompletionEntryAfterASIExpressionInClass(t *testing.T) { } class Child extends Parent { - // this assumes ASI, but on next line wants to + // this assumes ASI, but on next line wants to x = () => 1 - shoul/*insideid*/ + shoul/*insideid*/ } class ChildTwo extends Parent { - // this assumes ASI, but on next line wants to + // this assumes ASI, but on next line wants to x = () => 1 /*root*/ //nothing }` diff --git a/internal/fourslash/tests/gen/completionInJsDoc_test.go b/internal/fourslash/tests/gen/completionInJsDoc_test.go index d950da13fe..8fbf13f2aa 100644 --- a/internal/fourslash/tests/gen/completionInJsDoc_test.go +++ b/internal/fourslash/tests/gen/completionInJsDoc_test.go @@ -16,61 +16,61 @@ func TestCompletionInJsDoc(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @allowJs: true // @Filename: Foo.js - /** @/*1*/ */ - var v1; +/** @/*1*/ */ +var v1; - /** @p/*2*/ */ - var v2; +/** @p/*2*/ */ +var v2; - /** @param /*3*/ */ - var v3; +/** @param /*3*/ */ +var v3; - /** @param { n/*4*/ } bar */ - var v4; +/** @param { n/*4*/ } bar */ +var v4; - /** @type { n/*5*/ } */ - var v5; +/** @type { n/*5*/ } */ +var v5; - // @/*6*/ - var v6; +// @/*6*/ +var v6; - // @pa/*7*/ - var v7; +// @pa/*7*/ +var v7; - /** @return { n/*8*/ } */ - var v8; +/** @return { n/*8*/ } */ +var v8; - /** /*9*/ */ +/** /*9*/ */ - /** - /*10*/ +/** + /*10*/ +*/ + +/** + * /*11*/ */ - /** - * /*11*/ - */ +/** + /*12*/ + */ - /** - /*12*/ +/** + * /*13*/ */ - /** - * /*13*/ - */ - - /** - * some comment /*14*/ - */ +/** + * some comment /*14*/ + */ - /** - * @param /*15*/ - */ +/** + * @param /*15*/ + */ - /** @param /*16*/ */ +/** @param /*16*/ */ - /** - * jsdoc inline tag {@/*17*/} - */` +/** + * jsdoc inline tag {@/*17*/} + */` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/completionListAfterAnyType_test.go b/internal/fourslash/tests/gen/completionListAfterAnyType_test.go index cfd4308977..74c5858beb 100644 --- a/internal/fourslash/tests/gen/completionListAfterAnyType_test.go +++ b/internal/fourslash/tests/gen/completionListAfterAnyType_test.go @@ -12,13 +12,13 @@ func TestCompletionListAfterAnyType(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` declare class myString { - charAt(pos: number): string; - } + const content = `declare class myString { + charAt(pos: number): string; +} - function bar(a: myString) { - var x: any = a./**/ - }` +function bar(a: myString) { + var x: any = a./**/ +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/completionListAtInvalidLocations_test.go b/internal/fourslash/tests/gen/completionListAtInvalidLocations_test.go index 90b58dfe01..0a1673eb86 100644 --- a/internal/fourslash/tests/gen/completionListAtInvalidLocations_test.go +++ b/internal/fourslash/tests/gen/completionListAtInvalidLocations_test.go @@ -12,26 +12,26 @@ func TestCompletionListAtInvalidLocations(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` var v1 = ''; - " /*openString1*/ - var v2 = ''; - "/*openString2*/ - var v3 = ''; - " bar./*openString3*/ - var v4 = ''; - // bar./*inComment1*/ - var v6 = ''; - // /*inComment2*/ - var v7 = ''; - /* /*inComment3*/ - var v11 = ''; - // /*inComment4*/ - var v12 = ''; - type htm/*inTypeAlias*/ + const content = `var v1 = ''; +" /*openString1*/ +var v2 = ''; +"/*openString2*/ +var v3 = ''; +" bar./*openString3*/ +var v4 = ''; +// bar./*inComment1*/ +var v6 = ''; +// /*inComment2*/ +var v7 = ''; +/* /*inComment3*/ +var v11 = ''; + // /*inComment4*/ +var v12 = ''; +type htm/*inTypeAlias*/ - // /*inComment5*/ - foo; - var v10 = /reg/*inRegExp1*/ex/;` +// /*inComment5*/ +foo; +var v10 = /reg/*inRegExp1*/ex/;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, []string{"openString1", "openString2", "openString3"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteral5_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteral5_test.go index cd3b718ef1..d42c87dffe 100644 --- a/internal/fourslash/tests/gen/completionListInObjectLiteral5_test.go +++ b/internal/fourslash/tests/gen/completionListInObjectLiteral5_test.go @@ -12,7 +12,7 @@ func TestCompletionListInObjectLiteral5(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = `const o = 'something' + const content = `const o = 'something' const obj = { prop: o/*1*/, pro() { diff --git a/internal/fourslash/tests/gen/completionListPrivateNamesAccessors_test.go b/internal/fourslash/tests/gen/completionListPrivateNamesAccessors_test.go index 517f1aa377..ed3e92cd6d 100644 --- a/internal/fourslash/tests/gen/completionListPrivateNamesAccessors_test.go +++ b/internal/fourslash/tests/gen/completionListPrivateNamesAccessors_test.go @@ -12,34 +12,34 @@ func TestCompletionListPrivateNamesAccessors(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class Foo { - get #x() { return 1 }; - set #x(value: number) { }; - y() {}; - } - class Bar extends Foo { - get #z() { return 1 }; - set #z(value: number) { }; - t() {}; - l; - constructor() { - this./*1*/ - class Baz { - get #z() { return 1 }; - set #z(value: number) { }; - get #u() { return 1 }; - set #u(value: number) { }; - v() {}; - k; - constructor() { - this./*2*/ - new Bar()./*3*/ - } - } - } - } + const content = `class Foo { + get #x() { return 1 }; + set #x(value: number) { }; + y() {}; +} +class Bar extends Foo { + get #z() { return 1 }; + set #z(value: number) { }; + t() {}; + l; + constructor() { + this./*1*/ + class Baz { + get #z() { return 1 }; + set #z(value: number) { }; + get #u() { return 1 }; + set #u(value: number) { }; + v() {}; + k; + constructor() { + this./*2*/ + new Bar()./*3*/ + } + } + } +} - new Foo()./*4*/` +new Foo()./*4*/` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "1", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/completionListPrivateNamesMethods_test.go b/internal/fourslash/tests/gen/completionListPrivateNamesMethods_test.go index 1e17ec4cb2..f0800fb41c 100644 --- a/internal/fourslash/tests/gen/completionListPrivateNamesMethods_test.go +++ b/internal/fourslash/tests/gen/completionListPrivateNamesMethods_test.go @@ -12,28 +12,28 @@ func TestCompletionListPrivateNamesMethods(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class Foo { - #x() {}; - y() {}; - } - class Bar extends Foo { - #z() {}; - t() {}; - constructor() { - this./*1*/ - class Baz { - #z() {}; - #u() {}; - v() {}; - constructor() { - this./*2*/ - new Bar()./*3*/ - } - } - } - } + const content = `class Foo { + #x() {}; + y() {}; +} +class Bar extends Foo { + #z() {}; + t() {}; + constructor() { + this./*1*/ + class Baz { + #z() {}; + #u() {}; + v() {}; + constructor() { + this./*2*/ + new Bar()./*3*/ + } + } + } +} - new Foo()./*4*/` +new Foo()./*4*/` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "1", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/completions03_test.go b/internal/fourslash/tests/gen/completions03_test.go index 1545e2ff5e..e2a1f5b622 100644 --- a/internal/fourslash/tests/gen/completions03_test.go +++ b/internal/fourslash/tests/gen/completions03_test.go @@ -12,17 +12,17 @@ func TestCompletions03(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` interface Foo { - one: any; - two: any; - three: any; - } + const content = `interface Foo { + one: any; + two: any; + three: any; +} - let x: Foo = { - get one() { return "" }, - set two(t) {}, - /**/ - }` +let x: Foo = { + get one() { return "" }, + set two(t) {}, + /**/ +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/completionsImportDeclarationAttributesEmptyModuleSpecifier1_test.go b/internal/fourslash/tests/gen/completionsImportDeclarationAttributesEmptyModuleSpecifier1_test.go index ac124b371d..ed5d98fda7 100644 --- a/internal/fourslash/tests/gen/completionsImportDeclarationAttributesEmptyModuleSpecifier1_test.go +++ b/internal/fourslash/tests/gen/completionsImportDeclarationAttributesEmptyModuleSpecifier1_test.go @@ -14,7 +14,7 @@ func TestCompletionsImportDeclarationAttributesEmptyModuleSpecifier1(t *testing. defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @strict: true // @filename: global.d.ts -interface ImportAttributes { +interface ImportAttributes { type: "json"; } // @filename: index.ts diff --git a/internal/fourslash/tests/gen/completionsImportDeclarationAttributesErrorModuleSpecifier1_test.go b/internal/fourslash/tests/gen/completionsImportDeclarationAttributesErrorModuleSpecifier1_test.go index 3cf04cc102..a28bd4eca6 100644 --- a/internal/fourslash/tests/gen/completionsImportDeclarationAttributesErrorModuleSpecifier1_test.go +++ b/internal/fourslash/tests/gen/completionsImportDeclarationAttributesErrorModuleSpecifier1_test.go @@ -14,7 +14,7 @@ func TestCompletionsImportDeclarationAttributesErrorModuleSpecifier1(t *testing. defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @strict: true // @filename: global.d.ts -interface ImportAttributes { +interface ImportAttributes { type: "json"; } // @filename: index.ts diff --git a/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesEmptyModuleSpecifier1_test.go b/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesEmptyModuleSpecifier1_test.go index 4e464bc577..dd44976a05 100644 --- a/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesEmptyModuleSpecifier1_test.go +++ b/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesEmptyModuleSpecifier1_test.go @@ -16,7 +16,7 @@ func TestCompletionsJSDocImportTagAttributesEmptyModuleSpecifier1(t *testing.T) // @checkJs: true // @allowJs: true // @filename: global.d.ts -interface ImportAttributes { +interface ImportAttributes { type: "json"; } // @filename: index.js diff --git a/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesErrorModuleSpecifier1_test.go b/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesErrorModuleSpecifier1_test.go index 98c319a844..a357f7d617 100644 --- a/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesErrorModuleSpecifier1_test.go +++ b/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesErrorModuleSpecifier1_test.go @@ -16,7 +16,7 @@ func TestCompletionsJSDocImportTagAttributesErrorModuleSpecifier1(t *testing.T) // @checkJs: true // @allowJs: true // @filename: global.d.ts -interface ImportAttributes { +interface ImportAttributes { type: "json"; } // @filename: index.js diff --git a/internal/fourslash/tests/gen/completionsUnionStringLiteralProperty_test.go b/internal/fourslash/tests/gen/completionsUnionStringLiteralProperty_test.go index 256767bbc4..e2baf0b8cb 100644 --- a/internal/fourslash/tests/gen/completionsUnionStringLiteralProperty_test.go +++ b/internal/fourslash/tests/gen/completionsUnionStringLiteralProperty_test.go @@ -12,17 +12,17 @@ func TestCompletionsUnionStringLiteralProperty(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` type Foo = { a: 0, b: 'x' } | { a: 0, b: 'y' } | { a: 1, b: 'z' }; - const foo: Foo = { a: 0, b: '/*1*/' } + const content = `type Foo = { a: 0, b: 'x' } | { a: 0, b: 'y' } | { a: 1, b: 'z' }; +const foo: Foo = { a: 0, b: '/*1*/' } - type Bar = { a: 0, b: 'fx' } | { a: 0, b: 'fy' } | { a: 1, b: 'fz' }; - const bar: Bar = { a: 0, b: 'f/*2*/' } +type Bar = { a: 0, b: 'fx' } | { a: 0, b: 'fy' } | { a: 1, b: 'fz' }; +const bar: Bar = { a: 0, b: 'f/*2*/' } - type Baz = { x: 0, y: 0, z: 'a' } | { x: 0, y: 1, z: 'b' } | { x: 1, y: 0, z: 'c' } | { x: 1, y: 1, z: 'd' }; - const baz1: Baz = { z: '/*3*/' }; - const baz2: Baz = { x: 0, z: '/*4*/' }; - const baz3: Baz = { x: 0, y: 1, z: '/*5*/' }; - const baz4: Baz = { x: 2, y: 1, z: '/*6*/' };` +type Baz = { x: 0, y: 0, z: 'a' } | { x: 0, y: 1, z: 'b' } | { x: 1, y: 0, z: 'c' } | { x: 1, y: 1, z: 'd' }; +const baz1: Baz = { z: '/*3*/' }; +const baz2: Baz = { x: 0, z: '/*4*/' }; +const baz3: Baz = { x: 0, y: 1, z: '/*5*/' }; +const baz4: Baz = { x: 2, y: 1, z: '/*6*/' };` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "1", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/completionsWithDeprecatedTag1_test.go b/internal/fourslash/tests/gen/completionsWithDeprecatedTag1_test.go index 05fff1596e..2b8d217bf3 100644 --- a/internal/fourslash/tests/gen/completionsWithDeprecatedTag1_test.go +++ b/internal/fourslash/tests/gen/completionsWithDeprecatedTag1_test.go @@ -16,24 +16,24 @@ func TestCompletionsWithDeprecatedTag1(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @strict: true // @filename: /foobar.ts - /** @deprecated */ - export function foobar() {} +/** @deprecated */ +export function foobar() {} // @filename: /foo.ts - import { foobar/*4*/ } from "./foobar"; +import { foobar/*4*/ } from "./foobar"; - /** @deprecated */ - interface Foo { - /** @deprecated */ - bar(): void - /** @deprecated */ - prop: number - } - declare const foo: Foo; - declare const foooo: Fo/*1*/; - foo.ba/*2*/; - foo.pro/*3*/; +/** @deprecated */ +interface Foo { + /** @deprecated */ + bar(): void + /** @deprecated */ + prop: number +} +declare const foo: Foo; +declare const foooo: Fo/*1*/; +foo.ba/*2*/; +foo.pro/*3*/; - fooba/*5*/;` +fooba/*5*/;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "1", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/completionsWithOverride1_test.go b/internal/fourslash/tests/gen/completionsWithOverride1_test.go index b4dc432544..e6e2333353 100644 --- a/internal/fourslash/tests/gen/completionsWithOverride1_test.go +++ b/internal/fourslash/tests/gen/completionsWithOverride1_test.go @@ -13,7 +13,7 @@ func TestCompletionsWithOverride1(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `class A { - foo () {} + foo () {} bar () {} } class B extends A { diff --git a/internal/fourslash/tests/gen/completionsWithOverride2_test.go b/internal/fourslash/tests/gen/completionsWithOverride2_test.go index 544af7304d..a20428cedb 100644 --- a/internal/fourslash/tests/gen/completionsWithOverride2_test.go +++ b/internal/fourslash/tests/gen/completionsWithOverride2_test.go @@ -16,7 +16,7 @@ func TestCompletionsWithOverride2(t *testing.T) { baz () {} } class A { - foo () {} + foo () {} bar () {} } class B extends A implements I { diff --git a/internal/fourslash/tests/gen/completionsWritingSpreadArgument_test.go b/internal/fourslash/tests/gen/completionsWritingSpreadArgument_test.go index 44e2f3467a..b922cd01bb 100644 --- a/internal/fourslash/tests/gen/completionsWritingSpreadArgument_test.go +++ b/internal/fourslash/tests/gen/completionsWritingSpreadArgument_test.go @@ -13,7 +13,7 @@ func TestCompletionsWritingSpreadArgument(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = ` - const [] = [Math.min(./*marker*/)] +const [] = [Math.min(./*marker*/)] ` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.GoToMarker(t, "marker") diff --git a/internal/fourslash/tests/gen/contextualTypingOfGenericCallSignatures1_test.go b/internal/fourslash/tests/gen/contextualTypingOfGenericCallSignatures1_test.go index a16399fd45..fcb3b44190 100644 --- a/internal/fourslash/tests/gen/contextualTypingOfGenericCallSignatures1_test.go +++ b/internal/fourslash/tests/gen/contextualTypingOfGenericCallSignatures1_test.go @@ -14,7 +14,7 @@ func TestContextualTypingOfGenericCallSignatures1(t *testing.T) { const content = `var f24: { (x: T): U }; -// x should not be contextually typed +// x should not be contextually typed var f24 = (/**/x) => { return 1 };` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "", "(parameter) x: any", "") diff --git a/internal/fourslash/tests/gen/doubleUnderscoreRenames_test.go b/internal/fourslash/tests/gen/doubleUnderscoreRenames_test.go new file mode 100644 index 0000000000..3f3798d238 --- /dev/null +++ b/internal/fourslash/tests/gen/doubleUnderscoreRenames_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestDoubleUnderscoreRenames(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: fileA.ts +[|export function [|{| "contextRangeIndex": 0 |}__foo|]() { +}|] + +// @Filename: fileB.ts +[|import { [|{| "contextRangeIndex": 2 |}__foo|] as bar } from "./fileA";|] + +bar();` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "__foo") +} diff --git a/internal/fourslash/tests/gen/emptyArrayInference_test.go b/internal/fourslash/tests/gen/emptyArrayInference_test.go index dd91394879..53e2c32d49 100644 --- a/internal/fourslash/tests/gen/emptyArrayInference_test.go +++ b/internal/fourslash/tests/gen/emptyArrayInference_test.go @@ -11,7 +11,7 @@ func TestEmptyArrayInference(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = `var x/*1*/x = true ? [1] : [undefined]; + const content = `var x/*1*/x = true ? [1] : [undefined]; var y/*2*/y = true ? [1] : [];` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "var xx: number[]", "") diff --git a/internal/fourslash/tests/gen/excessivelyLargeArrayLiteralCompletions_test.go b/internal/fourslash/tests/gen/excessivelyLargeArrayLiteralCompletions_test.go index 32e2a6d8e3..17e408ad7c 100644 --- a/internal/fourslash/tests/gen/excessivelyLargeArrayLiteralCompletions_test.go +++ b/internal/fourslash/tests/gen/excessivelyLargeArrayLiteralCompletions_test.go @@ -16,8 +16,8 @@ func TestExcessivelyLargeArrayLiteralCompletions(t *testing.T) { Route exported from CloudMade; Map data used is Copyright (c) OpenStreetMap contributors 2010 - OpenStreetMap® is open data, licensed under the - Open Data Commons Open Database License (ODbL) by + OpenStreetMap® is open data, licensed under the + Open Data Commons Open Database License (ODbL) by the OpenStreetMap Foundation (OSMF). See full license: https://www.openstreetmap.org/copyright diff --git a/internal/fourslash/tests/gen/findAllReferencesDynamicImport2_test.go b/internal/fourslash/tests/gen/findAllReferencesDynamicImport2_test.go new file mode 100644 index 0000000000..227dfa1255 --- /dev/null +++ b/internal/fourslash/tests/gen/findAllReferencesDynamicImport2_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestFindAllReferencesDynamicImport2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: foo.ts +[|export function /*1*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}bar|]() { return "bar"; }|] +var x = import("./foo"); +x.then(foo => { + foo./*2*/[|bar|](); +})` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineFindAllReferences(t, "1", "2") + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "bar") +} diff --git a/internal/fourslash/tests/gen/findAllReferencesDynamicImport3_test.go b/internal/fourslash/tests/gen/findAllReferencesDynamicImport3_test.go new file mode 100644 index 0000000000..0a53745cb5 --- /dev/null +++ b/internal/fourslash/tests/gen/findAllReferencesDynamicImport3_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestFindAllReferencesDynamicImport3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: foo.ts +[|export function /*0*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}bar|]() { return "bar"; }|] +import('./foo').then(([|{ /*1*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}bar|] }|]) => undefined);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineFindAllReferences(t, "0", "1") + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[3]) +} diff --git a/internal/fourslash/tests/gen/findAllReferencesJsOverloadedFunctionParameter_test.go b/internal/fourslash/tests/gen/findAllReferencesJsOverloadedFunctionParameter_test.go index d5f3537436..1bb7d4dc0a 100644 --- a/internal/fourslash/tests/gen/findAllReferencesJsOverloadedFunctionParameter_test.go +++ b/internal/fourslash/tests/gen/findAllReferencesJsOverloadedFunctionParameter_test.go @@ -21,10 +21,10 @@ func TestFindAllReferencesJsOverloadedFunctionParameter(t *testing.T) { * * @overload * @param {string} x - * @returns {string} + * @returns {string} * * @param {unknown} x - * @returns {unknown} + * @returns {unknown} */ function foo(x/*1*/) { return x; diff --git a/internal/fourslash/tests/gen/findAllRefsClassWithStaticThisAccess_test.go b/internal/fourslash/tests/gen/findAllRefsClassWithStaticThisAccess_test.go new file mode 100644 index 0000000000..610e388639 --- /dev/null +++ b/internal/fourslash/tests/gen/findAllRefsClassWithStaticThisAccess_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestFindAllRefsClassWithStaticThisAccess(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|class /*0*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}C|] { + static s() { + /*1*/[|this|]; + } + static get f() { + return /*2*/[|this|]; + + function inner() { this; } + class Inner { x = this; } + } +}|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineFindAllReferences(t, "0", "1", "2") + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1]) +} diff --git a/internal/fourslash/tests/gen/findAllRefsInheritedProperties1_test.go b/internal/fourslash/tests/gen/findAllRefsInheritedProperties1_test.go index 217a55284e..aee4b2e077 100644 --- a/internal/fourslash/tests/gen/findAllRefsInheritedProperties1_test.go +++ b/internal/fourslash/tests/gen/findAllRefsInheritedProperties1_test.go @@ -11,14 +11,14 @@ func TestFindAllRefsInheritedProperties1(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class class1 extends class1 { - /*1*/doStuff() { } - /*2*/propName: string; - } + const content = `class class1 extends class1 { + /*1*/doStuff() { } + /*2*/propName: string; +} - var v: class1; - v./*3*/doStuff(); - v./*4*/propName;` +var v: class1; +v./*3*/doStuff(); +v./*4*/propName;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4") } diff --git a/internal/fourslash/tests/gen/findAllRefsInheritedProperties2_test.go b/internal/fourslash/tests/gen/findAllRefsInheritedProperties2_test.go index deb24b7092..d32bae90e9 100644 --- a/internal/fourslash/tests/gen/findAllRefsInheritedProperties2_test.go +++ b/internal/fourslash/tests/gen/findAllRefsInheritedProperties2_test.go @@ -11,14 +11,14 @@ func TestFindAllRefsInheritedProperties2(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` interface interface1 extends interface1 { - /*1*/doStuff(): void; // r0 - /*2*/propName: string; // r1 - } + const content = `interface interface1 extends interface1 { + /*1*/doStuff(): void; // r0 + /*2*/propName: string; // r1 +} - var v: interface1; - v./*3*/doStuff(); // r2 - v./*4*/propName; // r3` +var v: interface1; +v./*3*/doStuff(); // r2 +v./*4*/propName; // r3` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4") } diff --git a/internal/fourslash/tests/gen/findAllRefsInheritedProperties3_test.go b/internal/fourslash/tests/gen/findAllRefsInheritedProperties3_test.go index dfd454127b..577bbac1f9 100644 --- a/internal/fourslash/tests/gen/findAllRefsInheritedProperties3_test.go +++ b/internal/fourslash/tests/gen/findAllRefsInheritedProperties3_test.go @@ -11,22 +11,22 @@ func TestFindAllRefsInheritedProperties3(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class class1 extends class1 { - [|/*0*/doStuff() { }|] - [|/*1*/propName: string;|] - } - interface interface1 extends interface1 { - [|/*2*/doStuff(): void;|] - [|/*3*/propName: string;|] - } - class class2 extends class1 implements interface1 { - [|/*4*/doStuff() { }|] - [|/*5*/propName: string;|] - } + const content = `class class1 extends class1 { + [|/*0*/doStuff() { }|] + [|/*1*/propName: string;|] +} +interface interface1 extends interface1 { + [|/*2*/doStuff(): void;|] + [|/*3*/propName: string;|] +} +class class2 extends class1 implements interface1 { + [|/*4*/doStuff() { }|] + [|/*5*/propName: string;|] +} - var v: class2; - v./*6*/doStuff(); - v./*7*/propName;` +var v: class2; +v./*6*/doStuff(); +v./*7*/propName;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "0", "1", "2", "3", "4", "6", "5", "7") } diff --git a/internal/fourslash/tests/gen/findAllRefsInheritedProperties4_test.go b/internal/fourslash/tests/gen/findAllRefsInheritedProperties4_test.go index dd73c27523..a2ef46c64b 100644 --- a/internal/fourslash/tests/gen/findAllRefsInheritedProperties4_test.go +++ b/internal/fourslash/tests/gen/findAllRefsInheritedProperties4_test.go @@ -11,18 +11,18 @@ func TestFindAllRefsInheritedProperties4(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` interface C extends D { - /*0*/prop0: string; - /*1*/prop1: number; - } + const content = `interface C extends D { + /*0*/prop0: string; + /*1*/prop1: number; +} - interface D extends C { - /*2*/prop0: string; - } +interface D extends C { + /*2*/prop0: string; +} - var d: D; - d./*3*/prop0; - d./*4*/prop1;` +var d: D; +d./*3*/prop0; +d./*4*/prop1;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "0", "2", "3", "1", "4") } diff --git a/internal/fourslash/tests/gen/findAllRefsInheritedProperties5_test.go b/internal/fourslash/tests/gen/findAllRefsInheritedProperties5_test.go index 5bc90a3d9a..6a6481ab36 100644 --- a/internal/fourslash/tests/gen/findAllRefsInheritedProperties5_test.go +++ b/internal/fourslash/tests/gen/findAllRefsInheritedProperties5_test.go @@ -11,18 +11,18 @@ func TestFindAllRefsInheritedProperties5(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class C extends D { - /*0*/prop0: string; - /*1*/prop1: number; - } + const content = `class C extends D { + /*0*/prop0: string; + /*1*/prop1: number; +} - class D extends C { - /*2*/prop0: string; - } +class D extends C { + /*2*/prop0: string; +} - var d: D; - d./*3*/prop0; - d./*4*/prop1;` +var d: D; +d./*3*/prop0; +d./*4*/prop1;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "0", "1", "2", "3", "4") } diff --git a/internal/fourslash/tests/gen/findAllRefsOnImportAliases2_test.go b/internal/fourslash/tests/gen/findAllRefsOnImportAliases2_test.go new file mode 100644 index 0000000000..ed3a5c0dc3 --- /dev/null +++ b/internal/fourslash/tests/gen/findAllRefsOnImportAliases2_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestFindAllRefsOnImportAliases2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: a.ts +[|export class /*class0*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}Class|] {}|] +//@Filename: b.ts +[|import { /*class1*/[|{| "contextRangeIndex": 2 |}Class|] as /*c2_0*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}C2|] } from "./a";|] +var c = new /*c2_1*/[|C2|](); +//@Filename: c.ts +[|export { /*class2*/[|{| "contextRangeIndex": 6 |}Class|] as /*c3*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 6 |}C3|] } from "./a";|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineFindAllReferences(t, "class0", "class1", "class2", "c2_0", "c2_1", "c3") + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "Class", "C2", "C3") +} diff --git a/internal/fourslash/tests/gen/findAllRefsWithShorthandPropertyAssignment2_test.go b/internal/fourslash/tests/gen/findAllRefsWithShorthandPropertyAssignment2_test.go index 0f95e39d3f..413e283810 100644 --- a/internal/fourslash/tests/gen/findAllRefsWithShorthandPropertyAssignment2_test.go +++ b/internal/fourslash/tests/gen/findAllRefsWithShorthandPropertyAssignment2_test.go @@ -11,14 +11,14 @@ func TestFindAllRefsWithShorthandPropertyAssignment2(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` var /*0*/dx = "Foo"; + const content = `var /*0*/dx = "Foo"; - module M { export var /*1*/dx; } - module M { - var z = 100; - export var y = { /*2*/dx, z }; - } - M.y./*3*/dx;` +module M { export var /*1*/dx; } +module M { + var z = 100; + export var y = { /*2*/dx, z }; +} +M.y./*3*/dx;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "0", "1", "2", "3") } diff --git a/internal/fourslash/tests/gen/findAllRefsWithShorthandPropertyAssignment_test.go b/internal/fourslash/tests/gen/findAllRefsWithShorthandPropertyAssignment_test.go index b3d83a5d77..d2620643e5 100644 --- a/internal/fourslash/tests/gen/findAllRefsWithShorthandPropertyAssignment_test.go +++ b/internal/fourslash/tests/gen/findAllRefsWithShorthandPropertyAssignment_test.go @@ -11,11 +11,11 @@ func TestFindAllRefsWithShorthandPropertyAssignment(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` var /*0*/name = "Foo"; + const content = `var /*0*/name = "Foo"; - var obj = { /*1*/name }; - var obj1 = { /*2*/name: /*3*/name }; - obj./*4*/name;` +var obj = { /*1*/name }; +var obj1 = { /*2*/name: /*3*/name }; +obj./*4*/name;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "0", "3", "1", "2", "4") } diff --git a/internal/fourslash/tests/gen/genericCallSignaturesInNonGenericTypes1_test.go b/internal/fourslash/tests/gen/genericCallSignaturesInNonGenericTypes1_test.go index 02086763f5..92c5b5f542 100644 --- a/internal/fourslash/tests/gen/genericCallSignaturesInNonGenericTypes1_test.go +++ b/internal/fourslash/tests/gen/genericCallSignaturesInNonGenericTypes1_test.go @@ -19,7 +19,7 @@ interface Underscore { } var _: Underscore; var a: number[]; -var /**/b = _(a); ` +var /**/b = _(a);` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "", "var b: WrappedArray", "") } diff --git a/internal/fourslash/tests/gen/genericCombinatorWithConstraints1_test.go b/internal/fourslash/tests/gen/genericCombinatorWithConstraints1_test.go index 289cad2512..794cdadc2c 100644 --- a/internal/fourslash/tests/gen/genericCombinatorWithConstraints1_test.go +++ b/internal/fourslash/tests/gen/genericCombinatorWithConstraints1_test.go @@ -13,7 +13,7 @@ func TestGenericCombinatorWithConstraints1(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `function apply(source: T[], selector: (x: T) => U) { var /*1*/xs = source.map(selector); // any[] - var /*2*/xs2 = source.map((x: T, a, b): U => { return null }); // any[] + var /*2*/xs2 = source.map((x: T, a, b): U => { return null }); // any[] }` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "(local var) xs: U[]", "") diff --git a/internal/fourslash/tests/gen/genericTypeAliasIntersectionCompletions_test.go b/internal/fourslash/tests/gen/genericTypeAliasIntersectionCompletions_test.go index cfa4db116a..7bc5b1e10b 100644 --- a/internal/fourslash/tests/gen/genericTypeAliasIntersectionCompletions_test.go +++ b/internal/fourslash/tests/gen/genericTypeAliasIntersectionCompletions_test.go @@ -12,33 +12,33 @@ func TestGenericTypeAliasIntersectionCompletions(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` type MixinCtor = new () => A & B & { constructor: MixinCtor }; - function merge(a: { prototype: A }, b: { prototype: B }): MixinCtor { - let merged = function() { } - Object.assign(merged.prototype, a.prototype, b.prototype); - return >merged; - } - - class TreeNode { - value: any; - } - - abstract class LeftSideNode extends TreeNode { - abstract right(): TreeNode; - left(): TreeNode { - return null; - } - } - - abstract class RightSideNode extends TreeNode { - abstract left(): TreeNode; - right(): TreeNode { - return null; - }; - } - - var obj = new (merge(LeftSideNode, RightSideNode))(); - obj./**/` + const content = `type MixinCtor = new () => A & B & { constructor: MixinCtor }; +function merge(a: { prototype: A }, b: { prototype: B }): MixinCtor { + let merged = function() { } + Object.assign(merged.prototype, a.prototype, b.prototype); + return >merged; +} + +class TreeNode { + value: any; +} + +abstract class LeftSideNode extends TreeNode { + abstract right(): TreeNode; + left(): TreeNode { + return null; + } +} + +abstract class RightSideNode extends TreeNode { + abstract left(): TreeNode; + right(): TreeNode { + return null; + }; +} + +var obj = new (merge(LeftSideNode, RightSideNode))(); +obj./**/` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/genericWithSpecializedProperties2_test.go b/internal/fourslash/tests/gen/genericWithSpecializedProperties2_test.go index bd789b939f..c70edfea61 100644 --- a/internal/fourslash/tests/gen/genericWithSpecializedProperties2_test.go +++ b/internal/fourslash/tests/gen/genericWithSpecializedProperties2_test.go @@ -16,11 +16,11 @@ func TestGenericWithSpecializedProperties2(t *testing.T) { x: Foo; } var f: Foo; -var /*1*/x = f.x; -var /*2*/y = f.y; +var /*1*/x = f.x; +var /*2*/y = f.y; var f2: Foo; -var /*3*/x2 = f2.x; -var /*4*/y2 = f2.y; ` +var /*3*/x2 = f2.x; +var /*4*/y2 = f2.y;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "var x: Foo", "") f.VerifyQuickInfoAt(t, "2", "var y: Foo", "") diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions20_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions20_test.go index bca25cd83a..498828b7f8 100644 --- a/internal/fourslash/tests/gen/getJavaScriptCompletions20_test.go +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions20_test.go @@ -16,20 +16,20 @@ func TestGetJavaScriptCompletions20(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @allowNonTsExtensions: true // @Filename: file.js - /** - * A person - * @constructor - * @param {string} name - The name of the person. - * @param {number} age - The age of the person. - */ - function Person(name, age) { - this.name = name; - this.age = age; - } +/** + * A person + * @constructor + * @param {string} name - The name of the person. + * @param {number} age - The age of the person. + */ +function Person(name, age) { + this.name = name; + this.age = age; +} - Person.getName = 10; - Person.getNa/**/ = 10;` +Person.getName = 10; +Person.getNa/**/ = 10;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/getJavaScriptGlobalCompletions1_test.go b/internal/fourslash/tests/gen/getJavaScriptGlobalCompletions1_test.go index 2bfa0fd883..2319d3d19a 100644 --- a/internal/fourslash/tests/gen/getJavaScriptGlobalCompletions1_test.go +++ b/internal/fourslash/tests/gen/getJavaScriptGlobalCompletions1_test.go @@ -16,15 +16,15 @@ func TestGetJavaScriptGlobalCompletions1(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @allowNonTsExtensions: true // @Filename: Foo.js - function f() { - // helloWorld leaks from here into the global space? - if (helloWorld) { - return 3; - } - return 5; - } +function f() { + // helloWorld leaks from here into the global space? + if (helloWorld) { + return 3; + } + return 5; +} - hello/**/` +hello/**/` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, nil, &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/getJavaScriptQuickInfo8_test.go b/internal/fourslash/tests/gen/getJavaScriptQuickInfo8_test.go index 36185ff9e7..d72a4462b2 100644 --- a/internal/fourslash/tests/gen/getJavaScriptQuickInfo8_test.go +++ b/internal/fourslash/tests/gen/getJavaScriptQuickInfo8_test.go @@ -15,22 +15,22 @@ func TestGetJavaScriptQuickInfo8(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @allowNonTsExtensions: true // @Filename: file.js - let x = { - /** @type {number} */ - get m() { - return undefined; - } - } - x.m/*1*/; +let x = { + /** @type {number} */ + get m() { + return undefined; + } +} +x.m/*1*/; - class Foo { - /** @type {string} */ - get b() { - return undefined; - } - } - var y = new Foo(); - y.b/*2*/;` +class Foo { + /** @type {string} */ + get b() { + return undefined; + } +} +var y = new Foo(); +y.b/*2*/;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.GoToMarker(t, "1") f.Insert(t, ".") diff --git a/internal/fourslash/tests/gen/getRenameInfoTests1_test.go b/internal/fourslash/tests/gen/getRenameInfoTests1_test.go new file mode 100644 index 0000000000..bfb7b4bea1 --- /dev/null +++ b/internal/fourslash/tests/gen/getRenameInfoTests1_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetRenameInfoTests1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class [|/**/C|] { + +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/getRenameInfoTests2_test.go b/internal/fourslash/tests/gen/getRenameInfoTests2_test.go new file mode 100644 index 0000000000..f8ec27690e --- /dev/null +++ b/internal/fourslash/tests/gen/getRenameInfoTests2_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetRenameInfoTests2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class C /**/extends null { + +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameFailed(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/goToDefinitionDynamicImport2_test.go b/internal/fourslash/tests/gen/goToDefinitionDynamicImport2_test.go index 9806c5971c..36717ef177 100644 --- a/internal/fourslash/tests/gen/goToDefinitionDynamicImport2_test.go +++ b/internal/fourslash/tests/gen/goToDefinitionDynamicImport2_test.go @@ -15,7 +15,7 @@ func TestGoToDefinitionDynamicImport2(t *testing.T) { export function /*Destination*/bar() { return "bar"; } var x = import("./foo"); x.then(foo => { - foo.[|b/*1*/ar|](); + foo.[|b/*1*/ar|](); })` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "1") diff --git a/internal/fourslash/tests/gen/goToDefinitionModifiers_test.go b/internal/fourslash/tests/gen/goToDefinitionModifiers_test.go index 96c7d72f9f..8c8a7b6493 100644 --- a/internal/fourslash/tests/gen/goToDefinitionModifiers_test.go +++ b/internal/fourslash/tests/gen/goToDefinitionModifiers_test.go @@ -12,20 +12,20 @@ func TestGoToDefinitionModifiers(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @Filename: /a.ts - /*export*/export class A/*A*/ { - - /*private*/private z/*z*/: string; - - /*readonly*/readonly x/*x*/: string; - - /*async*/async a/*a*/() { } - - /*override*/override b/*b*/() {} - - /*public1*/public/*public2*/ as/*multipleModifiers*/ync c/*c*/() { } - } - - exp/*exportFunction*/ort function foo/*foo*/() { }` +/*export*/export class A/*A*/ { + + /*private*/private z/*z*/: string; + + /*readonly*/readonly x/*x*/: string; + + /*async*/async a/*a*/() { } + + /*override*/override b/*b*/() {} + + /*public1*/public/*public2*/ as/*multipleModifiers*/ync c/*c*/() { } +} + +exp/*exportFunction*/ort function foo/*foo*/() { }` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "export", "A", "private", "z", "readonly", "x", "async", "a", "override", "b", "public1", "public2", "multipleModifiers", "c", "exportFunction", "foo") } diff --git a/internal/fourslash/tests/gen/goToDefinitionPropertyAssignment_test.go b/internal/fourslash/tests/gen/goToDefinitionPropertyAssignment_test.go index bb461b9ddc..9efc4ab81d 100644 --- a/internal/fourslash/tests/gen/goToDefinitionPropertyAssignment_test.go +++ b/internal/fourslash/tests/gen/goToDefinitionPropertyAssignment_test.go @@ -11,12 +11,12 @@ func TestGoToDefinitionPropertyAssignment(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` export const /*FunctionResult*/Component = () => { return "OK"} - Component./*PropertyResult*/displayName = 'Component' + const content = `export const /*FunctionResult*/Component = () => { return "OK"} +Component./*PropertyResult*/displayName = 'Component' - [|/*FunctionClick*/Component|] +[|/*FunctionClick*/Component|] - Component.[|/*PropertyClick*/displayName|]` +Component.[|/*PropertyClick*/displayName|]` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "FunctionClick", "PropertyClick") } diff --git a/internal/fourslash/tests/gen/goToDefinitionSwitchCase4_test.go b/internal/fourslash/tests/gen/goToDefinitionSwitchCase4_test.go index 58046740af..0367913533 100644 --- a/internal/fourslash/tests/gen/goToDefinitionSwitchCase4_test.go +++ b/internal/fourslash/tests/gen/goToDefinitionSwitchCase4_test.go @@ -11,13 +11,13 @@ func TestGoToDefinitionSwitchCase4(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` switch (null) { - case null: break; - } + const content = ` switch (null) { + case null: break; + } - switch (null) { - [|/*start*/case|] null: break; - }` + switch (null) { + [|/*start*/case|] null: break; + }` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "start") } diff --git a/internal/fourslash/tests/gen/highlightsForExportFromUnfoundModule_test.go b/internal/fourslash/tests/gen/highlightsForExportFromUnfoundModule_test.go new file mode 100644 index 0000000000..24acc5ac06 --- /dev/null +++ b/internal/fourslash/tests/gen/highlightsForExportFromUnfoundModule_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestHighlightsForExportFromUnfoundModule(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +import foo from 'unfound'; +export { + foo, +}; +// @Filename: b.js +export { + /**/foo +} from './a';` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/insertMethodCallAboveOthers_test.go b/internal/fourslash/tests/gen/insertMethodCallAboveOthers_test.go index 06c77c0f3b..c377d01b98 100644 --- a/internal/fourslash/tests/gen/insertMethodCallAboveOthers_test.go +++ b/internal/fourslash/tests/gen/insertMethodCallAboveOthers_test.go @@ -11,7 +11,7 @@ func TestInsertMethodCallAboveOthers(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = `/**/ + const content = `/**/ paired.reduce(); paired.map(() => undefined);` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) diff --git a/internal/fourslash/tests/gen/javaScriptClass2_test.go b/internal/fourslash/tests/gen/javaScriptClass2_test.go new file mode 100644 index 0000000000..f892e00c54 --- /dev/null +++ b/internal/fourslash/tests/gen/javaScriptClass2_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJavaScriptClass2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +class Foo { + constructor() { + [|this.[|{| "contextRangeIndex": 0 |}union|] = 'foo';|] + [|this.[|{| "contextRangeIndex": 2 |}union|] = 100;|] + } + method() { return this.[|union|]; } +} +var x = new Foo(); +x.[|union|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "union") +} diff --git a/internal/fourslash/tests/gen/javaScriptModulesError1_test.go b/internal/fourslash/tests/gen/javaScriptModulesError1_test.go index e37b7d41be..2b1ae3443e 100644 --- a/internal/fourslash/tests/gen/javaScriptModulesError1_test.go +++ b/internal/fourslash/tests/gen/javaScriptModulesError1_test.go @@ -14,7 +14,7 @@ func TestJavaScriptModulesError1(t *testing.T) { const content = `// @allowNonTsExtensions: true // @Filename: Foo.js define('mod1', ['a'], /**/function(a, b) { - + });` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.GoToMarker(t, "") diff --git a/internal/fourslash/tests/gen/jsDocFunctionSignatures3_test.go b/internal/fourslash/tests/gen/jsDocFunctionSignatures3_test.go index 4fb93ea5ba..d02f2ddd38 100644 --- a/internal/fourslash/tests/gen/jsDocFunctionSignatures3_test.go +++ b/internal/fourslash/tests/gen/jsDocFunctionSignatures3_test.go @@ -15,23 +15,23 @@ func TestJsDocFunctionSignatures3(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @allowNonTsExtensions: true // @Filename: Foo.js - var someObject = { - /** - * @param {string} param1 Some string param. - * @param {number} parm2 Some number param. - */ - someMethod: function(param1, param2) { - console.log(param1/*1*/); - return false; - }, - /** - * @param {number} p1 Some number param. - */ - otherMethod(p1) { - p1/*2*/ - } +var someObject = { + /** + * @param {string} param1 Some string param. + * @param {number} parm2 Some number param. + */ + someMethod: function(param1, param2) { + console.log(param1/*1*/); + return false; + }, + /** + * @param {number} p1 Some number param. + */ + otherMethod(p1) { + p1/*2*/ + } - };` +};` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.GoToMarker(t, "1") f.Insert(t, ".") diff --git a/internal/fourslash/tests/gen/jsDocGenerics1_test.go b/internal/fourslash/tests/gen/jsDocGenerics1_test.go index 5c4dc4501b..067835f753 100644 --- a/internal/fourslash/tests/gen/jsDocGenerics1_test.go +++ b/internal/fourslash/tests/gen/jsDocGenerics1_test.go @@ -15,24 +15,24 @@ func TestJsDocGenerics1(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @allowNonTsExtensions: true // @Filename: ref.d.ts - namespace Thing { - export interface Thung { - a: number; - ] - ] +namespace Thing { + export interface Thung { + a: number; + ] +] // @Filename: Foo.js - /** @type {Array} */ - var v; - v[0]./*1*/ +/** @type {Array} */ +var v; +v[0]./*1*/ - /** @type {{x: Array>}} */ - var w; - w.x[0][0]./*2*/ +/** @type {{x: Array>}} */ +var w; +w.x[0][0]./*2*/ - /** @type {Array} */ - var x; - x[0].a./*3*/` +/** @type {Array} */ +var x; +x[0].a./*3*/` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, f.Markers(), &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/jsDocPropertyDescription1_test.go b/internal/fourslash/tests/gen/jsDocPropertyDescription1_test.go index 78ae5c2eec..5d89bd3ee7 100644 --- a/internal/fourslash/tests/gen/jsDocPropertyDescription1_test.go +++ b/internal/fourslash/tests/gen/jsDocPropertyDescription1_test.go @@ -13,13 +13,13 @@ func TestJsDocPropertyDescription1(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `interface StringExample { /** Something generic */ - [p: string]: any; + [p: string]: any; /** Something specific */ property: number; } function stringExample(e: StringExample) { console.log(e./*property*/property); - console.log(e./*string*/anything); + console.log(e./*string*/anything); }` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "property", "(property) StringExample.property: number", "Something specific") diff --git a/internal/fourslash/tests/gen/jsDocPropertyDescription9_test.go b/internal/fourslash/tests/gen/jsDocPropertyDescription9_test.go index ece23930bc..27f7acce06 100644 --- a/internal/fourslash/tests/gen/jsDocPropertyDescription9_test.go +++ b/internal/fourslash/tests/gen/jsDocPropertyDescription9_test.go @@ -18,7 +18,7 @@ func TestJsDocPropertyDescription9(t *testing.T) { static [key: ` + "`" + `prefix${number}` + "`" + `]: number; } function literalClass(e: typeof LiteralClass) { - console.log(e./*literal1Class*/prefixMember); + console.log(e./*literal1Class*/prefixMember); console.log(e./*literal2Class*/anything); console.log(e./*literal3Class*/prefix0); }` diff --git a/internal/fourslash/tests/gen/jsDocSee_rename1_test.go b/internal/fourslash/tests/gen/jsDocSee_rename1_test.go new file mode 100644 index 0000000000..cb5e02fa38 --- /dev/null +++ b/internal/fourslash/tests/gen/jsDocSee_rename1_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsDocSee_rename1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|interface [|{| "contextRangeIndex": 0 |}A|] {}|] +/** + * @see {[|A|]} + */ +declare const a: [|A|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, ToAny(f.Ranges()[1:])...) +} diff --git a/internal/fourslash/tests/gen/jsDocTypedefQuickInfo1_test.go b/internal/fourslash/tests/gen/jsDocTypedefQuickInfo1_test.go index f4a36af122..77cfe192ab 100644 --- a/internal/fourslash/tests/gen/jsDocTypedefQuickInfo1_test.go +++ b/internal/fourslash/tests/gen/jsDocTypedefQuickInfo1_test.go @@ -19,7 +19,7 @@ func TestJsDocTypedefQuickInfo1(t *testing.T) { * @property {string=} y * @property {string} [z] * @property {string} [w="hi"] - * + * * @param {Opts} opts */ function foo(/*1*/opts) { @@ -32,7 +32,7 @@ foo({x: 'abc'}); * @property {string=} y * @property {string} [z] * @property {string} [w="hi"] - * + * * @param {Opts1} opts */ function foo1(/*2*/opts1) { diff --git a/internal/fourslash/tests/gen/jsObjectDefinePropertyRenameLocations_test.go b/internal/fourslash/tests/gen/jsObjectDefinePropertyRenameLocations_test.go new file mode 100644 index 0000000000..400a54d78d --- /dev/null +++ b/internal/fourslash/tests/gen/jsObjectDefinePropertyRenameLocations_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsObjectDefinePropertyRenameLocations(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @checkJs: true +// @noEmit: true +// @Filename: index.js +var CircularList = (function () { + var CircularList = function() {}; + Object.defineProperty(CircularList.prototype, "[|maxLength|]", { value: 0, writable: true }); + CircularList.prototype.push = function (value) { + // ... + this.[|maxLength|] + this.[|maxLength|] + } + return CircularList; +})()` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/jsdocCallbackTagRename01_test.go b/internal/fourslash/tests/gen/jsdocCallbackTagRename01_test.go new file mode 100644 index 0000000000..1a7111c69a --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocCallbackTagRename01_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocCallbackTagRename01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: jsDocCallback.js + +/** + * [|@callback [|{| "contextRangeIndex": 0 |}FooCallback|] + * @param {string} eventName - Rename should work + |]*/ + +/** @type {/*1*/[|FooCallback|]} */ +var t;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1]) +} diff --git a/internal/fourslash/tests/gen/jsdocLink_rename1_test.go b/internal/fourslash/tests/gen/jsdocLink_rename1_test.go new file mode 100644 index 0000000000..5317505a24 --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocLink_rename1_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocLink_rename1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A/**/ {} +/** + * {@link A()} is ok + */ +declare const a: A` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/jsdocSatisfiesTagRename_test.go b/internal/fourslash/tests/gen/jsdocSatisfiesTagRename_test.go new file mode 100644 index 0000000000..d65c45f61c --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocSatisfiesTagRename_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocSatisfiesTagRename(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @noEmit: true +// @allowJS: true +// @checkJs: true +// @filename: /a.js +/** + * @typedef {Object} T + * @property {number} a + */ + +/** @satisfies {/**/T} comment */ +const foo = { a: 1 };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/jsdocThrowsTag_rename_test.go b/internal/fourslash/tests/gen/jsdocThrowsTag_rename_test.go new file mode 100644 index 0000000000..6d51a3b50d --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocThrowsTag_rename_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocThrowsTag_rename(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class /**/E extends Error {} +/** + * @throws {E} + */ +function f() {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/jsdocTypedefTagGoToDefinition_test.go b/internal/fourslash/tests/gen/jsdocTypedefTagGoToDefinition_test.go index e8fd2fbcec..7cb4093f34 100644 --- a/internal/fourslash/tests/gen/jsdocTypedefTagGoToDefinition_test.go +++ b/internal/fourslash/tests/gen/jsdocTypedefTagGoToDefinition_test.go @@ -13,21 +13,21 @@ func TestJsdocTypedefTagGoToDefinition(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @allowNonTsExtensions: true // @Filename: jsdocCompletion_typedef.js - /** - * @typedef {Object} Person - * @property {string} /*1*/personName - * @property {number} personAge - */ +/** + * @typedef {Object} Person + * @property {string} /*1*/personName + * @property {number} personAge + */ - /** - * @typedef {{ /*2*/animalName: string, animalAge: number }} Animal - */ +/** + * @typedef {{ /*2*/animalName: string, animalAge: number }} Animal + */ - /** @type {Person} */ - var person; person.[|personName/*3*/|] +/** @type {Person} */ +var person; person.[|personName/*3*/|] - /** @type {Animal} */ - var animal; animal.[|animalName/*4*/|]` +/** @type {Animal} */ +var animal; animal.[|animalName/*4*/|]` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "3", "4") } diff --git a/internal/fourslash/tests/gen/jsdocTypedefTagRename01_test.go b/internal/fourslash/tests/gen/jsdocTypedefTagRename01_test.go new file mode 100644 index 0000000000..47ef05dc8c --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocTypedefTagRename01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocTypedefTagRename01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: jsDocTypedef_form1.js + +/** @typedef {(string | number)} */ +[|var [|{| "contextRangeIndex": 0 |}NumberLike|];|] + +[|NumberLike|] = 10; + +/** @type {[|NumberLike|]} */ +var numberLike;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, ToAny(f.Ranges()[1:])...) +} diff --git a/internal/fourslash/tests/gen/jsdocTypedefTagRename02_test.go b/internal/fourslash/tests/gen/jsdocTypedefTagRename02_test.go new file mode 100644 index 0000000000..2fbe40851c --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocTypedefTagRename02_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocTypedefTagRename02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: jsDocTypedef_form2.js + +/** [|@typedef {(string | number)} [|{| "contextRangeIndex": 0 |}NumberLike|]|] */ + +/** @type {[|NumberLike|]} */ +var numberLike;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, ToAny(f.Ranges()[1:])...) +} diff --git a/internal/fourslash/tests/gen/jsdocTypedefTagRename03_test.go b/internal/fourslash/tests/gen/jsdocTypedefTagRename03_test.go new file mode 100644 index 0000000000..94c632a2ee --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocTypedefTagRename03_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocTypedefTagRename03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: jsDocTypedef_form3.js + +/** + * [|@typedef /*1*/[|{| "contextRangeIndex": 0 |}Person|] + * @type {Object} + * @property {number} age + * @property {string} name + |]*/ + +/** @type {/*2*/[|Person|]} */ +var person;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToFile(t, "jsDocTypedef_form3.js") + f.VerifyBaselineRename(t, nil /*preferences*/, ToAny(f.GetRangesByText().Get("Person"))...) +} diff --git a/internal/fourslash/tests/gen/jsdocTypedefTagRename04_test.go b/internal/fourslash/tests/gen/jsdocTypedefTagRename04_test.go index 2583e5ec90..5e8b871a75 100644 --- a/internal/fourslash/tests/gen/jsdocTypedefTagRename04_test.go +++ b/internal/fourslash/tests/gen/jsdocTypedefTagRename04_test.go @@ -14,18 +14,18 @@ func TestJsdocTypedefTagRename04(t *testing.T) { const content = `// @allowNonTsExtensions: true // @Filename: jsDocTypedef_form2.js - function test1() { - /** @typedef {(string | number)} NumberLike */ +function test1() { + /** @typedef {(string | number)} NumberLike */ - /** @type {/*1*/NumberLike} */ - var numberLike; - } - function test2() { - /** @typedef {(string | number)} NumberLike2 */ + /** @type {/*1*/NumberLike} */ + var numberLike; +} +function test2() { + /** @typedef {(string | number)} NumberLike2 */ - /** @type {NumberLike2} */ - var n/*2*/umberLike2; - }` + /** @type {NumberLike2} */ + var n/*2*/umberLike2; +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.GoToMarker(t, "2") f.VerifyQuickInfoExists(t) diff --git a/internal/fourslash/tests/gen/jsdocTypedefTag_test.go b/internal/fourslash/tests/gen/jsdocTypedefTag_test.go index a003ca03d3..bf281d7383 100644 --- a/internal/fourslash/tests/gen/jsdocTypedefTag_test.go +++ b/internal/fourslash/tests/gen/jsdocTypedefTag_test.go @@ -14,53 +14,53 @@ func TestJsdocTypedefTag(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @allowNonTsExtensions: true // @Filename: jsdocCompletion_typedef.js - /** @typedef {(string | number)} NumberLike */ +/** @typedef {(string | number)} NumberLike */ - /** - * @typedef Animal - think Giraffes - * @type {Object} - * @property {string} animalName - * @property {number} animalAge - */ +/** + * @typedef Animal - think Giraffes + * @type {Object} + * @property {string} animalName + * @property {number} animalAge + */ - /** - * @typedef {Object} Person - * @property {string} personName - * @property {number} personAge - */ +/** + * @typedef {Object} Person + * @property {string} personName + * @property {number} personAge + */ - /** - * @typedef {Object} - * @property {string} catName - * @property {number} catAge - */ - var Cat; +/** + * @typedef {Object} + * @property {string} catName + * @property {number} catAge + */ +var Cat; - /** @typedef {{ dogName: string, dogAge: number }} */ - var Dog; +/** @typedef {{ dogName: string, dogAge: number }} */ +var Dog; - /** @type {NumberLike} */ - var numberLike; numberLike./*numberLike*/ +/** @type {NumberLike} */ +var numberLike; numberLike./*numberLike*/ - /** @type {Person} */ - var p;p./*person*/; - p.personName./*personName*/; - p.personAge./*personAge*/; +/** @type {Person} */ +var p;p./*person*/; +p.personName./*personName*/; +p.personAge./*personAge*/; - /** @type {/*AnimalType*/Animal} */ - var a;a./*animal*/; - a.animalName./*animalName*/; - a.animalAge./*animalAge*/; +/** @type {/*AnimalType*/Animal} */ +var a;a./*animal*/; +a.animalName./*animalName*/; +a.animalAge./*animalAge*/; - /** @type {Cat} */ - var c;c./*cat*/; - c.catName./*catName*/; - c.catAge./*catAge*/; +/** @type {Cat} */ +var c;c./*cat*/; +c.catName./*catName*/; +c.catAge./*catAge*/; - /** @type {Dog} */ - var d;d./*dog*/; - d.dogName./*dogName*/; - d.dogAge./*dogAge*/;` +/** @type {Dog} */ +var d;d./*dog*/; +d.dogName./*dogName*/; +d.dogAge./*dogAge*/;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "numberLike", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/jsxElementMissingOpeningTagNoCrash_test.go b/internal/fourslash/tests/gen/jsxElementMissingOpeningTagNoCrash_test.go index 1f4cd26464..bef6c35d36 100644 --- a/internal/fourslash/tests/gen/jsxElementMissingOpeningTagNoCrash_test.go +++ b/internal/fourslash/tests/gen/jsxElementMissingOpeningTagNoCrash_test.go @@ -12,8 +12,8 @@ func TestJsxElementMissingOpeningTagNoCrash(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare function Foo(): any; - let x = <>;` +declare function Foo(): any; +let x = <>;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "$", "let Foo: any", "") } diff --git a/internal/fourslash/tests/gen/jsxQualifiedTagCompletion_test.go b/internal/fourslash/tests/gen/jsxQualifiedTagCompletion_test.go index 4a51ee36df..5675eed65d 100644 --- a/internal/fourslash/tests/gen/jsxQualifiedTagCompletion_test.go +++ b/internal/fourslash/tests/gen/jsxQualifiedTagCompletion_test.go @@ -13,11 +13,11 @@ func TestJsxQualifiedTagCompletion(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare var React: any; - namespace NS { - export var Foo: any = null; - } - const j = Hello!/**/ +declare var React: any; +namespace NS { + export var Foo: any = null; +} +const j = Hello!/**/ ` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.GoToMarker(t, "") diff --git a/internal/fourslash/tests/gen/jsxSpreadReference_test.go b/internal/fourslash/tests/gen/jsxSpreadReference_test.go new file mode 100644 index 0000000000..f602955d29 --- /dev/null +++ b/internal/fourslash/tests/gen/jsxSpreadReference_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsxSpreadReference(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props } +} +class MyClass { + props: { + name?: string; + size?: number; + } +} + +[|var [|/*dst*/{| "contextRangeIndex": 0 |}nn|]: {name?: string; size?: number};|] +var x = ;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "nn") + f.VerifyBaselineGoToDefinition(t, "src") +} diff --git a/internal/fourslash/tests/gen/noQuickInfoInWhitespace_test.go b/internal/fourslash/tests/gen/noQuickInfoInWhitespace_test.go index 6bd9ccdcae..d346b8cf85 100644 --- a/internal/fourslash/tests/gen/noQuickInfoInWhitespace_test.go +++ b/internal/fourslash/tests/gen/noQuickInfoInWhitespace_test.go @@ -14,7 +14,7 @@ func TestNoQuickInfoInWhitespace(t *testing.T) { const content = `class C { /*1*/ private _mspointerupHandler(args) { if (args.button === 3) { - return null; + return null; /*2*/ } else if (args.button === 4) { /*3*/ return null; } diff --git a/internal/fourslash/tests/gen/overloadQuickInfo_test.go b/internal/fourslash/tests/gen/overloadQuickInfo_test.go index cb80335610..066fc9ca53 100644 --- a/internal/fourslash/tests/gen/overloadQuickInfo_test.go +++ b/internal/fourslash/tests/gen/overloadQuickInfo_test.go @@ -19,7 +19,7 @@ function Foo(fred: any[], name: string[], age: number[]); function Foo(fred: any, name: string[], age: number[]); // Extraneous spaces should get removed function Foo(fred: any, name: boolean, age: number[]); function Foo(dave: boolean, name: string); -function Foo(fred: any, mandy: {(): number}, age: number[]); // Embedded interface will get converted to shorthand notation, () => +function Foo(fred: any, mandy: {(): number}, age: number[]); // Embedded interface will get converted to shorthand notation, () => function Foo(fred: any, name: string, age: { }); function Foo(fred: any, name: string, age: number[]); function Foo(test: string, name, age: number); diff --git a/internal/fourslash/tests/gen/processInvalidSyntax1_test.go b/internal/fourslash/tests/gen/processInvalidSyntax1_test.go new file mode 100644 index 0000000000..ec97a26b64 --- /dev/null +++ b/internal/fourslash/tests/gen/processInvalidSyntax1_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestProcessInvalidSyntax1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: decl.js +var obj = {}; +// @Filename: unicode1.js +obj.𝒜 ; +// @Filename: unicode2.js +obj.¬ ; +// @Filename: unicode3.js +obj¬ +// @Filename: forof.js +for (obj/**/.prop of arr) { + +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/promiseTyping2_test.go b/internal/fourslash/tests/gen/promiseTyping2_test.go index 57b4637759..e33abf4d91 100644 --- a/internal/fourslash/tests/gen/promiseTyping2_test.go +++ b/internal/fourslash/tests/gen/promiseTyping2_test.go @@ -19,7 +19,7 @@ func TestPromiseTyping2(t *testing.T) { done? (success?: (value: T) => any, error?: (error: any) => any, progress?: (progress: any) => void ): void; } var p1: IPromise = null; -p/*1*/1.then(function (x/*2*/x) { }); +p/*1*/1.then(function (x/*2*/x) { }); var p/*3*/2 = p1.then(function (x/*4*/x) { return "hello"; }) var p/*5*/3 = p2.then(function (x/*6*/x) { return x/*7*/x; diff --git a/internal/fourslash/tests/gen/quickInfoCommentsCommentParsing_test.go b/internal/fourslash/tests/gen/quickInfoCommentsCommentParsing_test.go index 32ff2882da..e8e6abff3b 100644 --- a/internal/fourslash/tests/gen/quickInfoCommentsCommentParsing_test.go +++ b/internal/fourslash/tests/gen/quickInfoCommentsCommentParsing_test.go @@ -111,7 +111,7 @@ function sum(/*16aq*/a: number, /*17aq*/b: number) { } s/*16q*/um(10, 20); /** This is multiplication function - * @param + * @param * @param a first number * @param b * @param c { diff --git a/internal/fourslash/tests/gen/quickInfoForGetterAndSetter_test.go b/internal/fourslash/tests/gen/quickInfoForGetterAndSetter_test.go index 5a0fcd4898..80e85ee17d 100644 --- a/internal/fourslash/tests/gen/quickInfoForGetterAndSetter_test.go +++ b/internal/fourslash/tests/gen/quickInfoForGetterAndSetter_test.go @@ -11,21 +11,21 @@ func TestQuickInfoForGetterAndSetter(t *testing.T) { t.Parallel() t.Skip() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class Test { - constructor() { - this.value; - } + const content = `class Test { + constructor() { + this.value; + } - /** Getter text */ - get val/*1*/ue() { - return this.value; - } + /** Getter text */ + get val/*1*/ue() { + return this.value; + } - /** Setter text */ - set val/*2*/ue(value) { - this.value = value; - } - }` + /** Setter text */ + set val/*2*/ue(value) { + this.value = value; + } +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.GoToMarker(t, "1") f.VerifyQuickInfoIs(t, "(getter) Test.value: any", "Getter text") diff --git a/internal/fourslash/tests/gen/quickInfoInheritDoc_test.go b/internal/fourslash/tests/gen/quickInfoInheritDoc_test.go index db1b8a3b46..f57f274648 100644 --- a/internal/fourslash/tests/gen/quickInfoInheritDoc_test.go +++ b/internal/fourslash/tests/gen/quickInfoInheritDoc_test.go @@ -17,7 +17,7 @@ func TestQuickInfoInheritDoc(t *testing.T) { abstract class BaseClass { /** * Useful description always applicable - * + * * @returns {string} Useful description of return value always applicable. */ public static doSomethingUseful(stuff?: any): string { @@ -45,7 +45,7 @@ class SubClass extends BaseClass { /** * @inheritDoc - * + * * @param {{ tiger: string; lion: string; }} [mySpecificStuff] Description of my specific parameter. */ public static /*1*/doSomethingUseful(mySpecificStuff?: { tiger: string; lion: string; }): string { diff --git a/internal/fourslash/tests/gen/quickInfoJsDocInheritage_test.go b/internal/fourslash/tests/gen/quickInfoJsDocInheritage_test.go index 3f78b2fce8..469b16e575 100644 --- a/internal/fourslash/tests/gen/quickInfoJsDocInheritage_test.go +++ b/internal/fourslash/tests/gen/quickInfoJsDocInheritage_test.go @@ -54,12 +54,12 @@ new D()./*8*/foo2; class Base1 { /** - * @description Base1.foo1 + * @description Base1.foo1 */ foo1: number = 1; /** - * + * * @param q Base1.foo2 parameter * @returns Base1.foo2 return */ @@ -82,11 +82,11 @@ class Drived2 extends Base1 implements B { class Base2 { /** - * @description Base2.foo1 + * @description Base2.foo1 */ foo1: number = 1; /** - * + * * @param q Base2.foo2 parameter * @returns Base2.foo2 return */ diff --git a/internal/fourslash/tests/gen/quickInfoJsDocTextFormatting1_test.go b/internal/fourslash/tests/gen/quickInfoJsDocTextFormatting1_test.go index df8f0eba08..032c341eaa 100644 --- a/internal/fourslash/tests/gen/quickInfoJsDocTextFormatting1_test.go +++ b/internal/fourslash/tests/gen/quickInfoJsDocTextFormatting1_test.go @@ -24,25 +24,25 @@ function f1(var1, var2) { } function f2(var1, var2) { } /** - * @param {number} var1 + * @param {number} var1 * *Regular text with an asterisk - * @param {string} var2 + * @param {string} var2 * Another *Regular text with an asterisk */ function f3(var1, var2) { } /** - * @param {number} var1 + * @param {number} var1 * **Highlighted text** - * @param {string} var2 + * @param {string} var2 * Another **Highlighted text** */ function f4(var1, var2) { } /** - * @param {number} var1 + * @param {number} var1 **Highlighted text** - * @param {string} var2 + * @param {string} var2 Another **Highlighted text** */ function f5(var1, var2) { } diff --git a/internal/fourslash/tests/gen/quickInfoOnParameterProperties_test.go b/internal/fourslash/tests/gen/quickInfoOnParameterProperties_test.go index a6560da6bf..8c3f50cb7d 100644 --- a/internal/fourslash/tests/gen/quickInfoOnParameterProperties_test.go +++ b/internal/fourslash/tests/gen/quickInfoOnParameterProperties_test.go @@ -12,8 +12,8 @@ func TestQuickInfoOnParameterProperties(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `interface IFoo { - /** this is the name of blabla - * - use blabla + /** this is the name of blabla + * - use blabla * @example blabla */ name?: string; @@ -23,14 +23,14 @@ func TestQuickInfoOnParameterProperties(t *testing.T) { class Foo implements IFoo { //public name: string = ''; constructor( - public na/*1*/me: string, // documentation should leech and work ! + public na/*1*/me: string, // documentation should leech and work ! ) { } } // test2 work class Foo2 implements IFoo { - public na/*2*/me: string = ''; // documentation leeched and work ! + public na/*2*/me: string = ''; // documentation leeched and work ! constructor( //public name: string, ) { diff --git a/internal/fourslash/tests/gen/quickinfoForNamespaceMergeWithClassConstrainedToSelf_test.go b/internal/fourslash/tests/gen/quickinfoForNamespaceMergeWithClassConstrainedToSelf_test.go index 82e2b716f9..23d6665f41 100644 --- a/internal/fourslash/tests/gen/quickinfoForNamespaceMergeWithClassConstrainedToSelf_test.go +++ b/internal/fourslash/tests/gen/quickinfoForNamespaceMergeWithClassConstrainedToSelf_test.go @@ -11,22 +11,22 @@ func TestQuickinfoForNamespaceMergeWithClassConstrainedToSelf(t *testing.T) { t.Parallel() t.Skip() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` declare namespace AMap { - namespace MassMarks { - interface Data { - style?: number; - } - } - class MassMarks { - constructor(data: D[] | string); - clear(): void; - } - } + const content = `declare namespace AMap { + namespace MassMarks { + interface Data { + style?: number; + } + } + class MassMarks { + constructor(data: D[] | string); + clear(): void; + } +} - interface MassMarksCustomData extends AMap.MassMarks./*1*/Data { - name: string; - id: string; - }` +interface MassMarksCustomData extends AMap.MassMarks./*1*/Data { + name: string; + id: string; +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "interface AMap.MassMarks.Data", "") } diff --git a/internal/fourslash/tests/gen/recursiveWrappedTypeParameters1_test.go b/internal/fourslash/tests/gen/recursiveWrappedTypeParameters1_test.go index 535eadeb48..7ef7f08acc 100644 --- a/internal/fourslash/tests/gen/recursiveWrappedTypeParameters1_test.go +++ b/internal/fourslash/tests/gen/recursiveWrappedTypeParameters1_test.go @@ -23,7 +23,7 @@ var b/*3*/b = x.b; var c/*4*/c = x.c; var d/*5*/d = x.c.a; var e/*6*/e = x.c.b; -var f/*7*/f = x.c.c; ` +var f/*7*/f = x.c.c;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "var yy: I>>>>>", "") f.VerifyQuickInfoAt(t, "2", "var aa: number", "") diff --git a/internal/fourslash/tests/gen/referenceInParameterPropertyDeclaration_test.go b/internal/fourslash/tests/gen/referenceInParameterPropertyDeclaration_test.go index b579a1d06d..45b104fc83 100644 --- a/internal/fourslash/tests/gen/referenceInParameterPropertyDeclaration_test.go +++ b/internal/fourslash/tests/gen/referenceInParameterPropertyDeclaration_test.go @@ -12,21 +12,21 @@ func TestReferenceInParameterPropertyDeclaration(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @Filename: file1.ts - class Foo { - constructor(private /*1*/privateParam: number, - public /*2*/publicParam: string, - protected /*3*/protectedParam: boolean) { +class Foo { + constructor(private /*1*/privateParam: number, + public /*2*/publicParam: string, + protected /*3*/protectedParam: boolean) { - let localPrivate = privateParam; - this.privateParam += 10; + let localPrivate = privateParam; + this.privateParam += 10; - let localPublic = publicParam; - this.publicParam += " Hello!"; + let localPublic = publicParam; + this.publicParam += " Hello!"; - let localProtected = protectedParam; - this.protectedParam = false; - } - }` + let localProtected = protectedParam; + this.protectedParam = false; + } +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3") } diff --git a/internal/fourslash/tests/gen/referencesForInheritedProperties3_test.go b/internal/fourslash/tests/gen/referencesForInheritedProperties3_test.go index 48f0d4850b..8484f6d798 100644 --- a/internal/fourslash/tests/gen/referencesForInheritedProperties3_test.go +++ b/internal/fourslash/tests/gen/referencesForInheritedProperties3_test.go @@ -11,14 +11,14 @@ func TestReferencesForInheritedProperties3(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` interface interface1 extends interface1 { - /*1*/doStuff(): void; - /*2*/propName: string; - } + const content = `interface interface1 extends interface1 { + /*1*/doStuff(): void; + /*2*/propName: string; +} - var v: interface1; - v./*3*/propName; - v./*4*/doStuff();` +var v: interface1; +v./*3*/propName; +v./*4*/doStuff();` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4") } diff --git a/internal/fourslash/tests/gen/referencesForInheritedProperties4_test.go b/internal/fourslash/tests/gen/referencesForInheritedProperties4_test.go index fe811d22c3..f598a032e3 100644 --- a/internal/fourslash/tests/gen/referencesForInheritedProperties4_test.go +++ b/internal/fourslash/tests/gen/referencesForInheritedProperties4_test.go @@ -11,14 +11,14 @@ func TestReferencesForInheritedProperties4(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class class1 extends class1 { - /*1*/doStuff() { } - /*2*/propName: string; - } + const content = `class class1 extends class1 { + /*1*/doStuff() { } + /*2*/propName: string; +} - var c: class1; - c./*3*/doStuff(); - c./*4*/propName;` +var c: class1; +c./*3*/doStuff(); +c./*4*/propName;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4") } diff --git a/internal/fourslash/tests/gen/referencesForInheritedProperties5_test.go b/internal/fourslash/tests/gen/referencesForInheritedProperties5_test.go index ebceec5557..17cda004e3 100644 --- a/internal/fourslash/tests/gen/referencesForInheritedProperties5_test.go +++ b/internal/fourslash/tests/gen/referencesForInheritedProperties5_test.go @@ -11,18 +11,18 @@ func TestReferencesForInheritedProperties5(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` interface interface1 extends interface1 { - /*1*/doStuff(): void; - /*2*/propName: string; - } - interface interface2 extends interface1 { - doStuff(): void; - propName: string; - } + const content = `interface interface1 extends interface1 { + /*1*/doStuff(): void; + /*2*/propName: string; +} +interface interface2 extends interface1 { + doStuff(): void; + propName: string; +} - var v: interface1; - v.propName; - v.doStuff();` +var v: interface1; +v.propName; +v.doStuff();` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2") } diff --git a/internal/fourslash/tests/gen/referencesForInheritedProperties7_test.go b/internal/fourslash/tests/gen/referencesForInheritedProperties7_test.go index c2e3b2e0ed..a6f8c30b11 100644 --- a/internal/fourslash/tests/gen/referencesForInheritedProperties7_test.go +++ b/internal/fourslash/tests/gen/referencesForInheritedProperties7_test.go @@ -11,22 +11,22 @@ func TestReferencesForInheritedProperties7(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class class1 extends class1 { - /*0*/doStuff() { } - /*1*/propName: string; - } - interface interface1 extends interface1 { - /*2*/doStuff(): void; - /*3*/propName: string; - } - class class2 extends class1 implements interface1 { - /*4*/doStuff() { } - /*5*/propName: string; - } + const content = `class class1 extends class1 { + /*0*/doStuff() { } + /*1*/propName: string; +} +interface interface1 extends interface1 { + /*2*/doStuff(): void; + /*3*/propName: string; +} +class class2 extends class1 implements interface1 { + /*4*/doStuff() { } + /*5*/propName: string; +} - var v: class2; - v.doStuff(); - v.propName;` +var v: class2; +v.doStuff(); +v.propName;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "0", "1", "2", "3", "4", "5") } diff --git a/internal/fourslash/tests/gen/referencesForInheritedProperties9_test.go b/internal/fourslash/tests/gen/referencesForInheritedProperties9_test.go index e273930cf9..cd6281249e 100644 --- a/internal/fourslash/tests/gen/referencesForInheritedProperties9_test.go +++ b/internal/fourslash/tests/gen/referencesForInheritedProperties9_test.go @@ -11,16 +11,16 @@ func TestReferencesForInheritedProperties9(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class D extends C { - /*1*/prop1: string; - } + const content = `class D extends C { + /*1*/prop1: string; +} - class C extends D { - /*2*/prop1: string; - } +class C extends D { + /*2*/prop1: string; +} - var c: C; - c./*3*/prop1;` +var c: C; +c./*3*/prop1;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3") } diff --git a/internal/fourslash/tests/gen/rename01_test.go b/internal/fourslash/tests/gen/rename01_test.go new file mode 100644 index 0000000000..ba3cf9437d --- /dev/null +++ b/internal/fourslash/tests/gen/rename01_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRename01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/// +[|function [|{| "contextRangeIndex": 0 |}Bar|]() { + // This is a reference to [|Bar|] in a comment. + "this is a reference to [|Bar|] in a string" +}|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1]) +} diff --git a/internal/fourslash/tests/gen/renameAcrossMultipleProjects_test.go b/internal/fourslash/tests/gen/renameAcrossMultipleProjects_test.go new file mode 100644 index 0000000000..4be3a38c11 --- /dev/null +++ b/internal/fourslash/tests/gen/renameAcrossMultipleProjects_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameAcrossMultipleProjects(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: a.ts +[|var [|{| "contextRangeIndex": 0 |}x|]: number;|] +//@Filename: b.ts +/// +[|x|]++; +//@Filename: c.ts +/// +[|x|]++;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "x") +} diff --git a/internal/fourslash/tests/gen/renameAlias2_test.go b/internal/fourslash/tests/gen/renameAlias2_test.go new file mode 100644 index 0000000000..919300f458 --- /dev/null +++ b/internal/fourslash/tests/gen/renameAlias2_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameAlias2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|module [|{| "contextRangeIndex": 0 |}SomeModule|] { export class SomeClass { } }|] +import M = [|SomeModule|]; +import C = M.SomeClass;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "SomeModule") +} diff --git a/internal/fourslash/tests/gen/renameAlias3_test.go b/internal/fourslash/tests/gen/renameAlias3_test.go new file mode 100644 index 0000000000..d392d4c56d --- /dev/null +++ b/internal/fourslash/tests/gen/renameAlias3_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameAlias3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module SomeModule { [|export class [|{| "contextRangeIndex": 0 |}SomeClass|] { }|] } +import M = SomeModule; +import C = M.[|SomeClass|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "SomeClass") +} diff --git a/internal/fourslash/tests/gen/renameAliasExternalModule2_test.go b/internal/fourslash/tests/gen/renameAliasExternalModule2_test.go new file mode 100644 index 0000000000..82e69cb3c1 --- /dev/null +++ b/internal/fourslash/tests/gen/renameAliasExternalModule2_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameAliasExternalModule2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +[|module [|{| "contextRangeIndex": 0 |}SomeModule|] { export class SomeClass { } }|] +[|export = [|{| "contextRangeIndex": 2 |}SomeModule|];|] +// @Filename: b.ts +[|import [|{| "contextRangeIndex": 4 |}M|] = require("./a");|] +import C = [|M|].SomeClass;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[3], f.Ranges()[5], f.Ranges()[6]) +} diff --git a/internal/fourslash/tests/gen/renameAliasExternalModule3_test.go b/internal/fourslash/tests/gen/renameAliasExternalModule3_test.go new file mode 100644 index 0000000000..d8f994b29f --- /dev/null +++ b/internal/fourslash/tests/gen/renameAliasExternalModule3_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameAliasExternalModule3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +module SomeModule { [|export class [|{| "contextRangeIndex": 0 |}SomeClass|] { }|] } +export = SomeModule; +// @Filename: b.ts +import M = require("./a"); +import C = M.[|SomeClass|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "SomeClass") +} diff --git a/internal/fourslash/tests/gen/renameAliasExternalModule_test.go b/internal/fourslash/tests/gen/renameAliasExternalModule_test.go new file mode 100644 index 0000000000..d11406a6a3 --- /dev/null +++ b/internal/fourslash/tests/gen/renameAliasExternalModule_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameAliasExternalModule(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +module SomeModule { export class SomeClass { } } +export = SomeModule; +// @Filename: b.ts +[|import [|{| "contextRangeIndex": 0 |}M|] = require("./a");|] +import C = [|M|].SomeClass;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "M") +} diff --git a/internal/fourslash/tests/gen/renameAlias_test.go b/internal/fourslash/tests/gen/renameAlias_test.go new file mode 100644 index 0000000000..38d5dd7cda --- /dev/null +++ b/internal/fourslash/tests/gen/renameAlias_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameAlias(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module SomeModule { export class SomeClass { } } +[|import [|{| "contextRangeIndex": 0 |}M|] = SomeModule;|] +import C = [|M|].SomeClass;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "M") +} diff --git a/internal/fourslash/tests/gen/renameBindingElementInitializerExternal_test.go b/internal/fourslash/tests/gen/renameBindingElementInitializerExternal_test.go new file mode 100644 index 0000000000..33739c90f1 --- /dev/null +++ b/internal/fourslash/tests/gen/renameBindingElementInitializerExternal_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameBindingElementInitializerExternal(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|const [|{| "contextRangeIndex": 0 |}external|] = true;|] + +function f({ + lvl1 = [|external|], + nested: { lvl2 = [|external|]}, + oldName: newName = [|external|] +}) {} + +const { + lvl1 = [|external|], + nested: { lvl2 = [|external|]}, + oldName: newName = [|external|] +} = obj;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "external") +} diff --git a/internal/fourslash/tests/gen/renameBindingElementInitializerProperty_test.go b/internal/fourslash/tests/gen/renameBindingElementInitializerProperty_test.go new file mode 100644 index 0000000000..9ea15f592f --- /dev/null +++ b/internal/fourslash/tests/gen/renameBindingElementInitializerProperty_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameBindingElementInitializerProperty(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function f([|{[|{| "contextRangeIndex": 0 |}required|], optional = [|required|]}: {[|[|{| "contextRangeIndex": 3 |}required|]: number,|] optional?: number}|]) { + console.log("required", [|required|]); + console.log("optional", optional); +} + +f({[|[|{| "contextRangeIndex": 6 |}required|]: 10|]});` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[2], f.Ranges()[5], f.Ranges()[4], f.Ranges()[7]) +} diff --git a/internal/fourslash/tests/gen/renameCommentsAndStrings1_test.go b/internal/fourslash/tests/gen/renameCommentsAndStrings1_test.go new file mode 100644 index 0000000000..9925e55563 --- /dev/null +++ b/internal/fourslash/tests/gen/renameCommentsAndStrings1_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameCommentsAndStrings1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/// +[|function [|{| "contextRangeIndex": 0 |}Bar|]() { + // This is a reference to Bar in a comment. + "this is a reference to Bar in a string" +}|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "Bar") +} diff --git a/internal/fourslash/tests/gen/renameCommentsAndStrings2_test.go b/internal/fourslash/tests/gen/renameCommentsAndStrings2_test.go new file mode 100644 index 0000000000..c1e6f11161 --- /dev/null +++ b/internal/fourslash/tests/gen/renameCommentsAndStrings2_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameCommentsAndStrings2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/// +[|function [|{| "contextRangeIndex": 0 |}Bar|]() { + // This is a reference to Bar in a comment. + "this is a reference to [|Bar|] in a string" +}|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1]) +} diff --git a/internal/fourslash/tests/gen/renameCommentsAndStrings3_test.go b/internal/fourslash/tests/gen/renameCommentsAndStrings3_test.go new file mode 100644 index 0000000000..2c5dd0ab10 --- /dev/null +++ b/internal/fourslash/tests/gen/renameCommentsAndStrings3_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameCommentsAndStrings3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/// +[|function [|{| "contextRangeIndex": 0 |}Bar|]() { + // This is a reference to [|Bar|] in a comment. + "this is a reference to Bar in a string" +}|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1]) +} diff --git a/internal/fourslash/tests/gen/renameCommentsAndStrings4_test.go b/internal/fourslash/tests/gen/renameCommentsAndStrings4_test.go new file mode 100644 index 0000000000..413d624fb4 --- /dev/null +++ b/internal/fourslash/tests/gen/renameCommentsAndStrings4_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameCommentsAndStrings4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/// +[|function [|{| "contextRangeIndex": 0 |}Bar|]() { + // This is a reference to [|Bar|] in a comment. + "this is a reference to [|Bar|] in a string"; + ` + "`" + `Foo [|Bar|] Baz.` + "`" + `; + { + const Bar = 0; + ` + "`" + `[|Bar|] ba ${Bar} bara [|Bar|] berbobo ${Bar} araura [|Bar|] ara!` + "`" + `; + } +}|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1]) +} diff --git a/internal/fourslash/tests/gen/renameContextuallyTypedProperties2_test.go b/internal/fourslash/tests/gen/renameContextuallyTypedProperties2_test.go new file mode 100644 index 0000000000..507eba5c22 --- /dev/null +++ b/internal/fourslash/tests/gen/renameContextuallyTypedProperties2_test.go @@ -0,0 +1,70 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameContextuallyTypedProperties2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + prop1: () => void; + [|[|{| "contextRangeIndex": 0 |}prop2|](): void;|] +} + +var o1: I = { + prop1() { }, + [|[|{| "contextRangeIndex": 2 |}prop2|]() { }|] +}; + +var o2: I = { + prop1: () => { }, + [|[|{| "contextRangeIndex": 4 |}prop2|]: () => { }|] +}; + +var o3: I = { + get prop1() { return () => { }; }, + [|get [|{| "contextRangeIndex": 6 |}prop2|]() { return () => { }; }|] +}; + +var o4: I = { + set prop1(v) { }, + [|set [|{| "contextRangeIndex": 8 |}prop2|](v) { }|] +}; + +var o5: I = { + "prop1"() { }, + [|"[|{| "contextRangeIndex": 10 |}prop2|]"() { }|] +}; + +var o6: I = { + "prop1": function () { }, + [|"[|{| "contextRangeIndex": 12 |}prop2|]": function () { }|] +}; + +var o7: I = { + ["prop1"]: function () { }, + [|["[|{| "contextRangeIndex": 14 |}prop2|]"]: function () { }|] +}; + +var o8: I = { + ["prop1"]() { }, + [|["[|{| "contextRangeIndex": 16 |}prop2|]"]() { }|] +}; + +var o9: I = { + get ["prop1"]() { return () => { }; }, + [|get ["[|{| "contextRangeIndex": 18 |}prop2|]"]() { return () => { }; }|] +}; + +var o10: I = { + set ["prop1"](v) { }, + [|set ["[|{| "contextRangeIndex": 20 |}prop2|]"](v) { }|] +};` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "prop2") +} diff --git a/internal/fourslash/tests/gen/renameContextuallyTypedProperties_test.go b/internal/fourslash/tests/gen/renameContextuallyTypedProperties_test.go new file mode 100644 index 0000000000..bc90714813 --- /dev/null +++ b/internal/fourslash/tests/gen/renameContextuallyTypedProperties_test.go @@ -0,0 +1,70 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameContextuallyTypedProperties(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [|[|{| "contextRangeIndex": 0 |}prop1|]: () => void;|] + prop2(): void; +} + +var o1: I = { + [|[|{| "contextRangeIndex": 2 |}prop1|]() { }|], + prop2() { } +}; + +var o2: I = { + [|[|{| "contextRangeIndex": 4 |}prop1|]: () => { }|], + prop2: () => { } +}; + +var o3: I = { + [|get [|{| "contextRangeIndex": 6 |}prop1|]() { return () => { }; }|], + get prop2() { return () => { }; } +}; + +var o4: I = { + [|set [|{| "contextRangeIndex": 8 |}prop1|](v) { }|], + set prop2(v) { } +}; + +var o5: I = { + [|"[|{| "contextRangeIndex": 10 |}prop1|]"() { }|], + "prop2"() { } +}; + +var o6: I = { + [|"[|{| "contextRangeIndex": 12 |}prop1|]": function () { }|], + "prop2": function () { } +}; + +var o7: I = { + [|["[|{| "contextRangeIndex": 14 |}prop1|]"]: function () { }|], + ["prop2"]: function () { } +}; + +var o8: I = { + [|["[|{| "contextRangeIndex": 16 |}prop1|]"]() { }|], + ["prop2"]() { } +}; + +var o9: I = { + [|get ["[|{| "contextRangeIndex": 18 |}prop1|]"]() { return () => { }; }|], + get ["prop2"]() { return () => { }; } +}; + +var o10: I = { + [|set ["[|{| "contextRangeIndex": 20 |}prop1|]"](v) { }|], + set ["prop2"](v) { } +};` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "prop1") +} diff --git a/internal/fourslash/tests/gen/renameCrossJsTs01_test.go b/internal/fourslash/tests/gen/renameCrossJsTs01_test.go new file mode 100644 index 0000000000..f7cb56466a --- /dev/null +++ b/internal/fourslash/tests/gen/renameCrossJsTs01_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameCrossJsTs01(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +[|exports.[|{| "contextRangeIndex": 0 |}area|] = function (r) { return r * r; }|] +// @Filename: b.ts +[|import { [|{| "contextRangeIndex": 2 |}area|] } from './a';|] +var t = [|area|](10);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[3], f.Ranges()[4]) +} diff --git a/internal/fourslash/tests/gen/renameDeclarationKeywords_test.go b/internal/fourslash/tests/gen/renameDeclarationKeywords_test.go new file mode 100644 index 0000000000..33d015c442 --- /dev/null +++ b/internal/fourslash/tests/gen/renameDeclarationKeywords_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameDeclarationKeywords(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|{| "id": "baseDecl" |}class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "baseDecl" |}Base|] {}|] +[|{| "id": "implemented1Decl" |}interface [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "implemented1Decl" |}Implemented1|] {}|] +[|{| "id": "classDecl1" |}[|class|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "classDecl1" |}C1|] [|extends|] [|Base|] [|implements|] [|Implemented1|] { + [|{| "id": "getDecl" |}[|get|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "getDecl" |}e|]() { return 1; }|] + [|{| "id": "setDecl" |}[|set|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "setDecl" |}e|](v) {}|] +}|] +[|{| "id": "interfaceDecl1" |}[|interface|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "interfaceDecl1" |}I1|] [|extends|] [|Base|] { }|] +[|{| "id": "typeDecl" |}[|type|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "typeDecl" |}T|] = { }|] +[|{| "id": "enumDecl" |}[|enum|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "enumDecl" |}E|] { }|] +[|{| "id": "namespaceDecl" |}[|namespace|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "namespaceDecl" |}N|] { }|] +[|{| "id": "moduleDecl" |}[|module|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "moduleDecl" |}M|] { }|] +[|{| "id": "functionDecl" |}[|function|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "functionDecl" |}fn|]() {}|] +[|{| "id": "varDecl" |}[|var|] [|{| "isWriteAccess": false, "isDefinition": true, "contextRangeId": "varDecl" |}x|];|] +[|{| "id": "letDecl" |}[|let|] [|{| "isWriteAccess": false, "isDefinition": true, "contextRangeId": "letDecl" |}y|];|] +[|{| "id": "constDecl" |}[|const|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeId": "constDecl" |}z|] = 1;|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[5], f.Ranges()[7], f.Ranges()[9], f.Ranges()[12], f.Ranges()[15], f.Ranges()[18], f.Ranges()[20], f.Ranges()[23], f.Ranges()[26], f.Ranges()[29], f.Ranges()[32], f.Ranges()[35], f.Ranges()[38], f.Ranges()[41], f.Ranges()[44]) +} diff --git a/internal/fourslash/tests/gen/renameDefaultLibDontWork_test.go b/internal/fourslash/tests/gen/renameDefaultLibDontWork_test.go new file mode 100644 index 0000000000..01ae7d4c8b --- /dev/null +++ b/internal/fourslash/tests/gen/renameDefaultLibDontWork_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameDefaultLibDontWork(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: file1.ts +[|var [|{| "contextRangeIndex": 0 |}test|] = "foo";|] +console.log([|test|]);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1]) +} diff --git a/internal/fourslash/tests/gen/renameDestructuringAssignmentNestedInArrayLiteral_test.go b/internal/fourslash/tests/gen/renameDestructuringAssignmentNestedInArrayLiteral_test.go new file mode 100644 index 0000000000..cce6851885 --- /dev/null +++ b/internal/fourslash/tests/gen/renameDestructuringAssignmentNestedInArrayLiteral_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameDestructuringAssignmentNestedInArrayLiteral(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [|[|{| "contextRangeIndex": 0 |}property1|]: number;|] + property2: string; +} +var elems: I[], p1: number, [|[|{| "contextRangeIndex": 2 |}property1|]: number|]; +[|[{ [|{| "contextRangeIndex": 4 |}property1|]: p1 }] = elems;|] +[|[{ [|{| "contextRangeIndex": 6 |}property1|] }] = elems;|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[5], f.Ranges()[3], f.Ranges()[7]) +} diff --git a/internal/fourslash/tests/gen/renameDestructuringAssignmentNestedInForOf2_test.go b/internal/fourslash/tests/gen/renameDestructuringAssignmentNestedInForOf2_test.go new file mode 100644 index 0000000000..fa1a3ec47c --- /dev/null +++ b/internal/fourslash/tests/gen/renameDestructuringAssignmentNestedInForOf2_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameDestructuringAssignmentNestedInForOf2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MultiRobot { + name: string; + skills: { + [|[|{| "contextRangeIndex": 0 |}primary|]: string;|] + secondary: string; + }; +} +let multiRobots: MultiRobot[], [|[|{| "contextRangeIndex": 2 |}primary|]: string|]; +for ([|{ skills: { [|{| "contextRangeIndex": 4 |}primary|]: primaryA, secondary: secondaryA } } of multiRobots|]) { + console.log(primaryA); +} +for ([|{ skills: { [|{| "contextRangeIndex": 6 |}primary|], secondary } } of multiRobots|]) { + console.log([|primary|]); +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[5], f.Ranges()[3], f.Ranges()[7], f.Ranges()[8]) +} diff --git a/internal/fourslash/tests/gen/renameDestructuringAssignment_test.go b/internal/fourslash/tests/gen/renameDestructuringAssignment_test.go new file mode 100644 index 0000000000..7ff77f0e66 --- /dev/null +++ b/internal/fourslash/tests/gen/renameDestructuringAssignment_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameDestructuringAssignment(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [|[|{| "contextRangeIndex": 0 |}x|]: number;|] +} +var a: I; +var x; +([|{ [|{| "contextRangeIndex": 2 |}x|]: x } = a|]);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "x") +} diff --git a/internal/fourslash/tests/gen/renameDestructuringClassProperty_test.go b/internal/fourslash/tests/gen/renameDestructuringClassProperty_test.go new file mode 100644 index 0000000000..216ab88b41 --- /dev/null +++ b/internal/fourslash/tests/gen/renameDestructuringClassProperty_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameDestructuringClassProperty(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class A { + [|[|{| "contextRangeIndex": 0 |}foo|]: string;|] +} +class B { + syntax1(a: A): void { + [|let { [|{| "contextRangeIndex": 2 |}foo|] } = a;|] + } + syntax2(a: A): void { + [|let { [|{| "contextRangeIndex": 4 |}foo|]: foo } = a;|] + } + syntax11(a: A): void { + [|let { [|{| "contextRangeIndex": 6 |}foo|] } = a;|] + [|foo|] = "newString"; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[5], f.Ranges()[3], f.Ranges()[7], f.Ranges()[8]) +} diff --git a/internal/fourslash/tests/gen/renameDestructuringDeclarationInForOf_test.go b/internal/fourslash/tests/gen/renameDestructuringDeclarationInForOf_test.go new file mode 100644 index 0000000000..38cc70a69a --- /dev/null +++ b/internal/fourslash/tests/gen/renameDestructuringDeclarationInForOf_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameDestructuringDeclarationInForOf(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [|[|{| "contextRangeIndex": 0 |}property1|]: number;|] + property2: string; +} +var elems: I[]; + +for ([|let { [|{| "contextRangeIndex": 2 |}property1|] } of elems|]) { + [|property1|]++; +} +for ([|let { [|{| "contextRangeIndex": 5 |}property1|]: p2 } of elems|]) { +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[6], f.Ranges()[3], f.Ranges()[4]) +} diff --git a/internal/fourslash/tests/gen/renameDestructuringDeclarationInFor_test.go b/internal/fourslash/tests/gen/renameDestructuringDeclarationInFor_test.go new file mode 100644 index 0000000000..f7c735b13b --- /dev/null +++ b/internal/fourslash/tests/gen/renameDestructuringDeclarationInFor_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameDestructuringDeclarationInFor(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [|[|{| "contextRangeIndex": 0 |}property1|]: number;|] + property2: string; +} +var elems: I[]; + +var p2: number, property1: number; +for ([|let { [|{| "contextRangeIndex": 2 |}property1|]: p2 } = elems[0]|]; p2 < 100; p2++) { +} +for ([|let { [|{| "contextRangeIndex": 4 |}property1|] } = elems[0]|]; p2 < 100; p2++) { + [|property1|] = p2; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[3], f.Ranges()[5], f.Ranges()[6]) +} diff --git a/internal/fourslash/tests/gen/renameDestructuringFunctionParameter_test.go b/internal/fourslash/tests/gen/renameDestructuringFunctionParameter_test.go new file mode 100644 index 0000000000..e31c02d08d --- /dev/null +++ b/internal/fourslash/tests/gen/renameDestructuringFunctionParameter_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameDestructuringFunctionParameter(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function f([|{[|{| "contextRangeIndex": 0 |}a|]}: {[|a|]}|]) { + f({[|a|]}); +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[3], f.Ranges()[2]) +} diff --git a/internal/fourslash/tests/gen/renameDestructuringNestedBindingElement_test.go b/internal/fourslash/tests/gen/renameDestructuringNestedBindingElement_test.go new file mode 100644 index 0000000000..9ca512319f --- /dev/null +++ b/internal/fourslash/tests/gen/renameDestructuringNestedBindingElement_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameDestructuringNestedBindingElement(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MultiRobot { + name: string; + skills: { + [|[|{| "contextRangeIndex": 0|}primary|]: string;|] + secondary: string; + }; +} +let multiRobots: MultiRobot[]; +for ([|let { skills: {[|{| "contextRangeIndex": 2|}primary|]: primaryA, secondary: secondaryA } } of multiRobots|]) { + console.log(primaryA); +} +for ([|let { skills: {[|{| "contextRangeIndex": 4|}primary|], secondary } } of multiRobots|]) { + console.log([|primary|]); +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[3], f.Ranges()[5], f.Ranges()[6]) +} diff --git a/internal/fourslash/tests/gen/renameExportCrash_test.go b/internal/fourslash/tests/gen/renameExportCrash_test.go new file mode 100644 index 0000000000..ab04fe910b --- /dev/null +++ b/internal/fourslash/tests/gen/renameExportCrash_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameExportCrash(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +let a; +module.exports = /**/a; +exports["foo"] = a;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameExportSpecifier2_test.go b/internal/fourslash/tests/gen/renameExportSpecifier2_test.go new file mode 100644 index 0000000000..f0cadff970 --- /dev/null +++ b/internal/fourslash/tests/gen/renameExportSpecifier2_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameExportSpecifier2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +const name = {}; +export { name/**/ }; +// @Filename: b.ts +import { name } from './a'; +const x = name.toString();` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, &ls.UserPreferences{UseAliasesForRename: PtrTo(false)}, "") +} diff --git a/internal/fourslash/tests/gen/renameExportSpecifier_test.go b/internal/fourslash/tests/gen/renameExportSpecifier_test.go new file mode 100644 index 0000000000..590d875928 --- /dev/null +++ b/internal/fourslash/tests/gen/renameExportSpecifier_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameExportSpecifier(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +const name = {}; +export { name as name/**/ }; +// @Filename: b.ts +import { name } from './a'; +const x = name.toString();` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, &ls.UserPreferences{UseAliasesForRename: PtrTo(false)}, "") +} diff --git a/internal/fourslash/tests/gen/renameForAliasingExport01_test.go b/internal/fourslash/tests/gen/renameForAliasingExport01_test.go new file mode 100644 index 0000000000..886902a915 --- /dev/null +++ b/internal/fourslash/tests/gen/renameForAliasingExport01_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameForAliasingExport01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: foo.ts +let x = 1; + +export { /**/[|x|] as y };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameForAliasingExport02_test.go b/internal/fourslash/tests/gen/renameForAliasingExport02_test.go new file mode 100644 index 0000000000..836eea5129 --- /dev/null +++ b/internal/fourslash/tests/gen/renameForAliasingExport02_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameForAliasingExport02(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: foo.ts +let x = 1; + +export { x as /**/[|y|] };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameForDefaultExport04_test.go b/internal/fourslash/tests/gen/renameForDefaultExport04_test.go new file mode 100644 index 0000000000..21961d2e6c --- /dev/null +++ b/internal/fourslash/tests/gen/renameForDefaultExport04_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameForDefaultExport04(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: foo.ts +export default class /**/[|DefaultExportedClass|] { +} +/* + * Commenting DefaultExportedClass + */ + +var x: DefaultExportedClass; + +var y = new DefaultExportedClass;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameForDefaultExport05_test.go b/internal/fourslash/tests/gen/renameForDefaultExport05_test.go new file mode 100644 index 0000000000..3238fde37b --- /dev/null +++ b/internal/fourslash/tests/gen/renameForDefaultExport05_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameForDefaultExport05(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: foo.ts +export default class DefaultExportedClass { +} +/* + * Commenting DefaultExportedClass + */ + +var x: /**/[|DefaultExportedClass|]; + +var y = new DefaultExportedClass;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameForDefaultExport06_test.go b/internal/fourslash/tests/gen/renameForDefaultExport06_test.go new file mode 100644 index 0000000000..c59054b118 --- /dev/null +++ b/internal/fourslash/tests/gen/renameForDefaultExport06_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameForDefaultExport06(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: foo.ts +export default class DefaultExportedClass { +} +/* + * Commenting DefaultExportedClass + */ + +var x: DefaultExportedClass; + +var y = new /**/[|DefaultExportedClass|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameForDefaultExport07_test.go b/internal/fourslash/tests/gen/renameForDefaultExport07_test.go new file mode 100644 index 0000000000..b9999f2dee --- /dev/null +++ b/internal/fourslash/tests/gen/renameForDefaultExport07_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameForDefaultExport07(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: foo.ts +export default function /**/[|DefaultExportedFunction|]() { + return DefaultExportedFunction +} +/** + * Commenting DefaultExportedFunction + */ + +var x: typeof DefaultExportedFunction; + +var y = DefaultExportedFunction();` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameForDefaultExport08_test.go b/internal/fourslash/tests/gen/renameForDefaultExport08_test.go new file mode 100644 index 0000000000..939fab24fd --- /dev/null +++ b/internal/fourslash/tests/gen/renameForDefaultExport08_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameForDefaultExport08(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: foo.ts +export default function DefaultExportedFunction() { + return /**/[|DefaultExportedFunction|] +} +/** + * Commenting DefaultExportedFunction + */ + +var x: typeof DefaultExportedFunction; + +var y = DefaultExportedFunction();` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameForDefaultExport09_test.go b/internal/fourslash/tests/gen/renameForDefaultExport09_test.go new file mode 100644 index 0000000000..25be2af5f4 --- /dev/null +++ b/internal/fourslash/tests/gen/renameForDefaultExport09_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameForDefaultExport09(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: foo.ts +function /**/[|f|]() { + return 100; +} + +export default f; + +var x: typeof f; + +var y = f(); + +/** + * Commenting f + */ +namespace f { + var local = 100; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameForStringLiteral_test.go b/internal/fourslash/tests/gen/renameForStringLiteral_test.go new file mode 100644 index 0000000000..befb3c621e --- /dev/null +++ b/internal/fourslash/tests/gen/renameForStringLiteral_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameForStringLiteral(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @filename: /a.ts +interface Foo { + property: /**/"foo"; +} +/** + * @type {{ property: "foo"}} + */ +const obj: Foo = { + property: "foo", +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameFromNodeModulesDep1_test.go b/internal/fourslash/tests/gen/renameFromNodeModulesDep1_test.go new file mode 100644 index 0000000000..9a27b151dd --- /dev/null +++ b/internal/fourslash/tests/gen/renameFromNodeModulesDep1_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameFromNodeModulesDep1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /index.ts +import { /*okWithAlias*/[|Foo|] } from "foo"; +declare const f: Foo; +f./*notOk*/bar; +// @Filename: /tsconfig.json + { } +// @Filename: /node_modules/foo/package.json + { "types": "index.d.ts" } +// @Filename: /node_modules/foo/index.d.ts +export interface Foo { + bar: string; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "okWithAlias") + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.VerifyRenameFailed(t, nil /*preferences*/) + f.GoToMarker(t, "notOk") + f.VerifyRenameFailed(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameFromNodeModulesDep2_test.go b/internal/fourslash/tests/gen/renameFromNodeModulesDep2_test.go new file mode 100644 index 0000000000..de802217ec --- /dev/null +++ b/internal/fourslash/tests/gen/renameFromNodeModulesDep2_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameFromNodeModulesDep2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /node_modules/first/index.d.ts +import { /*okWithAlias*/[|Foo|] } from "foo"; +declare type FooBar = Foo[/*notOk*/"bar"]; +// @Filename: /node_modules/first/node_modules/foo/package.json + { "types": "index.d.ts" } +// @Filename: /node_modules/first/node_modules/foo/index.d.ts +export interface Foo { + /*ok2*/[|bar|]: string; +} +// @Filename: /node_modules/first/node_modules/foo/bar.d.ts +import { Foo } from "./index"; +declare type FooBar = Foo[/*ok3*/"[|bar|]"];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "okWithAlias") + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.VerifyRenameFailed(t, nil /*preferences*/) + f.GoToMarker(t, "notOk") + f.VerifyRenameFailed(t, nil /*preferences*/) + f.GoToMarker(t, "ok2") + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.GoToMarker(t, "ok3") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameFromNodeModulesDep3_test.go b/internal/fourslash/tests/gen/renameFromNodeModulesDep3_test.go new file mode 100644 index 0000000000..11016c493a --- /dev/null +++ b/internal/fourslash/tests/gen/renameFromNodeModulesDep3_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameFromNodeModulesDep3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /packages/first/index.d.ts +import { /*ok*/[|Foo|] } from "foo"; +declare type FooBar = Foo[/*ok2*/"[|bar|]"]; +// @Filename: /packages/foo/package.json + { "types": "index.d.ts" } +// @Filename: /packages/foo/index.d.ts +export interface Foo { + /*ok3*/[|bar|]: string; +} +// @link: /packages/foo -> /packages/first/node_modules/foo` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "ok") + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.GoToMarker(t, "ok2") + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.GoToMarker(t, "ok3") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameFromNodeModulesDep4_test.go b/internal/fourslash/tests/gen/renameFromNodeModulesDep4_test.go new file mode 100644 index 0000000000..24d4102eac --- /dev/null +++ b/internal/fourslash/tests/gen/renameFromNodeModulesDep4_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameFromNodeModulesDep4(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /index.ts +import hljs from "highlight.js/lib/core" +import { h } from "highlight.js/lib/core"; +import { /*notOk*/h as hh } from "highlight.js/lib/core"; +/*ok*/[|hljs|]; +/*okWithAlias*/[|h|]; +/*ok2*/[|hh|]; +// @Filename: /node_modules/highlight.js/lib/core.d.ts +declare const hljs: { registerLanguage(s: string): void }; +export default hljs; +export const h: string; +// @Filename: /tsconfig.json +{}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "ok") + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.GoToMarker(t, "ok2") + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.GoToMarker(t, "notOk") + f.VerifyRenameFailed(t, nil /*preferences*/) + f.VerifyRenameFailed(t, nil /*preferences*/) + f.GoToMarker(t, "okWithAlias") + f.VerifyRenameSucceeded(t, nil /*preferences*/) + f.VerifyRenameFailed(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameFunctionParameter1_test.go b/internal/fourslash/tests/gen/renameFunctionParameter1_test.go new file mode 100644 index 0000000000..cf87638072 --- /dev/null +++ b/internal/fourslash/tests/gen/renameFunctionParameter1_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameFunctionParameter1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function Foo() { + /** + * @param {number} p + */ + this.foo = function foo(p/**/) { + return p; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameFunctionParameter2_test.go b/internal/fourslash/tests/gen/renameFunctionParameter2_test.go new file mode 100644 index 0000000000..87da9195df --- /dev/null +++ b/internal/fourslash/tests/gen/renameFunctionParameter2_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameFunctionParameter2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/** + * @param {number} p + */ +const foo = function foo(p/**/) { + return p; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameImportAndExportInDiffFiles_test.go b/internal/fourslash/tests/gen/renameImportAndExportInDiffFiles_test.go new file mode 100644 index 0000000000..6204bbdf6d --- /dev/null +++ b/internal/fourslash/tests/gen/renameImportAndExportInDiffFiles_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameImportAndExportInDiffFiles(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +[|export var /*1*/[|{| "isDefinition": true, "contextRangeIndex": 0 |}a|];|] +// @Filename: b.ts +[|import { /*2*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}a|] } from './a';|] +[|export { /*3*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 4 |}a|] };|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineFindAllReferences(t, "1", "2", "3") + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[3], f.Ranges()[5]) +} diff --git a/internal/fourslash/tests/gen/renameImportAndExport_test.go b/internal/fourslash/tests/gen/renameImportAndExport_test.go new file mode 100644 index 0000000000..f6b3c4f6d5 --- /dev/null +++ b/internal/fourslash/tests/gen/renameImportAndExport_test.go @@ -0,0 +1,18 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameImportAndExport(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|import [|{| "contextRangeIndex": 0 |}a|] from "module";|] +[|export { [|{| "contextRangeIndex": 2 |}a|] };|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[3]) +} diff --git a/internal/fourslash/tests/gen/renameImportAndShorthand_test.go b/internal/fourslash/tests/gen/renameImportAndShorthand_test.go new file mode 100644 index 0000000000..5e77b7e07c --- /dev/null +++ b/internal/fourslash/tests/gen/renameImportAndShorthand_test.go @@ -0,0 +1,18 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameImportAndShorthand(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|import [|{| "contextRangeIndex": 0 |}foo|] from 'bar';|] +const bar = { [|foo|] };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[2]) +} diff --git a/internal/fourslash/tests/gen/renameImportNamespaceAndShorthand_test.go b/internal/fourslash/tests/gen/renameImportNamespaceAndShorthand_test.go new file mode 100644 index 0000000000..c8b7bae5af --- /dev/null +++ b/internal/fourslash/tests/gen/renameImportNamespaceAndShorthand_test.go @@ -0,0 +1,18 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameImportNamespaceAndShorthand(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|import * as [|{| "contextRangeIndex": 0 |}foo|] from 'bar';|] +const bar = { [|foo|] };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[2]) +} diff --git a/internal/fourslash/tests/gen/renameImportOfExportEquals_test.go b/internal/fourslash/tests/gen/renameImportOfExportEquals_test.go new file mode 100644 index 0000000000..f566d24737 --- /dev/null +++ b/internal/fourslash/tests/gen/renameImportOfExportEquals_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameImportOfExportEquals(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|declare namespace /*N*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}N|] { + [|export var /*x*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}x|]: number;|] +}|] +declare module "mod" { + [|export = [|{| "contextRangeIndex": 4 |}N|];|] +} +declare module "a" { + [|import * as /*a*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 6 |}N|] from "mod";|] + [|export { [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 8 |}N|] };|] // Renaming N here would rename +} +declare module "b" { + [|import { /*b*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 10 |}N|] } from "a";|] + export const y: typeof [|N|].[|x|]; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineFindAllReferences(t, "N", "a", "b", "x") + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[5]) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[7]) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[9]) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[11], f.Ranges()[12]) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[3], f.Ranges()[13]) +} diff --git a/internal/fourslash/tests/gen/renameImportRequire_test.go b/internal/fourslash/tests/gen/renameImportRequire_test.go new file mode 100644 index 0000000000..358938bf06 --- /dev/null +++ b/internal/fourslash/tests/gen/renameImportRequire_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameImportRequire(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /a.ts +[|import [|{| "contextRangeIndex": 0 |}e|] = require("mod4");|] +[|e|]; +a = { [|e|] }; +[|export { [|{| "contextRangeIndex": 4 |}e|] };|] +// @Filename: /b.ts +[|import { [|{| "contextRangeIndex": 6 |}e|] } from "./a";|] +[|export { [|{| "contextRangeIndex": 8 |}e|] };|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[2], f.Ranges()[3], f.Ranges()[5], f.Ranges()[7], f.Ranges()[9]) +} diff --git a/internal/fourslash/tests/gen/renameImportSpecifierPropertyName_test.go b/internal/fourslash/tests/gen/renameImportSpecifierPropertyName_test.go new file mode 100644 index 0000000000..37bb695b38 --- /dev/null +++ b/internal/fourslash/tests/gen/renameImportSpecifierPropertyName_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameImportSpecifierPropertyName(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: canada.ts +export interface /**/Ginger {} +// @Filename: dry.ts +import { Ginger as Ale } from './canada';` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameInConfiguredProject_test.go b/internal/fourslash/tests/gen/renameInConfiguredProject_test.go new file mode 100644 index 0000000000..4e9262843d --- /dev/null +++ b/internal/fourslash/tests/gen/renameInConfiguredProject_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameInConfiguredProject(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: referencesForGlobals_1.ts +[|var [|{| "contextRangeIndex": 0 |}globalName|] = 0;|] +// @Filename: referencesForGlobals_2.ts +var y = [|globalName|]; +// @Filename: tsconfig.json +{ "files": ["referencesForGlobals_1.ts", "referencesForGlobals_2.ts"] }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, ToAny(f.Ranges()[1:])...) +} diff --git a/internal/fourslash/tests/gen/renameInfoForFunctionExpression01_test.go b/internal/fourslash/tests/gen/renameInfoForFunctionExpression01_test.go new file mode 100644 index 0000000000..df4dde5e67 --- /dev/null +++ b/internal/fourslash/tests/gen/renameInfoForFunctionExpression01_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameInfoForFunctionExpression01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x = function /**/[|f|](g: any, h: any) { + f(f, g); +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameInheritedProperties1_test.go b/internal/fourslash/tests/gen/renameInheritedProperties1_test.go new file mode 100644 index 0000000000..dd2e656754 --- /dev/null +++ b/internal/fourslash/tests/gen/renameInheritedProperties1_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameInheritedProperties1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class class1 extends class1 { + [|[|{| "contextRangeIndex": 0 |}propName|]: string;|] +} + +var v: class1; +v.[|propName|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "propName") +} diff --git a/internal/fourslash/tests/gen/renameInheritedProperties2_test.go b/internal/fourslash/tests/gen/renameInheritedProperties2_test.go new file mode 100644 index 0000000000..c83f4da4bd --- /dev/null +++ b/internal/fourslash/tests/gen/renameInheritedProperties2_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameInheritedProperties2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class class1 extends class1 { + [|[|{| "contextRangeIndex": 0 |}doStuff|]() { }|] +} + +var v: class1; +v.[|doStuff|]();` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "doStuff") +} diff --git a/internal/fourslash/tests/gen/renameInheritedProperties3_test.go b/internal/fourslash/tests/gen/renameInheritedProperties3_test.go new file mode 100644 index 0000000000..2607076e9c --- /dev/null +++ b/internal/fourslash/tests/gen/renameInheritedProperties3_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameInheritedProperties3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface interface1 extends interface1 { + [|[|{| "contextRangeIndex": 0 |}propName|]: string;|] +} + +var v: interface1; +v.[|propName|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "propName") +} diff --git a/internal/fourslash/tests/gen/renameInheritedProperties4_test.go b/internal/fourslash/tests/gen/renameInheritedProperties4_test.go new file mode 100644 index 0000000000..cfebc1cff7 --- /dev/null +++ b/internal/fourslash/tests/gen/renameInheritedProperties4_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameInheritedProperties4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface interface1 extends interface1 { + [|[|{| "contextRangeIndex": 0 |}doStuff|](): string;|] +} + +var v: interface1; +v.[|doStuff|]();` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "doStuff") +} diff --git a/internal/fourslash/tests/gen/renameInheritedProperties5_test.go b/internal/fourslash/tests/gen/renameInheritedProperties5_test.go new file mode 100644 index 0000000000..35681dfde7 --- /dev/null +++ b/internal/fourslash/tests/gen/renameInheritedProperties5_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameInheritedProperties5(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface C extends D { + propC: number; +} +interface D extends C { + [|[|{| "contextRangeIndex": 0 |}propD|]: string;|] +} +var d: D; +d.[|propD|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "propD") +} diff --git a/internal/fourslash/tests/gen/renameInheritedProperties6_test.go b/internal/fourslash/tests/gen/renameInheritedProperties6_test.go new file mode 100644 index 0000000000..8615a8163b --- /dev/null +++ b/internal/fourslash/tests/gen/renameInheritedProperties6_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameInheritedProperties6(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface C extends D { + propD: number; +} +interface D extends C { + [|[|{| "contextRangeIndex": 0 |}propC|]: number;|] +} +var d: D; +d.[|propC|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "propC") +} diff --git a/internal/fourslash/tests/gen/renameInheritedProperties7_test.go b/internal/fourslash/tests/gen/renameInheritedProperties7_test.go new file mode 100644 index 0000000000..96a6135daa --- /dev/null +++ b/internal/fourslash/tests/gen/renameInheritedProperties7_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameInheritedProperties7(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class C extends D { + [|[|{| "contextRangeIndex": 0 |}prop1|]: string;|] +} + +class D extends C { + prop1: string; +} + +var c: C; +c.[|prop1|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "prop1") +} diff --git a/internal/fourslash/tests/gen/renameInheritedProperties8_test.go b/internal/fourslash/tests/gen/renameInheritedProperties8_test.go new file mode 100644 index 0000000000..865d4972fb --- /dev/null +++ b/internal/fourslash/tests/gen/renameInheritedProperties8_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameInheritedProperties8(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class C implements D { + [|[|{| "contextRangeIndex": 0 |}prop1|]: string;|] +} + +interface D extends C { + [|[|{| "contextRangeIndex": 2 |}prop1|]: string;|] +} + +var c: C; +c.[|prop1|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "prop1") +} diff --git a/internal/fourslash/tests/gen/renameJSDocNamepath_test.go b/internal/fourslash/tests/gen/renameJSDocNamepath_test.go new file mode 100644 index 0000000000..4c70cee492 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJSDocNamepath_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJSDocNamepath(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @noLib: true +/** + * @type {module:foo/A} x + */ +var x = 1 +var /*0*/A = 0;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "0") +} diff --git a/internal/fourslash/tests/gen/renameJsDocImportTag_test.go b/internal/fourslash/tests/gen/renameJsDocImportTag_test.go new file mode 100644 index 0000000000..2197b60535 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsDocImportTag_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsDocImportTag(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJS: true +// @checkJs: true +// @Filename: /b.ts +export interface A { } +// @Filename: /a.js +/** + * @import { A } from "./b"; + */ + +/** + * @param { [|A/**/|] } a + */ +function f(a) {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameJsDocTypeLiteral_test.go b/internal/fourslash/tests/gen/renameJsDocTypeLiteral_test.go new file mode 100644 index 0000000000..29d606f9e0 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsDocTypeLiteral_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsDocTypeLiteral(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @checkJs: true +// @filename: /a.js +/** + * @param {Object} options + * @param {string} options.foo + * @param {number} options.bar + */ +function foo(/**/options) {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToFile(t, "/a.js") + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameJsExports01_test.go b/internal/fourslash/tests/gen/renameJsExports01_test.go new file mode 100644 index 0000000000..6bec4c8912 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsExports01_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsExports01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +[|exports.[|{| "contextRangeIndex": 0 |}area|] = function (r) { return r * r; }|] +// @Filename: b.js +var mod = require('./a'); +var t = mod./*1*/[|area|](10);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineFindAllReferences(t, "1") + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "area") +} diff --git a/internal/fourslash/tests/gen/renameJsOverloadedFunctionParameter_test.go b/internal/fourslash/tests/gen/renameJsOverloadedFunctionParameter_test.go new file mode 100644 index 0000000000..e97ae010b5 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsOverloadedFunctionParameter_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsOverloadedFunctionParameter(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @checkJs: true +// @Filename: foo.js +/** + * @overload + * @param {number} x + * @returns {number} + * + * @overload + * @param {string} x + * @returns {string} + * + * @param {unknown} x + * @returns {unknown} + */ +function foo(x/**/) { + return x; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameJsPropertyAssignment2_test.go b/internal/fourslash/tests/gen/renameJsPropertyAssignment2_test.go new file mode 100644 index 0000000000..7bc449b11b --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsPropertyAssignment2_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsPropertyAssignment2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +class Minimatch { +} +[|Minimatch.[|{| "contextRangeIndex": 0 |}staticProperty|] = "string";|] +console.log(Minimatch.[|staticProperty|]);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "staticProperty") +} diff --git a/internal/fourslash/tests/gen/renameJsPropertyAssignment3_test.go b/internal/fourslash/tests/gen/renameJsPropertyAssignment3_test.go new file mode 100644 index 0000000000..36f2b341ec --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsPropertyAssignment3_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsPropertyAssignment3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +var C = class { +} +[|C.[|{| "contextRangeIndex": 0 |}staticProperty|] = "string";|] +console.log(C.[|staticProperty|]);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "staticProperty") +} diff --git a/internal/fourslash/tests/gen/renameJsPropertyAssignment4_test.go b/internal/fourslash/tests/gen/renameJsPropertyAssignment4_test.go new file mode 100644 index 0000000000..b91b383e9f --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsPropertyAssignment4_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsPropertyAssignment4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: /a.js +function f() { + var /*1*/foo = this; + /*2*/foo.x = 1; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToFile(t, "/a.js") + f.VerifyBaselineRename(t, nil /*preferences*/, "1", "2") +} diff --git a/internal/fourslash/tests/gen/renameJsPropertyAssignment_test.go b/internal/fourslash/tests/gen/renameJsPropertyAssignment_test.go new file mode 100644 index 0000000000..299297c8ee --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsPropertyAssignment_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsPropertyAssignment(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +function bar() { +} +[|bar.[|{| "contextRangeIndex": 0 |}foo|] = "foo";|] +console.log(bar.[|foo|]);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "foo") +} diff --git a/internal/fourslash/tests/gen/renameJsPrototypeProperty01_test.go b/internal/fourslash/tests/gen/renameJsPrototypeProperty01_test.go new file mode 100644 index 0000000000..30dc14dada --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsPrototypeProperty01_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsPrototypeProperty01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +function bar() { +} +[|bar.prototype.[|{| "contextRangeIndex": 0 |}x|] = 10;|] +var t = new bar(); +[|t.[|{| "contextRangeIndex": 2 |}x|] = 11;|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "x") +} diff --git a/internal/fourslash/tests/gen/renameJsPrototypeProperty02_test.go b/internal/fourslash/tests/gen/renameJsPrototypeProperty02_test.go new file mode 100644 index 0000000000..a6fd9fd806 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsPrototypeProperty02_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsPrototypeProperty02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +function bar() { +} +[|bar.prototype.[|{| "contextRangeIndex": 0 |}x|] = 10;|] +var t = new bar(); +[|t.[|{| "contextRangeIndex": 2 |}x|] = 11;|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "x") +} diff --git a/internal/fourslash/tests/gen/renameJsSpecialAssignmentRhs1_test.go b/internal/fourslash/tests/gen/renameJsSpecialAssignmentRhs1_test.go new file mode 100644 index 0000000000..21c30f2ba4 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsSpecialAssignmentRhs1_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsSpecialAssignmentRhs1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +const foo = { + set: function (x) { + this._x = x; + }, + copy: function ([|x|]) { + this._x = [|x|].prop; + } +};` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameJsSpecialAssignmentRhs2_test.go b/internal/fourslash/tests/gen/renameJsSpecialAssignmentRhs2_test.go new file mode 100644 index 0000000000..5c6afe91d4 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsSpecialAssignmentRhs2_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsSpecialAssignmentRhs2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +const foo = { + set: function (x) { + this._x = x; + }, + copy: function ([|x|]) { + this._x = [|x|].prop; + } +};` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameJsThisProperty01_test.go b/internal/fourslash/tests/gen/renameJsThisProperty01_test.go new file mode 100644 index 0000000000..823d68f901 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsThisProperty01_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsThisProperty01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +function bar() { + [|this.[|{| "contextRangeIndex": 0 |}x|] = 10;|] +} +var t = new bar(); +[|t.[|{| "contextRangeIndex": 2 |}x|] = 11;|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "x") +} diff --git a/internal/fourslash/tests/gen/renameJsThisProperty03_test.go b/internal/fourslash/tests/gen/renameJsThisProperty03_test.go new file mode 100644 index 0000000000..c1bbdbaba3 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsThisProperty03_test.go @@ -0,0 +1,25 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsThisProperty03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +class C { + constructor(y) { + [|this.[|{| "contextRangeIndex": 0 |}x|] = y;|] + } +} +var t = new C(12); +[|t.[|{| "contextRangeIndex": 2 |}x|] = 11;|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "x") +} diff --git a/internal/fourslash/tests/gen/renameJsThisProperty05_test.go b/internal/fourslash/tests/gen/renameJsThisProperty05_test.go new file mode 100644 index 0000000000..3acd7ef894 --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsThisProperty05_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsThisProperty05(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +class C { + constructor(y) { + this.x = y; + } +} +[|C.prototype.[|{| "contextRangeIndex": 0 |}z|] = 1;|] +var t = new C(12); +[|t.[|{| "contextRangeIndex": 2 |}z|] = 11;|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "z") +} diff --git a/internal/fourslash/tests/gen/renameJsThisProperty06_test.go b/internal/fourslash/tests/gen/renameJsThisProperty06_test.go new file mode 100644 index 0000000000..f39f3fdafc --- /dev/null +++ b/internal/fourslash/tests/gen/renameJsThisProperty06_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameJsThisProperty06(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +var C = class { + constructor(y) { + this.x = y; + } +} +[|C.prototype.[|{| "contextRangeIndex": 0 |}z|] = 1;|] +var t = new C(12); +[|t.[|{| "contextRangeIndex": 2 |}z|] = 11;|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "z") +} diff --git a/internal/fourslash/tests/gen/renameLabel1_test.go b/internal/fourslash/tests/gen/renameLabel1_test.go new file mode 100644 index 0000000000..cd936bf99e --- /dev/null +++ b/internal/fourslash/tests/gen/renameLabel1_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameLabel1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `foo: { + break /**/foo; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameLabel2_test.go b/internal/fourslash/tests/gen/renameLabel2_test.go new file mode 100644 index 0000000000..f1882eddf6 --- /dev/null +++ b/internal/fourslash/tests/gen/renameLabel2_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameLabel2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/**/foo: { + break foo; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameLabel3_test.go b/internal/fourslash/tests/gen/renameLabel3_test.go new file mode 100644 index 0000000000..faaf5bbf98 --- /dev/null +++ b/internal/fourslash/tests/gen/renameLabel3_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameLabel3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/**/loop: +for (let i = 0; i <= 10; i++) { + if (i === 0) continue loop; + if (i === 1) continue loop; + if (i === 10) break loop; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameLabel4_test.go b/internal/fourslash/tests/gen/renameLabel4_test.go new file mode 100644 index 0000000000..1d2afa0adb --- /dev/null +++ b/internal/fourslash/tests/gen/renameLabel4_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameLabel4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `loop: +for (let i = 0; i <= 10; i++) { + if (i === 0) continue loop; + if (i === 1) continue /**/loop; + if (i === 10) break loop; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameLabel5_test.go b/internal/fourslash/tests/gen/renameLabel5_test.go new file mode 100644 index 0000000000..db63a2c6c9 --- /dev/null +++ b/internal/fourslash/tests/gen/renameLabel5_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameLabel5(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `loop1: for (let i = 0; i <= 10; i++) { + loop2: for (let j = 0; j <= 10; j++) { + if (i === 5) continue /**/loop1; + if (j === 5) break loop2; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameLabel6_test.go b/internal/fourslash/tests/gen/renameLabel6_test.go new file mode 100644 index 0000000000..2c7c13a19a --- /dev/null +++ b/internal/fourslash/tests/gen/renameLabel6_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameLabel6(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `loop1: for (let i = 0; i <= 10; i++) { + loop2: for (let j = 0; j <= 10; j++) { + if (i === 5) continue loop1; + if (j === 5) break /**/loop2; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameLocationsForClassExpression01_test.go b/internal/fourslash/tests/gen/renameLocationsForClassExpression01_test.go new file mode 100644 index 0000000000..d77a896133 --- /dev/null +++ b/internal/fourslash/tests/gen/renameLocationsForClassExpression01_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameLocationsForClassExpression01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { +} + +var x = [|class [|{| "contextRangeIndex": 0 |}Foo|] { + doIt() { + return [|Foo|]; + } + + static doItStatically() { + return [|Foo|].y; + } +}|] + +var y = class { + getSomeName() { + return Foo + } +} +var z = class Foo {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "Foo") +} diff --git a/internal/fourslash/tests/gen/renameLocationsForFunctionExpression01_test.go b/internal/fourslash/tests/gen/renameLocationsForFunctionExpression01_test.go new file mode 100644 index 0000000000..1630a25c47 --- /dev/null +++ b/internal/fourslash/tests/gen/renameLocationsForFunctionExpression01_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameLocationsForFunctionExpression01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x = [|function [|{| "contextRangeIndex": 0 |}f|](g: any, h: any) { + [|f|]([|f|], g); +}|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "f") +} diff --git a/internal/fourslash/tests/gen/renameLocationsForFunctionExpression02_test.go b/internal/fourslash/tests/gen/renameLocationsForFunctionExpression02_test.go new file mode 100644 index 0000000000..db51f9110a --- /dev/null +++ b/internal/fourslash/tests/gen/renameLocationsForFunctionExpression02_test.go @@ -0,0 +1,25 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameLocationsForFunctionExpression02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function f() { + +} +var x = [|function [|{| "contextRangeIndex": 0 |}f|](g: any, h: any) { + + let helper = function f(): any { f(); } + + let foo = () => [|f|]([|f|], g); +}|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "f") +} diff --git a/internal/fourslash/tests/gen/renameModifiers_test.go b/internal/fourslash/tests/gen/renameModifiers_test.go new file mode 100644 index 0000000000..448392fc79 --- /dev/null +++ b/internal/fourslash/tests/gen/renameModifiers_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameModifiers(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|[|declare|] [|abstract|] class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -3 |}C1|] { + [|[|static|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}a|];|] + [|[|readonly|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}b|];|] + [|[|public|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}c|];|] + [|[|protected|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}d|];|] + [|[|private|] [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}e|];|] +}|] +[|[|const|] enum [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}E|] { +}|] +[|[|async|] function [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -2 |}fn|]() {}|] +[|[|export|] [|default|] class [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeDelta": -3 |}C2|] {}|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[2], f.Ranges()[5], f.Ranges()[8], f.Ranges()[11], f.Ranges()[14], f.Ranges()[17], f.Ranges()[20], f.Ranges()[23], f.Ranges()[26], f.Ranges()[27]) +} diff --git a/internal/fourslash/tests/gen/renameModuleExportsProperties1_test.go b/internal/fourslash/tests/gen/renameModuleExportsProperties1_test.go new file mode 100644 index 0000000000..657685a1d9 --- /dev/null +++ b/internal/fourslash/tests/gen/renameModuleExportsProperties1_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameModuleExportsProperties1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|class [|{| "contextRangeIndex": 0 |}A|] {}|] +module.exports = { [|A|] }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, &ls.UserPreferences{UseAliasesForRename: PtrTo(true)}, f.Ranges()[1], f.Ranges()[2]) +} diff --git a/internal/fourslash/tests/gen/renameModuleExportsProperties2_test.go b/internal/fourslash/tests/gen/renameModuleExportsProperties2_test.go new file mode 100644 index 0000000000..2787bf2570 --- /dev/null +++ b/internal/fourslash/tests/gen/renameModuleExportsProperties2_test.go @@ -0,0 +1,18 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameModuleExportsProperties2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|class [|{| "contextRangeIndex": 0 |}A|] {}|] +module.exports = { B: [|A|] }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[2]) +} diff --git a/internal/fourslash/tests/gen/renameModuleExportsProperties3_test.go b/internal/fourslash/tests/gen/renameModuleExportsProperties3_test.go new file mode 100644 index 0000000000..8c3e219207 --- /dev/null +++ b/internal/fourslash/tests/gen/renameModuleExportsProperties3_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameModuleExportsProperties3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +[|class [|{| "contextRangeIndex": 0 |}A|] {}|] +module.exports = { [|A|] }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, &ls.UserPreferences{UseAliasesForRename: PtrTo(true)}, f.Ranges()[1], f.Ranges()[2]) +} diff --git a/internal/fourslash/tests/gen/renameNameOnEnumMember_test.go b/internal/fourslash/tests/gen/renameNameOnEnumMember_test.go new file mode 100644 index 0000000000..8b5f1dcbb7 --- /dev/null +++ b/internal/fourslash/tests/gen/renameNameOnEnumMember_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameNameOnEnumMember(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `enum e { + firstMember, + secondMember, + thirdMember +} +var enumMember = e.[|/**/thirdMember|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameNamedImport_test.go b/internal/fourslash/tests/gen/renameNamedImport_test.go new file mode 100644 index 0000000000..71524eaf77 --- /dev/null +++ b/internal/fourslash/tests/gen/renameNamedImport_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameNamedImport(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/lib/tsconfig.json +{} +// @Filename: /home/src/workspaces/project/lib/index.ts +const unrelatedLocalVariable = 123; +export const someExportedVariable = unrelatedLocalVariable; +// @Filename: /home/src/workspaces/project/src/tsconfig.json +{} +// @Filename: /home/src/workspaces/project/src/index.ts +import { /*i*/someExportedVariable } from '../lib/index'; +someExportedVariable; +// @Filename: /home/src/workspaces/project/tsconfig.json +{}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToFile(t, "/home/src/workspaces/project/lib/index.ts") + f.GoToFile(t, "/home/src/workspaces/project/src/index.ts") + f.VerifyBaselineRename(t, &ls.UserPreferences{UseAliasesForRename: PtrTo(true)}, "i") +} diff --git a/internal/fourslash/tests/gen/renameNamespaceImport_test.go b/internal/fourslash/tests/gen/renameNamespaceImport_test.go new file mode 100644 index 0000000000..f70dbbd6a4 --- /dev/null +++ b/internal/fourslash/tests/gen/renameNamespaceImport_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameNamespaceImport(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/lib/tsconfig.json +{} +// @Filename: /home/src/workspaces/project/lib/index.ts +const unrelatedLocalVariable = 123; +export const someExportedVariable = unrelatedLocalVariable; +// @Filename: /home/src/workspaces/project/src/tsconfig.json +{} +// @Filename: /home/src/workspaces/project/src/index.ts +import * as /*i*/lib from '../lib/index'; +lib.someExportedVariable; +// @Filename: /home/src/workspaces/project/tsconfig.json +{}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToFile(t, "/home/src/workspaces/project/lib/index.ts") + f.GoToFile(t, "/home/src/workspaces/project/src/index.ts") + f.VerifyBaselineRename(t, nil /*preferences*/, "i") +} diff --git a/internal/fourslash/tests/gen/renameNoDefaultLib_test.go b/internal/fourslash/tests/gen/renameNoDefaultLib_test.go new file mode 100644 index 0000000000..51dc6cff23 --- /dev/null +++ b/internal/fourslash/tests/gen/renameNoDefaultLib_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameNoDefaultLib(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @checkJs: true +// @allowJs: true +// @Filename: /foo.js +// @ts-check +/// +const [|/**/foo|] = 1;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renameNumericalIndexSingleQuoted_test.go b/internal/fourslash/tests/gen/renameNumericalIndexSingleQuoted_test.go new file mode 100644 index 0000000000..ecef90cedf --- /dev/null +++ b/internal/fourslash/tests/gen/renameNumericalIndexSingleQuoted_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameNumericalIndexSingleQuoted(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const foo = { [|0|]: true }; +foo[[|0|]];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, &ls.UserPreferences{QuotePreference: PtrTo(ls.QuotePreference("single"))}, "0") +} diff --git a/internal/fourslash/tests/gen/renameNumericalIndex_test.go b/internal/fourslash/tests/gen/renameNumericalIndex_test.go new file mode 100644 index 0000000000..95ea0102ec --- /dev/null +++ b/internal/fourslash/tests/gen/renameNumericalIndex_test.go @@ -0,0 +1,18 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameNumericalIndex(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const foo = { [|0|]: true }; +foo[[|0|]];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "0") +} diff --git a/internal/fourslash/tests/gen/renameObjectBindingElementPropertyName01_test.go b/internal/fourslash/tests/gen/renameObjectBindingElementPropertyName01_test.go new file mode 100644 index 0000000000..2fc4d0a039 --- /dev/null +++ b/internal/fourslash/tests/gen/renameObjectBindingElementPropertyName01_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameObjectBindingElementPropertyName01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [|[|{| "contextRangeIndex": 0 |}property1|]: number;|] + property2: string; +} + +var foo: I; +[|var { [|{| "contextRangeIndex": 2 |}property1|]: prop1 } = foo;|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "property1") +} diff --git a/internal/fourslash/tests/gen/renameObjectSpreadAssignment_test.go b/internal/fourslash/tests/gen/renameObjectSpreadAssignment_test.go new file mode 100644 index 0000000000..906eb7ad31 --- /dev/null +++ b/internal/fourslash/tests/gen/renameObjectSpreadAssignment_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameObjectSpreadAssignment(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A1 { a: number }; +interface A2 { a?: number }; +[|let [|{| "contextRangeIndex": 0 |}a1|]: A1;|] +[|let [|{| "contextRangeIndex": 2 |}a2|]: A2;|] +let a12 = { ...[|a1|], ...[|a2|] };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[4], f.Ranges()[3], f.Ranges()[5]) +} diff --git a/internal/fourslash/tests/gen/renameObjectSpread_test.go b/internal/fourslash/tests/gen/renameObjectSpread_test.go new file mode 100644 index 0000000000..b4a0358a87 --- /dev/null +++ b/internal/fourslash/tests/gen/renameObjectSpread_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameObjectSpread(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A1 { [|[|{| "contextRangeIndex": 0 |}a|]: number|] }; +interface A2 { [|[|{| "contextRangeIndex": 2 |}a|]?: number|] }; +let a1: A1; +let a2: A2; +let a12 = { ...a1, ...a2 }; +a12.[|a|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[3], f.Ranges()[4]) +} diff --git a/internal/fourslash/tests/gen/renameParameterPropertyDeclaration1_test.go b/internal/fourslash/tests/gen/renameParameterPropertyDeclaration1_test.go new file mode 100644 index 0000000000..e48a017059 --- /dev/null +++ b/internal/fourslash/tests/gen/renameParameterPropertyDeclaration1_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameParameterPropertyDeclaration1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + constructor([|private [|{| "contextRangeIndex": 0 |}privateParam|]: number|]) { + let localPrivate = [|privateParam|]; + this.[|privateParam|] += 10; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "privateParam") +} diff --git a/internal/fourslash/tests/gen/renameParameterPropertyDeclaration2_test.go b/internal/fourslash/tests/gen/renameParameterPropertyDeclaration2_test.go new file mode 100644 index 0000000000..0ed9c6e3c6 --- /dev/null +++ b/internal/fourslash/tests/gen/renameParameterPropertyDeclaration2_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameParameterPropertyDeclaration2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + constructor([|public [|{| "contextRangeIndex": 0 |}publicParam|]: number|]) { + let publicParam = [|publicParam|]; + this.[|publicParam|] += 10; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "publicParam") +} diff --git a/internal/fourslash/tests/gen/renameParameterPropertyDeclaration3_test.go b/internal/fourslash/tests/gen/renameParameterPropertyDeclaration3_test.go new file mode 100644 index 0000000000..bfa14f074e --- /dev/null +++ b/internal/fourslash/tests/gen/renameParameterPropertyDeclaration3_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameParameterPropertyDeclaration3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + constructor([|protected [|{| "contextRangeIndex": 0 |}protectedParam|]: number|]) { + let protectedParam = [|protectedParam|]; + this.[|protectedParam|] += 10; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "protectedParam") +} diff --git a/internal/fourslash/tests/gen/renameParameterPropertyDeclaration4_test.go b/internal/fourslash/tests/gen/renameParameterPropertyDeclaration4_test.go new file mode 100644 index 0000000000..c0134dddf3 --- /dev/null +++ b/internal/fourslash/tests/gen/renameParameterPropertyDeclaration4_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameParameterPropertyDeclaration4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + constructor([|protected { [|{| "contextRangeIndex": 0 |}protectedParam|] }|]) { + let myProtectedParam = [|protectedParam|]; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[2]) +} diff --git a/internal/fourslash/tests/gen/renameParameterPropertyDeclaration5_test.go b/internal/fourslash/tests/gen/renameParameterPropertyDeclaration5_test.go new file mode 100644 index 0000000000..479c01bc2b --- /dev/null +++ b/internal/fourslash/tests/gen/renameParameterPropertyDeclaration5_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameParameterPropertyDeclaration5(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + constructor([|protected [ [|{| "contextRangeIndex": 0 |}protectedParam|] ]|]) { + let myProtectedParam = [|protectedParam|]; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "protectedParam") +} diff --git a/internal/fourslash/tests/gen/renamePrivateAccessor_test.go b/internal/fourslash/tests/gen/renamePrivateAccessor_test.go new file mode 100644 index 0000000000..8a1a64958d --- /dev/null +++ b/internal/fourslash/tests/gen/renamePrivateAccessor_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenamePrivateAccessor(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + [|get [|{| "contextRangeIndex": 0 |}#foo|]() { return 1 }|] + [|set [|{| "contextRangeIndex": 2 |}#foo|](value: number) { }|] + retFoo() { + return this.[|#foo|]; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, ToAny(f.GetRangesByText().Get("#foo"))...) +} diff --git a/internal/fourslash/tests/gen/renamePrivateFields1_test.go b/internal/fourslash/tests/gen/renamePrivateFields1_test.go new file mode 100644 index 0000000000..299c21638f --- /dev/null +++ b/internal/fourslash/tests/gen/renamePrivateFields1_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenamePrivateFields1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + [|[|{| "contextRangeIndex": 0 |}#foo|] = 1;|] + + getFoo() { + return this.[|#foo|]; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "#foo") +} diff --git a/internal/fourslash/tests/gen/renamePrivateFields_test.go b/internal/fourslash/tests/gen/renamePrivateFields_test.go new file mode 100644 index 0000000000..d57d8c3f09 --- /dev/null +++ b/internal/fourslash/tests/gen/renamePrivateFields_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenamePrivateFields(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + [|/**/#foo|] = 1; + + getFoo() { + return this.#foo; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/renamePrivateMethod_test.go b/internal/fourslash/tests/gen/renamePrivateMethod_test.go new file mode 100644 index 0000000000..95ddf5facb --- /dev/null +++ b/internal/fourslash/tests/gen/renamePrivateMethod_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenamePrivateMethod(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + [|[|{| "contextRangeIndex": 0 |}#foo|]() { }|] + callFoo() { + return this.[|#foo|](); + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, ToAny(f.GetRangesByText().Get("#foo"))...) +} diff --git a/internal/fourslash/tests/gen/renamePropertyAccessExpressionHeritageClause_test.go b/internal/fourslash/tests/gen/renamePropertyAccessExpressionHeritageClause_test.go new file mode 100644 index 0000000000..8b56104225 --- /dev/null +++ b/internal/fourslash/tests/gen/renamePropertyAccessExpressionHeritageClause_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenamePropertyAccessExpressionHeritageClause(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class B {} +function foo() { + return {[|[|{| "contextRangeIndex": 0 |}B|]: B|]}; +} +class C extends (foo()).[|B|] {} +class C1 extends foo().[|B|] {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "B") +} diff --git a/internal/fourslash/tests/gen/renameReExportDefault_test.go b/internal/fourslash/tests/gen/renameReExportDefault_test.go new file mode 100644 index 0000000000..5f10213b09 --- /dev/null +++ b/internal/fourslash/tests/gen/renameReExportDefault_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameReExportDefault(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /a.ts +export { default } from "./b"; +[|export { default as [|{| "contextRangeIndex": 0 |}b|] } from "./b";|] +export { default as bee } from "./b"; +[|import { default as [|{| "contextRangeIndex": 2 |}b|] } from "./b";|] +import { default as bee } from "./b"; +[|import [|{| "contextRangeIndex": 4 |}b|] from "./b";|] +// @Filename: /b.ts +[|const [|{| "contextRangeIndex": 6 |}b|] = 0;|] +[|export default [|{| "contextRangeIndex": 8 |}b|];|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[1], f.Ranges()[3], f.Ranges()[5], f.Ranges()[7], f.Ranges()[9]) +} diff --git a/internal/fourslash/tests/gen/renameReferenceFromLinkTag1_test.go b/internal/fourslash/tests/gen/renameReferenceFromLinkTag1_test.go new file mode 100644 index 0000000000..e82506c682 --- /dev/null +++ b/internal/fourslash/tests/gen/renameReferenceFromLinkTag1_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameReferenceFromLinkTag1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `enum E { + /** {@link /**/A} */ + A +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameReferenceFromLinkTag2_test.go b/internal/fourslash/tests/gen/renameReferenceFromLinkTag2_test.go new file mode 100644 index 0000000000..aa6d3e120c --- /dev/null +++ b/internal/fourslash/tests/gen/renameReferenceFromLinkTag2_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameReferenceFromLinkTag2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /a.ts +enum E { + /** {@link /**/Foo} */ + Foo +} +interface Foo { + foo: E.Foo; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameReferenceFromLinkTag3_test.go b/internal/fourslash/tests/gen/renameReferenceFromLinkTag3_test.go new file mode 100644 index 0000000000..2caf81f5a8 --- /dev/null +++ b/internal/fourslash/tests/gen/renameReferenceFromLinkTag3_test.go @@ -0,0 +1,25 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameReferenceFromLinkTag3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @filename: a.ts +interface Foo { + foo: E.Foo; +} +// @Filename: b.ts +enum E { + /** {@link /**/Foo} */ + Foo +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameReferenceFromLinkTag4_test.go b/internal/fourslash/tests/gen/renameReferenceFromLinkTag4_test.go new file mode 100644 index 0000000000..3305ac5307 --- /dev/null +++ b/internal/fourslash/tests/gen/renameReferenceFromLinkTag4_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameReferenceFromLinkTag4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `enum E { + /** {@link /**/B} */ + A, + B +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameReferenceFromLinkTag5_test.go b/internal/fourslash/tests/gen/renameReferenceFromLinkTag5_test.go new file mode 100644 index 0000000000..1575bdd807 --- /dev/null +++ b/internal/fourslash/tests/gen/renameReferenceFromLinkTag5_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameReferenceFromLinkTag5(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `enum E { + /** {@link E./**/A} */ + A +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameRestBindingElement_test.go b/internal/fourslash/tests/gen/renameRestBindingElement_test.go new file mode 100644 index 0000000000..31ea3a77aa --- /dev/null +++ b/internal/fourslash/tests/gen/renameRestBindingElement_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameRestBindingElement(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + a: number; + b: number; + c: number; +} +function foo([|{ a, ...[|{| "contextRangeIndex": 0 |}rest|] }: I|]) { + [|rest|]; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, &ls.UserPreferences{UseAliasesForRename: PtrTo(true)}, f.Ranges()[1]) +} diff --git a/internal/fourslash/tests/gen/renameRest_test.go b/internal/fourslash/tests/gen/renameRest_test.go new file mode 100644 index 0000000000..cc3c73daee --- /dev/null +++ b/internal/fourslash/tests/gen/renameRest_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameRest(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Gen { + x: number; + [|[|{| "contextRangeIndex": 0 |}parent|]: Gen;|] + millenial: string; +} +let t: Gen; +var { x, ...rest } = t; +rest.[|parent|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "parent") +} diff --git a/internal/fourslash/tests/gen/renameStringLiteralOk1_test.go b/internal/fourslash/tests/gen/renameStringLiteralOk1_test.go new file mode 100644 index 0000000000..78e94024b2 --- /dev/null +++ b/internal/fourslash/tests/gen/renameStringLiteralOk1_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameStringLiteralOk1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function f(): '[|foo|]' | 'bar' +class Foo { + f = f() +} +const d: 'foo' = 'foo' +declare const ff: Foo +ff.f = '[|foo|]'` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "foo") +} diff --git a/internal/fourslash/tests/gen/renameStringLiteralOk_test.go b/internal/fourslash/tests/gen/renameStringLiteralOk_test.go new file mode 100644 index 0000000000..9779a6f422 --- /dev/null +++ b/internal/fourslash/tests/gen/renameStringLiteralOk_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameStringLiteralOk(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { + f: '[|foo|]' | 'bar' +} +const d: 'foo' = 'foo' +declare const f: Foo +f.f = '[|foo|]' +f.f = ` + "`" + `[|foo|]` + "`" + `` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "foo") +} diff --git a/internal/fourslash/tests/gen/renameStringLiteralTypes1_test.go b/internal/fourslash/tests/gen/renameStringLiteralTypes1_test.go new file mode 100644 index 0000000000..9ef81dea6c --- /dev/null +++ b/internal/fourslash/tests/gen/renameStringLiteralTypes1_test.go @@ -0,0 +1,25 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameStringLiteralTypes1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface AnimationOptions { + deltaX: number; + deltaY: number; + easing: "ease-in" | "ease-out" | "[|ease-in-out|]"; +} + +function animate(o: AnimationOptions) { } + +animate({ deltaX: 100, deltaY: 100, easing: "[|ease-in-out|]" });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "ease-in-out") +} diff --git a/internal/fourslash/tests/gen/renameStringLiteralTypes2_test.go b/internal/fourslash/tests/gen/renameStringLiteralTypes2_test.go new file mode 100644 index 0000000000..1c24de97f6 --- /dev/null +++ b/internal/fourslash/tests/gen/renameStringLiteralTypes2_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameStringLiteralTypes2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type Foo = "[|a|]" | "b"; + +class C { + p: Foo = "[|a|]"; + m() { + if (this.p === "[|a|]") {} + if ("[|a|]" === this.p) {} + + if (this.p !== "[|a|]") {} + if ("[|a|]" !== this.p) {} + + if (this.p == "[|a|]") {} + if ("[|a|]" == this.p) {} + + if (this.p != "[|a|]") {} + if ("[|a|]" != this.p) {} + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "a") +} diff --git a/internal/fourslash/tests/gen/renameStringLiteralTypes3_test.go b/internal/fourslash/tests/gen/renameStringLiteralTypes3_test.go new file mode 100644 index 0000000000..7a9243df32 --- /dev/null +++ b/internal/fourslash/tests/gen/renameStringLiteralTypes3_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameStringLiteralTypes3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type Foo = "[|a|]" | "b"; + +class C { + p: Foo = "[|a|]"; + m() { + switch (this.p) { + case "[|a|]": + return 1; + case "b": + return 2; + } + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "a") +} diff --git a/internal/fourslash/tests/gen/renameStringLiteralTypes4_test.go b/internal/fourslash/tests/gen/renameStringLiteralTypes4_test.go new file mode 100644 index 0000000000..01a338b5ce --- /dev/null +++ b/internal/fourslash/tests/gen/renameStringLiteralTypes4_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameStringLiteralTypes4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + "Prop 1": string; +} + +declare const fn: (p: K) => void + +fn("Prop 1"/**/)` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameStringLiteralTypes5_test.go b/internal/fourslash/tests/gen/renameStringLiteralTypes5_test.go new file mode 100644 index 0000000000..e22ee91227 --- /dev/null +++ b/internal/fourslash/tests/gen/renameStringLiteralTypes5_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameStringLiteralTypes5(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type T = { + "Prop 1": string; +} + +declare const fn: (p: K) => void + +fn("Prop 1"/**/)` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameStringPropertyNames2_test.go b/internal/fourslash/tests/gen/renameStringPropertyNames2_test.go new file mode 100644 index 0000000000..cfe5023744 --- /dev/null +++ b/internal/fourslash/tests/gen/renameStringPropertyNames2_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameStringPropertyNames2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type Props = { + foo: boolean; +} + +let { foo }: Props = null as any; +foo; + +let asd: Props = { "foo"/**/: true }; // rename foo here` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/, "") +} diff --git a/internal/fourslash/tests/gen/renameStringPropertyNames_test.go b/internal/fourslash/tests/gen/renameStringPropertyNames_test.go new file mode 100644 index 0000000000..eed50023ba --- /dev/null +++ b/internal/fourslash/tests/gen/renameStringPropertyNames_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameStringPropertyNames(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var o = { + [|[|{| "contextRangeIndex": 0 |}prop|]: 0|] +}; + +o = { + [|"[|{| "contextRangeIndex": 2 |}prop|]": 1|] +}; + +o["[|prop|]"]; +o['[|prop|]']; +o.[|prop|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "prop") +} diff --git a/internal/fourslash/tests/gen/renameTemplateLiteralsComputedProperties_test.go b/internal/fourslash/tests/gen/renameTemplateLiteralsComputedProperties_test.go new file mode 100644 index 0000000000..cd0f3d82ce --- /dev/null +++ b/internal/fourslash/tests/gen/renameTemplateLiteralsComputedProperties_test.go @@ -0,0 +1,52 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameTemplateLiteralsComputedProperties(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +interface Obj { + [|[` + "`" + `[|{| "contextRangeIndex": 0 |}num|]` + "`" + `]: number;|] + [|['[|{| "contextRangeIndex": 2 |}bool|]']: boolean;|] +} + +let o: Obj = { + [|[` + "`" + `[|{| "contextRangeIndex": 4 |}num|]` + "`" + `]: 0|], + [|['[|{| "contextRangeIndex": 6 |}bool|]']: true|], +}; + +o = { + [|['[|{| "contextRangeIndex": 8 |}num|]']: 1|], + [|[` + "`" + `[|{| "contextRangeIndex": 10 |}bool|]` + "`" + `]: false|], +}; + +o.[|num|]; +o['[|num|]']; +o["[|num|]"]; +o[` + "`" + `[|num|]` + "`" + `]; + +o.[|bool|]; +o['[|bool|]']; +o["[|bool|]"]; +o[` + "`" + `[|bool|]` + "`" + `]; + +export { o }; +// @allowJs: true +// @Filename: b.js +import { o as obj } from './a'; + +obj.[|num|]; +obj[` + "`" + `[|num|]` + "`" + `]; + +obj.[|bool|]; +obj[` + "`" + `[|bool|]` + "`" + `];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "num", "bool") +} diff --git a/internal/fourslash/tests/gen/renameTemplateLiteralsDefinePropertyJs_test.go b/internal/fourslash/tests/gen/renameTemplateLiteralsDefinePropertyJs_test.go new file mode 100644 index 0000000000..409ba50fdb --- /dev/null +++ b/internal/fourslash/tests/gen/renameTemplateLiteralsDefinePropertyJs_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameTemplateLiteralsDefinePropertyJs(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +let obj = {}; + +Object.defineProperty(obj, ` + "`" + `[|prop|]` + "`" + `, { value: 0 }); + +obj = { + [|[` + "`" + `[|{| "contextRangeIndex": 1 |}prop|]` + "`" + `]: 1|] +}; + +obj.[|prop|]; +obj['[|prop|]']; +obj["[|prop|]"]; +obj[` + "`" + `[|prop|]` + "`" + `];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "prop") +} diff --git a/internal/fourslash/tests/gen/renameThis_test.go b/internal/fourslash/tests/gen/renameThis_test.go new file mode 100644 index 0000000000..5fc64bffab --- /dev/null +++ b/internal/fourslash/tests/gen/renameThis_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameThis(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function f([|this|]) { + return [|this|]; +} +this/**/; +const _ = { [|[|{| "contextRangeIndex": 2 |}this|]: 0|] }.[|this|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameFailed(t, nil /*preferences*/) + f.VerifyBaselineRename(t, nil /*preferences*/, f.Ranges()[0], f.Ranges()[1], f.Ranges()[3], f.Ranges()[4]) +} diff --git a/internal/fourslash/tests/gen/renameUMDModuleAlias1_test.go b/internal/fourslash/tests/gen/renameUMDModuleAlias1_test.go new file mode 100644 index 0000000000..665133cd86 --- /dev/null +++ b/internal/fourslash/tests/gen/renameUMDModuleAlias1_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameUMDModuleAlias1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: 0.d.ts +export function doThing(): string; +export function doTheOtherThing(): void; +[|export as namespace [|{| "contextRangeIndex": 0 |}myLib|];|] +// @Filename: 1.ts +/// +[|myLib|].doThing();` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "myLib") +} diff --git a/internal/fourslash/tests/gen/renameUMDModuleAlias2_test.go b/internal/fourslash/tests/gen/renameUMDModuleAlias2_test.go new file mode 100644 index 0000000000..e939d5d158 --- /dev/null +++ b/internal/fourslash/tests/gen/renameUMDModuleAlias2_test.go @@ -0,0 +1,24 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameUMDModuleAlias2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: 0.d.ts +export function doThing(): string; +export function doTheOtherThing(): void; +export as namespace /**/[|myLib|]; +// @Filename: 1.ts +/// +myLib.doThing();` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyRenameSucceeded(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/signatureHelpCommentsCommentParsing_test.go b/internal/fourslash/tests/gen/signatureHelpCommentsCommentParsing_test.go index 06e778cf0f..a7dd595336 100644 --- a/internal/fourslash/tests/gen/signatureHelpCommentsCommentParsing_test.go +++ b/internal/fourslash/tests/gen/signatureHelpCommentsCommentParsing_test.go @@ -111,7 +111,7 @@ function sum(a: number, b: number) { } sum(/*16*/10, /*17*/20); /** This is multiplication function - * @param + * @param * @param a first number * @param b * @param c { diff --git a/internal/fourslash/tests/gen/signatureHelpExpandedRestTuplesLocalLabels1_test.go b/internal/fourslash/tests/gen/signatureHelpExpandedRestTuplesLocalLabels1_test.go index 50d57fe426..2510615b65 100644 --- a/internal/fourslash/tests/gen/signatureHelpExpandedRestTuplesLocalLabels1_test.go +++ b/internal/fourslash/tests/gen/signatureHelpExpandedRestTuplesLocalLabels1_test.go @@ -11,69 +11,69 @@ func TestSignatureHelpExpandedRestTuplesLocalLabels1(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` interface AppleInfo { - color: "green" | "red"; - } - - interface BananaInfo { - curvature: number; - } - - type FruitAndInfo1 = ["apple", AppleInfo] | ["banana", BananaInfo]; - - function logFruitTuple1(...[fruit, info]: FruitAndInfo1) {} - logFruitTuple1(/*1*/); - - function logFruitTuple2(...[, info]: FruitAndInfo1) {} - logFruitTuple2(/*2*/); - logFruitTuple2("apple", /*3*/); - - function logFruitTuple3(...[fruit, ...rest]: FruitAndInfo1) {} - logFruitTuple3(/*4*/); - logFruitTuple3("apple", /*5*/); - function logFruitTuple4(...[fruit, ...[info]]: FruitAndInfo1) {} - logFruitTuple4(/*6*/); - logFruitTuple4("apple", /*7*/); - - type FruitAndInfo2 = ["apple", ...AppleInfo[]] | ["banana", ...BananaInfo[]]; - - function logFruitTuple5(...[fruit, firstInfo]: FruitAndInfo2) {} - logFruitTuple5(/*8*/); - logFruitTuple5("apple", /*9*/); - - function logFruitTuple6(...[fruit, ...fruitInfo]: FruitAndInfo2) {} - logFruitTuple6(/*10*/); - logFruitTuple6("apple", /*11*/); - - type FruitAndInfo3 = ["apple", ...AppleInfo[], number] | ["banana", ...BananaInfo[], number]; - - function logFruitTuple7(...[fruit, fruitInfoOrNumber, secondFruitInfoOrNumber]: FruitAndInfo3) {} - logFruitTuple7(/*12*/); - logFruitTuple7("apple", /*13*/); - logFruitTuple7("apple", { color: "red" }, /*14*/); - - function logFruitTuple8(...[fruit, , secondFruitInfoOrNumber]: FruitAndInfo3) {} - logFruitTuple8(/*15*/); - logFruitTuple8("apple", /*16*/); - logFruitTuple8("apple", { color: "red" }, /*17*/); - - function logFruitTuple9(...[...[fruit, fruitInfoOrNumber, secondFruitInfoOrNumber]]: FruitAndInfo3) {} - logFruitTuple9(/*18*/); - logFruitTuple9("apple", /*19*/); - logFruitTuple9("apple", { color: "red" }, /*20*/); - - function logFruitTuple10(...[fruit, {}, secondFruitInfoOrNumber]: FruitAndInfo3) {} - logFruitTuple10(/*21*/); - logFruitTuple10("apple", /*22*/); - logFruitTuple10("apple", { color: "red" }, /*23*/); - - function logFruitTuple11(...{}: FruitAndInfo3) {} - logFruitTuple11(/*24*/); - logFruitTuple11("apple", /*25*/); - logFruitTuple11("apple", { color: "red" }, /*26*/); - function withPair(...[first, second]: [number, named: string]) {} - withPair(/*27*/); - withPair(101, /*28*/);` + const content = `interface AppleInfo { + color: "green" | "red"; +} + +interface BananaInfo { + curvature: number; +} + +type FruitAndInfo1 = ["apple", AppleInfo] | ["banana", BananaInfo]; + +function logFruitTuple1(...[fruit, info]: FruitAndInfo1) {} +logFruitTuple1(/*1*/); + +function logFruitTuple2(...[, info]: FruitAndInfo1) {} +logFruitTuple2(/*2*/); +logFruitTuple2("apple", /*3*/); + +function logFruitTuple3(...[fruit, ...rest]: FruitAndInfo1) {} +logFruitTuple3(/*4*/); +logFruitTuple3("apple", /*5*/); +function logFruitTuple4(...[fruit, ...[info]]: FruitAndInfo1) {} +logFruitTuple4(/*6*/); +logFruitTuple4("apple", /*7*/); + +type FruitAndInfo2 = ["apple", ...AppleInfo[]] | ["banana", ...BananaInfo[]]; + +function logFruitTuple5(...[fruit, firstInfo]: FruitAndInfo2) {} +logFruitTuple5(/*8*/); +logFruitTuple5("apple", /*9*/); + +function logFruitTuple6(...[fruit, ...fruitInfo]: FruitAndInfo2) {} +logFruitTuple6(/*10*/); +logFruitTuple6("apple", /*11*/); + +type FruitAndInfo3 = ["apple", ...AppleInfo[], number] | ["banana", ...BananaInfo[], number]; + +function logFruitTuple7(...[fruit, fruitInfoOrNumber, secondFruitInfoOrNumber]: FruitAndInfo3) {} +logFruitTuple7(/*12*/); +logFruitTuple7("apple", /*13*/); +logFruitTuple7("apple", { color: "red" }, /*14*/); + +function logFruitTuple8(...[fruit, , secondFruitInfoOrNumber]: FruitAndInfo3) {} +logFruitTuple8(/*15*/); +logFruitTuple8("apple", /*16*/); +logFruitTuple8("apple", { color: "red" }, /*17*/); + +function logFruitTuple9(...[...[fruit, fruitInfoOrNumber, secondFruitInfoOrNumber]]: FruitAndInfo3) {} +logFruitTuple9(/*18*/); +logFruitTuple9("apple", /*19*/); +logFruitTuple9("apple", { color: "red" }, /*20*/); + +function logFruitTuple10(...[fruit, {}, secondFruitInfoOrNumber]: FruitAndInfo3) {} +logFruitTuple10(/*21*/); +logFruitTuple10("apple", /*22*/); +logFruitTuple10("apple", { color: "red" }, /*23*/); + +function logFruitTuple11(...{}: FruitAndInfo3) {} +logFruitTuple11(/*24*/); +logFruitTuple11("apple", /*25*/); +logFruitTuple11("apple", { color: "red" }, /*26*/); +function withPair(...[first, second]: [number, named: string]) {} +withPair(/*27*/); +withPair(101, /*28*/);` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineSignatureHelp(t) } diff --git a/internal/fourslash/tests/gen/signatureHelpIteratorNext_test.go b/internal/fourslash/tests/gen/signatureHelpIteratorNext_test.go index 8ae55291a8..866a4fe0c6 100644 --- a/internal/fourslash/tests/gen/signatureHelpIteratorNext_test.go +++ b/internal/fourslash/tests/gen/signatureHelpIteratorNext_test.go @@ -12,25 +12,25 @@ func TestSignatureHelpIteratorNext(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @lib: esnext - declare const iterator: Iterator; +declare const iterator: Iterator; - iterator.next(/*1*/); - iterator.next(/*2*/ 0); +iterator.next(/*1*/); +iterator.next(/*2*/ 0); - declare const generator: Generator; +declare const generator: Generator; - generator.next(/*3*/); - generator.next(/*4*/ 0); +generator.next(/*3*/); +generator.next(/*4*/ 0); - declare const asyncIterator: AsyncIterator; +declare const asyncIterator: AsyncIterator; - asyncIterator.next(/*5*/); - asyncIterator.next(/*6*/ 0); +asyncIterator.next(/*5*/); +asyncIterator.next(/*6*/ 0); - declare const asyncGenerator: AsyncGenerator; +declare const asyncGenerator: AsyncGenerator; - asyncGenerator.next(/*7*/); - asyncGenerator.next(/*8*/ 0);` +asyncGenerator.next(/*7*/); +asyncGenerator.next(/*8*/ 0);` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineSignatureHelp(t) } diff --git a/internal/fourslash/tests/gen/stringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralTypes_test.go b/internal/fourslash/tests/gen/stringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralTypes_test.go index 57607ae275..fcd73090be 100644 --- a/internal/fourslash/tests/gen/stringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralTypes_test.go +++ b/internal/fourslash/tests/gen/stringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralTypes_test.go @@ -12,14 +12,14 @@ func TestStringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralT t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` type PathOf = - K extends ` + "`" + `${infer U}.${infer V}` + "`" + ` - ? U extends keyof T ? PathOf : ` + "`" + `${P}${keyof T & (string | number)}` + "`" + ` - : K extends keyof T ? ` + "`" + `${P}${K}` + "`" + ` : ` + "`" + `${P}${keyof T & (string | number)}` + "`" + `; + const content = `type PathOf = + K extends ` + "`" + `${infer U}.${infer V}` + "`" + ` + ? U extends keyof T ? PathOf : ` + "`" + `${P}${keyof T & (string | number)}` + "`" + ` + : K extends keyof T ? ` + "`" + `${P}${K}` + "`" + ` : ` + "`" + `${P}${keyof T & (string | number)}` + "`" + `; - declare function consumer(path: PathOf<{a: string, b: {c: string}}, K>) : number; +declare function consumer(path: PathOf<{a: string, b: {c: string}}, K>) : number; - consumer('b./*ts*/')` +consumer('b./*ts*/')` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, []string{"ts"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/stringPropertyNames2_test.go b/internal/fourslash/tests/gen/stringPropertyNames2_test.go index 118de60613..8bb1048f5e 100644 --- a/internal/fourslash/tests/gen/stringPropertyNames2_test.go +++ b/internal/fourslash/tests/gen/stringPropertyNames2_test.go @@ -15,7 +15,7 @@ func TestStringPropertyNames2(t *testing.T) { "artist": T; } var a: Album; -var /**/x = a['artist']; ` +var /**/x = a['artist'];` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "", "var x: number", "") } diff --git a/internal/fourslash/tests/gen/switchCompletions_test.go b/internal/fourslash/tests/gen/switchCompletions_test.go index 85159922b1..e1ea0670d2 100644 --- a/internal/fourslash/tests/gen/switchCompletions_test.go +++ b/internal/fourslash/tests/gen/switchCompletions_test.go @@ -12,31 +12,31 @@ func TestSwitchCompletions(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` enum E { A, B } - declare const e: E; - switch (e) { - case E.A: - return 0; - case E./*1*/ - } - declare const f: 1 | 2 | 3; - switch (f) { - case 1: - return 1; - case /*2*/ - } - declare const f2: 'foo' | 'bar' | 'baz'; - switch (f2) { - case 'bar': - return 1; - case '/*3*/' - } + const content = `enum E { A, B } +declare const e: E; +switch (e) { + case E.A: + return 0; + case E./*1*/ +} +declare const f: 1 | 2 | 3; +switch (f) { + case 1: + return 1; + case /*2*/ +} +declare const f2: 'foo' | 'bar' | 'baz'; +switch (f2) { + case 'bar': + return 1; + case '/*3*/' +} - // repro from #52874 - declare let x: "foo" | "bar"; - switch (x) { - case ('/*4*/') - }` +// repro from #52874 +declare let x: "foo" | "bar"; +switch (x) { + case ('/*4*/') +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "1", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/thisBindingInLambda_test.go b/internal/fourslash/tests/gen/thisBindingInLambda_test.go index 85f333fac9..9895684f2a 100644 --- a/internal/fourslash/tests/gen/thisBindingInLambda_test.go +++ b/internal/fourslash/tests/gen/thisBindingInLambda_test.go @@ -12,7 +12,7 @@ func TestThisBindingInLambda(t *testing.T) { t.Skip() defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `class Greeter { - constructor() { + constructor() { [].forEach((anything)=>{ console.log(th/**/is); }); diff --git a/internal/fourslash/tests/gen/thisPredicateFunctionCompletions02_test.go b/internal/fourslash/tests/gen/thisPredicateFunctionCompletions02_test.go index e956393ba1..1d8cdb5d15 100644 --- a/internal/fourslash/tests/gen/thisPredicateFunctionCompletions02_test.go +++ b/internal/fourslash/tests/gen/thisPredicateFunctionCompletions02_test.go @@ -12,36 +12,36 @@ func TestThisPredicateFunctionCompletions02(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` interface Sundries { - broken: boolean; - } + const content = `interface Sundries { + broken: boolean; +} - interface Supplies { - spoiled: boolean; - } +interface Supplies { + spoiled: boolean; +} - interface Crate { - contents: T; - isSundries(): this is Crate; - isSupplies(): this is Crate; - isPackedTight(): this is (this & {extraContents: T}); - } - const crate: Crate; - if (crate.isPackedTight()) { - crate./*1*/; - } - if (crate.isSundries()) { - crate.contents./*2*/; - if (crate.isPackedTight()) { - crate./*3*/; - } - } - if (crate.isSupplies()) { - crate.contents./*4*/; - if (crate.isPackedTight()) { - crate./*5*/; - } - }` +interface Crate { + contents: T; + isSundries(): this is Crate; + isSupplies(): this is Crate; + isPackedTight(): this is (this & {extraContents: T}); +} +const crate: Crate; +if (crate.isPackedTight()) { + crate./*1*/; +} +if (crate.isSundries()) { + crate.contents./*2*/; + if (crate.isPackedTight()) { + crate./*3*/; + } +} +if (crate.isSupplies()) { + crate.contents./*4*/; + if (crate.isPackedTight()) { + crate./*5*/; + } +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, []string{"1", "3", "5"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/thisPredicateFunctionCompletions03_test.go b/internal/fourslash/tests/gen/thisPredicateFunctionCompletions03_test.go index 050aaed177..5cc32ef6d3 100644 --- a/internal/fourslash/tests/gen/thisPredicateFunctionCompletions03_test.go +++ b/internal/fourslash/tests/gen/thisPredicateFunctionCompletions03_test.go @@ -12,49 +12,49 @@ func TestThisPredicateFunctionCompletions03(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class RoyalGuard { - isLeader(): this is LeadGuard { - return this instanceof LeadGuard; - } - isFollower(): this is FollowerGuard { - return this instanceof FollowerGuard; - } - } + const content = `class RoyalGuard { + isLeader(): this is LeadGuard { + return this instanceof LeadGuard; + } + isFollower(): this is FollowerGuard { + return this instanceof FollowerGuard; + } +} - class LeadGuard extends RoyalGuard { - lead(): void {}; - } +class LeadGuard extends RoyalGuard { + lead(): void {}; +} - class FollowerGuard extends RoyalGuard { - follow(): void {}; - } +class FollowerGuard extends RoyalGuard { + follow(): void {}; +} - let a: RoyalGuard = new FollowerGuard(); - if (a.is/*1*/Leader()) { - a./*2*/; - } - else if (a.is/*3*/Follower()) { - a./*4*/; - } +let a: RoyalGuard = new FollowerGuard(); +if (a.is/*1*/Leader()) { + a./*2*/; +} +else if (a.is/*3*/Follower()) { + a./*4*/; +} - interface GuardInterface { - isLeader(): this is LeadGuard; - isFollower(): this is FollowerGuard; - } +interface GuardInterface { + isLeader(): this is LeadGuard; + isFollower(): this is FollowerGuard; +} - let b: GuardInterface; - if (b.is/*5*/Leader()) { - b./*6*/; - } - else if (b.is/*7*/Follower()) { - b./*8*/; - } +let b: GuardInterface; +if (b.is/*5*/Leader()) { + b./*6*/; +} +else if (b.is/*7*/Follower()) { + b./*8*/; +} - let leader/*13*/Status = a.isLeader(); - function isLeaderGuard(g: RoyalGuard) { - return g.isLeader(); - } - let checked/*14*/LeaderStatus = isLeader/*15*/Guard(a);` +let leader/*13*/Status = a.isLeader(); +function isLeaderGuard(g: RoyalGuard) { + return g.isLeader(); +} +let checked/*14*/LeaderStatus = isLeader/*15*/Guard(a);` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, []string{"2", "6"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo01_test.go b/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo01_test.go index 198ea5e01f..0ec1ae9e21 100644 --- a/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo01_test.go +++ b/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo01_test.go @@ -11,45 +11,45 @@ func TestThisPredicateFunctionQuickInfo01(t *testing.T) { t.Parallel() t.Skip() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class FileSystemObject { - /*1*/isFile(): this is Item { - return this instanceof Item; - } - /*2*/isDirectory(): this is Directory { - return this instanceof Directory; - } - /*3*/isNetworked(): this is (Networked & this) { - return !!(this as Networked).host; - } - constructor(public path: string) {} - } + const content = `class FileSystemObject { + /*1*/isFile(): this is Item { + return this instanceof Item; + } + /*2*/isDirectory(): this is Directory { + return this instanceof Directory; + } + /*3*/isNetworked(): this is (Networked & this) { + return !!(this as Networked).host; + } + constructor(public path: string) {} +} - class Item extends FileSystemObject { - constructor(path: string, public content: string) { super(path); } - } - class Directory extends FileSystemObject { - children: FileSystemObject[]; - } - interface Networked { - host: string; - } +class Item extends FileSystemObject { + constructor(path: string, public content: string) { super(path); } +} +class Directory extends FileSystemObject { + children: FileSystemObject[]; +} +interface Networked { + host: string; +} - const obj: FileSystemObject = new Item("/foo", ""); - if (obj.isFile/*4*/()) { - obj.; - if (obj.isNetworked/*5*/()) { - obj.; - } - } - if (obj.isDirectory/*6*/()) { - obj.; - if (obj.isNetworked/*7*/()) { - obj.; - } - } - if (obj.isNetworked/*8*/()) { - obj.; - }` +const obj: FileSystemObject = new Item("/foo", ""); +if (obj.isFile/*4*/()) { + obj.; + if (obj.isNetworked/*5*/()) { + obj.; + } +} +if (obj.isDirectory/*6*/()) { + obj.; + if (obj.isNetworked/*7*/()) { + obj.; + } +} +if (obj.isNetworked/*8*/()) { + obj.; +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "(method) FileSystemObject.isFile(): this is Item", "") f.VerifyQuickInfoAt(t, "2", "(method) FileSystemObject.isDirectory(): this is Directory", "") diff --git a/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo02_test.go b/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo02_test.go index 450bd21e9e..d4c10e785b 100644 --- a/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo02_test.go +++ b/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo02_test.go @@ -11,36 +11,36 @@ func TestThisPredicateFunctionQuickInfo02(t *testing.T) { t.Parallel() t.Skip() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` interface Sundries { - broken: boolean; - } + const content = `interface Sundries { + broken: boolean; +} - interface Supplies { - spoiled: boolean; - } +interface Supplies { + spoiled: boolean; +} - interface Crate { - contents: T; - /*1*/isSundries(): this is Crate; - /*2*/isSupplies(): this is Crate; - /*3*/isPackedTight(): this is (this & {extraContents: T}); - } - const crate: Crate; - if (crate.isPackedTight/*4*/()) { - crate.; - } - if (crate.isSundries/*5*/()) { - crate.contents.; - if (crate.isPackedTight/*6*/()) { - crate.; - } - } - if (crate.isSupplies/*7*/()) { - crate.contents.; - if (crate.isPackedTight/*8*/()) { - crate.; - } - }` +interface Crate { + contents: T; + /*1*/isSundries(): this is Crate; + /*2*/isSupplies(): this is Crate; + /*3*/isPackedTight(): this is (this & {extraContents: T}); +} +const crate: Crate; +if (crate.isPackedTight/*4*/()) { + crate.; +} +if (crate.isSundries/*5*/()) { + crate.contents.; + if (crate.isPackedTight/*6*/()) { + crate.; + } +} +if (crate.isSupplies/*7*/()) { + crate.contents.; + if (crate.isPackedTight/*8*/()) { + crate.; + } +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "(method) Crate.isSundries(): this is Crate", "") f.VerifyQuickInfoAt(t, "2", "(method) Crate.isSupplies(): this is Crate", "") diff --git a/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo_test.go b/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo_test.go index 1ca204a860..4c8c7d82d9 100644 --- a/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo_test.go +++ b/internal/fourslash/tests/gen/thisPredicateFunctionQuickInfo_test.go @@ -11,63 +11,63 @@ func TestThisPredicateFunctionQuickInfo(t *testing.T) { t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") - const content = ` class RoyalGuard { - isLeader(): this is LeadGuard { - return this instanceof LeadGuard; - } - isFollower(): this is FollowerGuard { - return this instanceof FollowerGuard; - } - } + const content = `class RoyalGuard { + isLeader(): this is LeadGuard { + return this instanceof LeadGuard; + } + isFollower(): this is FollowerGuard { + return this instanceof FollowerGuard; + } +} - class LeadGuard extends RoyalGuard { - lead(): void {}; - } +class LeadGuard extends RoyalGuard { + lead(): void {}; +} - class FollowerGuard extends RoyalGuard { - follow(): void {}; - } +class FollowerGuard extends RoyalGuard { + follow(): void {}; +} - let a: RoyalGuard = new FollowerGuard(); - if (a.is/*1*/Leader()) { - a./*2*/; - } - else if (a.is/*3*/Follower()) { - a./*4*/; - } +let a: RoyalGuard = new FollowerGuard(); +if (a.is/*1*/Leader()) { + a./*2*/; +} +else if (a.is/*3*/Follower()) { + a./*4*/; +} - interface GuardInterface { - isLeader(): this is LeadGuard; - isFollower(): this is FollowerGuard; - } +interface GuardInterface { + isLeader(): this is LeadGuard; + isFollower(): this is FollowerGuard; +} - let b: GuardInterface; - if (b.is/*5*/Leader()) { - b./*6*/; - } - else if (b.is/*7*/Follower()) { - b./*8*/; - } +let b: GuardInterface; +if (b.is/*5*/Leader()) { + b./*6*/; +} +else if (b.is/*7*/Follower()) { + b./*8*/; +} - if (((a.isLeader)())) { - a./*9*/; - } - else if (((a).isFollower())) { - a./*10*/; - } +if (((a.isLeader)())) { + a./*9*/; +} +else if (((a).isFollower())) { + a./*10*/; +} - if (((a["isLeader"])())) { - a./*11*/; - } - else if (((a)["isFollower"]())) { - a./*12*/; - } +if (((a["isLeader"])())) { + a./*11*/; +} +else if (((a)["isFollower"]())) { + a./*12*/; +} - let leader/*13*/Status = a.isLeader(); - function isLeaderGuard(g: RoyalGuard) { - return g.isLeader(); - } - let checked/*14*/LeaderStatus = isLeader/*15*/Guard(a);` +let leader/*13*/Status = a.isLeader(); +function isLeaderGuard(g: RoyalGuard) { + return g.isLeader(); +} +let checked/*14*/LeaderStatus = isLeader/*15*/Guard(a);` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "(method) RoyalGuard.isLeader(): this is LeadGuard", "") f.VerifyQuickInfoAt(t, "3", "(method) RoyalGuard.isFollower(): this is FollowerGuard", "") diff --git a/internal/fourslash/tests/gen/tsxCompletion10_test.go b/internal/fourslash/tests/gen/tsxCompletion10_test.go index 449a7f8dee..3b55a7dd91 100644 --- a/internal/fourslash/tests/gen/tsxCompletion10_test.go +++ b/internal/fourslash/tests/gen/tsxCompletion10_test.go @@ -13,13 +13,13 @@ func TestTsxCompletion10(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - div: { ONE: string; TWO: number; } - } - } - var x1 =
): void; - } - interface LinkProps extends ClickableProps { - goTo: string; - } - declare function MainButton(buttonProps: ButtonProps): JSX.Element; - declare function MainButton(linkProps: LinkProps): JSX.Element; - declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; - let opt = ; - let opt = ; - let opt = {}} /*3*/ />; - let opt = {}} ignore-prop /*4*/ />; - let opt = ; - let opt = ;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface ClickableProps { + children?: string; + className?: string; +} +interface ButtonProps extends ClickableProps { + onClick(event?: React.MouseEvent): void; +} +interface LinkProps extends ClickableProps { + goTo: string; +} +declare function MainButton(buttonProps: ButtonProps): JSX.Element; +declare function MainButton(linkProps: LinkProps): JSX.Element; +declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +let opt = ; +let opt = ; +let opt = {}} /*3*/ />; +let opt = {}} ignore-prop /*4*/ />; +let opt = ; +let opt = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, []string{"1", "6"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletion14_test.go b/internal/fourslash/tests/gen/tsxCompletion14_test.go index 56161a9981..364cf42fc3 100644 --- a/internal/fourslash/tests/gen/tsxCompletion14_test.go +++ b/internal/fourslash/tests/gen/tsxCompletion14_test.go @@ -14,23 +14,23 @@ func TestTsxCompletion14(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@module: commonjs //@jsx: preserve - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} //@Filename: exporter.tsx - export class Thing { props: { ONE: string; TWO: number } } - export module M { - export declare function SFCComp(props: { Three: number; Four: string }): JSX.Element; - } +export class Thing { props: { ONE: string; TWO: number } } +export module M { + export declare function SFCComp(props: { Three: number; Four: string }): JSX.Element; +} //@Filename: file.tsx - import * as Exp from './exporter'; - var x1 = ; - var x2 = ; - var x3 = ; - var x4 = ;` +import * as Exp from './exporter'; +var x1 = ; +var x2 = ; +var x3 = ; +var x4 = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, []string{"1", "3"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletion15_test.go b/internal/fourslash/tests/gen/tsxCompletion15_test.go index 2014f79daf..90478f63fd 100644 --- a/internal/fourslash/tests/gen/tsxCompletion15_test.go +++ b/internal/fourslash/tests/gen/tsxCompletion15_test.go @@ -14,30 +14,30 @@ func TestTsxCompletion15(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@module: commonjs //@jsx: preserve - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} //@Filename: exporter.tsx - export module M { - export declare function SFCComp(props: { Three: number; Four: string }): JSX.Element; - } +export module M { + export declare function SFCComp(props: { Three: number; Four: string }): JSX.Element; +} //@Filename: file.tsx - import * as Exp from './exporter'; - var x1 = ; - var x2 = ; - var x3 = ; - var x4 = ; - var x6 = ; - var x7 = ; - var x8 = ; - var x9 = ; - var x10 = ; - var x11 = ; - var x12 =
;` +import * as Exp from './exporter'; +var x1 = ; +var x2 = ; +var x3 = ; +var x4 = ; +var x6 = ; +var x7 = ; +var x8 = ; +var x9 = ; +var x10 = ; +var x11 = ; +var x12 =
;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "1", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletion1_test.go b/internal/fourslash/tests/gen/tsxCompletion1_test.go index 39c4c5bf8a..0773b53c04 100644 --- a/internal/fourslash/tests/gen/tsxCompletion1_test.go +++ b/internal/fourslash/tests/gen/tsxCompletion1_test.go @@ -13,13 +13,13 @@ func TestTsxCompletion1(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - div: { ONE: string; TWO: number; } - } - } - var x =
;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } +} +var x =
;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletion2_test.go b/internal/fourslash/tests/gen/tsxCompletion2_test.go index 8040d7c635..45fd5b31e8 100644 --- a/internal/fourslash/tests/gen/tsxCompletion2_test.go +++ b/internal/fourslash/tests/gen/tsxCompletion2_test.go @@ -13,14 +13,14 @@ func TestTsxCompletion2(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - class MyComp { props: { ONE: string; TWO: number } } - var x = ;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +class MyComp { props: { ONE: string; TWO: number } } +var x = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletion3_test.go b/internal/fourslash/tests/gen/tsxCompletion3_test.go index 90e1cbd65f..4fa3384be4 100644 --- a/internal/fourslash/tests/gen/tsxCompletion3_test.go +++ b/internal/fourslash/tests/gen/tsxCompletion3_test.go @@ -13,13 +13,13 @@ func TestTsxCompletion3(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - div: { one; two; } - } - } -
;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { one; two; } + } +} +
;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletion4_test.go b/internal/fourslash/tests/gen/tsxCompletion4_test.go index 671f565f55..99b6acfb5f 100644 --- a/internal/fourslash/tests/gen/tsxCompletion4_test.go +++ b/internal/fourslash/tests/gen/tsxCompletion4_test.go @@ -13,14 +13,14 @@ func TestTsxCompletion4(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare namespace JSX { - interface Element { } - interface IntrinsicElements { - div: { one; two; } - } - } - let bag = { x: 100, y: 200 }; -
;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } +} +var x =
;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletion6_test.go b/internal/fourslash/tests/gen/tsxCompletion6_test.go index fb6602b366..9c74782933 100644 --- a/internal/fourslash/tests/gen/tsxCompletion6_test.go +++ b/internal/fourslash/tests/gen/tsxCompletion6_test.go @@ -13,13 +13,13 @@ func TestTsxCompletion6(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - div: { ONE: string; TWO: number; } - } - } - var x =
;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } +} +var x =
;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletion7_test.go b/internal/fourslash/tests/gen/tsxCompletion7_test.go index c4c618ec6c..83ae418afb 100644 --- a/internal/fourslash/tests/gen/tsxCompletion7_test.go +++ b/internal/fourslash/tests/gen/tsxCompletion7_test.go @@ -15,14 +15,14 @@ func TestTsxCompletion7(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - div: { ONE: string; TWO: number; } - } - } - let y = { ONE: '' }; - var x =
;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } +} +let y = { ONE: '' }; +var x =
;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletion8_test.go b/internal/fourslash/tests/gen/tsxCompletion8_test.go index 9afbccbdea..3c7c0b476e 100644 --- a/internal/fourslash/tests/gen/tsxCompletion8_test.go +++ b/internal/fourslash/tests/gen/tsxCompletion8_test.go @@ -13,13 +13,13 @@ func TestTsxCompletion8(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - div: { ONE: string; TWO: number; } - } - } - var x =
;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } +} +var x =
;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback1_test.go b/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback1_test.go index c46afd59d2..b5a699142b 100644 --- a/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback1_test.go +++ b/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback1_test.go @@ -15,29 +15,29 @@ func TestTsxCompletionInFunctionExpressionOfChildrenCallback1(t *testing.T) { const content = `//@module: commonjs //@jsx: preserve // @Filename: 1.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - interface ElementChildrenAttribute { children; } - } - interface IUser { - Name: string; - } - interface IFetchUserProps { - children: (user: IUser) => any; - } - function FetchUser(props: IFetchUserProps) { return undefined; } - function UserName() { - return ( - - { user => ( -

{ user./**/ }

- )} -
- ); - }` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } + interface ElementChildrenAttribute { children; } +} +interface IUser { + Name: string; +} +interface IFetchUserProps { + children: (user: IUser) => any; +} +function FetchUser(props: IFetchUserProps) { return undefined; } +function UserName() { + return ( + + { user => ( +

{ user./**/ }

+ )} +
+ ); +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback_test.go b/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback_test.go index 18481affdb..0f0072dfff 100644 --- a/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback_test.go +++ b/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback_test.go @@ -14,28 +14,28 @@ func TestTsxCompletionInFunctionExpressionOfChildrenCallback(t *testing.T) { const content = `//@module: commonjs //@jsx: preserve // @Filename: 1.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface IUser { - Name: string; - } - interface IFetchUserProps { - children: (user: IUser) => any; - } - function FetchUser(props: IFetchUserProps) { return undefined; } - function UserName() { - return ( - - { user => ( -

{ user./**/ }

- )} -
- ); - }` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface IUser { + Name: string; +} +interface IFetchUserProps { + children: (user: IUser) => any; +} +function FetchUser(props: IFetchUserProps) { return undefined; } +function UserName() { + return ( + + { user => ( +

{ user./**/ }

+ )} +
+ ); +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "", nil) } diff --git a/internal/fourslash/tests/gen/tsxCompletionOnClosingTag1_test.go b/internal/fourslash/tests/gen/tsxCompletionOnClosingTag1_test.go index 6abb260db3..7f5c3f0e51 100644 --- a/internal/fourslash/tests/gen/tsxCompletionOnClosingTag1_test.go +++ b/internal/fourslash/tests/gen/tsxCompletionOnClosingTag1_test.go @@ -13,13 +13,13 @@ func TestTsxCompletionOnClosingTag1(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - div: { ONE: string; TWO: number; } - } - } - var x1 =
-

Hello world - ` +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } +} +var x1 =
+

Hello world + ` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "1", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX1_test.go b/internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX1_test.go index 09c4eee227..58a09bd67e 100644 --- a/internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX1_test.go +++ b/internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX1_test.go @@ -13,7 +13,7 @@ func TestTsxCompletionOnClosingTagWithoutJSX1(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - var x1 =
-

Hello world - ` +var x1 =
+

Hello world + ` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, "1", &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences10_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences10_test.go index 5f8d62dba5..366d64b327 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences10_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences10_test.go @@ -14,31 +14,31 @@ func TestTsxFindAllReferences10(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface ClickableProps { - children?: string; - className?: string; - } - interface ButtonProps extends ClickableProps { - /*1*/onClick(event?: React.MouseEvent): void; - } - interface LinkProps extends ClickableProps { - goTo: string; - } - declare function MainButton(buttonProps: ButtonProps): JSX.Element; - declare function MainButton(linkProps: LinkProps): JSX.Element; - declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; - let opt = ; - let opt = ; - let opt = {}} />; - let opt = {}} ignore-prop />; - let opt = ; - let opt = ;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface ClickableProps { + children?: string; + className?: string; +} +interface ButtonProps extends ClickableProps { + /*1*/onClick(event?: React.MouseEvent): void; +} +interface LinkProps extends ClickableProps { + goTo: string; +} +declare function MainButton(buttonProps: ButtonProps): JSX.Element; +declare function MainButton(linkProps: LinkProps): JSX.Element; +declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +let opt = ; +let opt = ; +let opt = {}} />; +let opt = {}} ignore-prop />; +let opt = ; +let opt = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences11_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences11_test.go index 31e45fa9de..42e89b0693 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences11_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences11_test.go @@ -14,26 +14,26 @@ func TestTsxFindAllReferences11(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface ClickableProps { - children?: string; - className?: string; - } - interface ButtonProps extends ClickableProps { - onClick(event?: React.MouseEvent): void; - } - interface LinkProps extends ClickableProps { - goTo: string; - } - declare function MainButton(buttonProps: ButtonProps): JSX.Element; - declare function MainButton(linkProps: LinkProps): JSX.Element; - declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; - let opt = ;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface ClickableProps { + children?: string; + className?: string; +} +interface ButtonProps extends ClickableProps { + onClick(event?: React.MouseEvent): void; +} +interface LinkProps extends ClickableProps { + goTo: string; +} +declare function MainButton(buttonProps: ButtonProps): JSX.Element; +declare function MainButton(linkProps: LinkProps): JSX.Element; +declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +let opt = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences1_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences1_test.go index b7dc7d442f..64c20b11bb 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences1_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences1_test.go @@ -12,17 +12,17 @@ func TestTsxFindAllReferences1(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - /*1*/div: { - name?: string; - isOpen?: boolean; - }; - span: { n: string; }; - } - } - var x = /*2*/;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + /*1*/div: { + name?: string; + isOpen?: boolean; + }; + span: { n: string; }; + } +} +var x = /*2*/;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences2_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences2_test.go index e7631db8b4..51706edba1 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences2_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences2_test.go @@ -12,17 +12,17 @@ func TestTsxFindAllReferences2(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - div: { - /*1*/name?: string; - isOpen?: boolean; - }; - span: { n: string; }; - } - } - var x =
;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { + /*1*/name?: string; + isOpen?: boolean; + }; + span: { n: string; }; + } +} +var x =
;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences3_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences3_test.go index 001241a3f8..2f3174d144 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences3_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences3_test.go @@ -12,20 +12,20 @@ func TestTsxFindAllReferences3(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props } - } - class MyClass { - props: { - /*1*/name?: string; - size?: number; - } +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props } +} +class MyClass { + props: { + /*1*/name?: string; + size?: number; +} - var x = ;` +var x = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences4_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences4_test.go index 3221f7255d..66a41456c5 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences4_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences4_test.go @@ -12,20 +12,20 @@ func TestTsxFindAllReferences4(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props } - } - /*1*/class /*2*/MyClass { - props: { - name?: string; - size?: number; - } +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props } +} +/*1*/class /*2*/MyClass { + props: { + name?: string; + size?: number; +} - var x = /*3*/;` +var x = /*3*/;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4", "5") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences5_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences5_test.go index 3b06c56a3e..0e3597f575 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences5_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences5_test.go @@ -14,23 +14,23 @@ func TestTsxFindAllReferences5(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface OptionPropBag { - propx: number - propString: string - optional?: boolean - } - /*1*/declare function /*2*/Opt(attributes: OptionPropBag): JSX.Element; - let opt = /*3*/; - let opt1 = /*5*/; - let opt2 = /*7*/; - let opt3 = /*9*/; - let opt4 = /*11*/;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface OptionPropBag { + propx: number + propString: string + optional?: boolean +} +/*1*/declare function /*2*/Opt(attributes: OptionPropBag): JSX.Element; +let opt = /*3*/; +let opt1 = /*5*/; +let opt2 = /*7*/; +let opt3 = /*9*/; +let opt4 = /*11*/;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences6_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences6_test.go index 96922cf8d6..5241f95274 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences6_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences6_test.go @@ -14,19 +14,19 @@ func TestTsxFindAllReferences6(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface OptionPropBag { - propx: number - propString: string - optional?: boolean - } - declare function Opt(attributes: OptionPropBag): JSX.Element; - let opt = ;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface OptionPropBag { + propx: number + propString: string + optional?: boolean +} +declare function Opt(attributes: OptionPropBag): JSX.Element; +let opt = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences7_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences7_test.go index 66a1e9d48d..d631a213f2 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences7_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences7_test.go @@ -14,22 +14,22 @@ func TestTsxFindAllReferences7(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface OptionPropBag { - /*1*/propx: number - propString: string - optional?: boolean - } - declare function Opt(attributes: OptionPropBag): JSX.Element; - let opt = ; - let opt1 = ; - let opt2 = ; - let opt3 = ;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface OptionPropBag { + /*1*/propx: number + propString: string + optional?: boolean +} +declare function Opt(attributes: OptionPropBag): JSX.Element; +let opt = ; +let opt1 = ; +let opt2 = ; +let opt3 = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences8_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences8_test.go index 77818118d9..d54ffe6739 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences8_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences8_test.go @@ -14,31 +14,31 @@ func TestTsxFindAllReferences8(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface ClickableProps { - children?: string; - className?: string; - } - interface ButtonProps extends ClickableProps { - onClick(event?: React.MouseEvent): void; - } - interface LinkProps extends ClickableProps { - goTo: string; - } - /*1*/declare function /*2*/MainButton(buttonProps: ButtonProps): JSX.Element; - /*3*/declare function /*4*/MainButton(linkProps: LinkProps): JSX.Element; - /*5*/declare function /*6*/MainButton(props: ButtonProps | LinkProps): JSX.Element; - let opt = /*7*/; - let opt = /*9*/; - let opt = /*11*/{}} />; - let opt = /*13*/{}} ignore-prop />; - let opt = /*15*/; - let opt = /*17*/;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface ClickableProps { + children?: string; + className?: string; +} +interface ButtonProps extends ClickableProps { + onClick(event?: React.MouseEvent): void; +} +interface LinkProps extends ClickableProps { + goTo: string; +} +/*1*/declare function /*2*/MainButton(buttonProps: ButtonProps): JSX.Element; +/*3*/declare function /*4*/MainButton(linkProps: LinkProps): JSX.Element; +/*5*/declare function /*6*/MainButton(props: ButtonProps | LinkProps): JSX.Element; +let opt = /*7*/; +let opt = /*9*/; +let opt = /*11*/{}} />; +let opt = /*13*/{}} ignore-prop />; +let opt = /*15*/; +let opt = /*17*/;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferences9_test.go b/internal/fourslash/tests/gen/tsxFindAllReferences9_test.go index a8b2e41414..6aaee61522 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferences9_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferences9_test.go @@ -14,32 +14,32 @@ func TestTsxFindAllReferences9(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface ClickableProps { - children?: string; - className?: string; - } - interface ButtonProps extends ClickableProps { - onClick(event?: React.MouseEvent): void; - } - interface LinkProps extends ClickableProps { - /*1*/goTo: string; - } - declare function MainButton(buttonProps: ButtonProps): JSX.Element; - declare function MainButton(linkProps: LinkProps): JSX.Element; - declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; - let opt = ; - let opt = ; - let opt = {}} />; - let opt = {}} ignore-prop />; - let opt = ; - let opt = ; - let opt = ;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface ClickableProps { + children?: string; + className?: string; +} +interface ButtonProps extends ClickableProps { + onClick(event?: React.MouseEvent): void; +} +interface LinkProps extends ClickableProps { + /*1*/goTo: string; +} +declare function MainButton(buttonProps: ButtonProps): JSX.Element; +declare function MainButton(linkProps: LinkProps): JSX.Element; +declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +let opt = ; +let opt = ; +let opt = {}} />; +let opt = {}} ignore-prop />; +let opt = ; +let opt = ; +let opt = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferencesUnionElementType1_test.go b/internal/fourslash/tests/gen/tsxFindAllReferencesUnionElementType1_test.go index b4e3518efc..57159c8d4c 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferencesUnionElementType1_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferencesUnionElementType1_test.go @@ -14,20 +14,20 @@ func TestTsxFindAllReferencesUnionElementType1(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - function SFC1(prop: { x: number }) { - return
hello
; - }; - function SFC2(prop: { x: boolean }) { - return

World

; - } - /*1*/var /*2*/SFCComp = SFC1 || SFC2; - /*3*/` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +function SFC1(prop: { x: number }) { + return
hello
; +}; +function SFC2(prop: { x: boolean }) { + return

World

; +} +/*1*/var /*2*/SFCComp = SFC1 || SFC2; +/*3*/` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4") } diff --git a/internal/fourslash/tests/gen/tsxFindAllReferencesUnionElementType2_test.go b/internal/fourslash/tests/gen/tsxFindAllReferencesUnionElementType2_test.go index 704de86965..2ca55c8204 100644 --- a/internal/fourslash/tests/gen/tsxFindAllReferencesUnionElementType2_test.go +++ b/internal/fourslash/tests/gen/tsxFindAllReferencesUnionElementType2_test.go @@ -14,19 +14,19 @@ func TestTsxFindAllReferencesUnionElementType2(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - class RC1 extends React.Component<{}, {}> { - render() { - return null; - } - } - class RC2 extends React.Component<{}, {}> { - render() { - return null; - } - private method() { } - } - /*1*/var /*2*/RCComp = RC1 || RC2; - /*3*/` +class RC1 extends React.Component<{}, {}> { + render() { + return null; + } +} +class RC2 extends React.Component<{}, {}> { + render() { + return null; + } + private method() { } +} +/*1*/var /*2*/RCComp = RC1 || RC2; +/*3*/` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4") } diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionClasses_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionClasses_test.go index b58528199b..eae08d8b2a 100644 --- a/internal/fourslash/tests/gen/tsxGoToDefinitionClasses_test.go +++ b/internal/fourslash/tests/gen/tsxGoToDefinitionClasses_test.go @@ -12,19 +12,19 @@ func TestTsxGoToDefinitionClasses(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { } - interface ElementAttributesProperty { props; } - } - class /*ct*/MyClass { - props: { - /*pt*/foo: string; - } - } - var x = <[|My/*c*/Class|] />; - var y = ; - var z = <[|MyCl/*w*/ass|] wrong= 'hello' />;` +declare module JSX { + interface Element { } + interface IntrinsicElements { } + interface ElementAttributesProperty { props; } +} +class /*ct*/MyClass { + props: { + /*pt*/foo: string; + } +} +var x = <[|My/*c*/Class|] />; +var y = ; +var z = <[|MyCl/*w*/ass|] wrong= 'hello' />;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "c", "p", "w") } diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionIntrinsics_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionIntrinsics_test.go index 36cdcd87fe..3004b81b24 100644 --- a/internal/fourslash/tests/gen/tsxGoToDefinitionIntrinsics_test.go +++ b/internal/fourslash/tests/gen/tsxGoToDefinitionIntrinsics_test.go @@ -12,19 +12,19 @@ func TestTsxGoToDefinitionIntrinsics(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - /*dt*/div: { - /*pt*/name?: string; - isOpen?: boolean; - }; - /*st*/span: { n: string; }; - } - } - var x = <[|di/*ds*/v|] />; - var y = <[|s/*ss*/pan|] />; - var z =
;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + /*dt*/div: { + /*pt*/name?: string; + isOpen?: boolean; + }; + /*st*/span: { n: string; }; + } +} +var x = <[|di/*ds*/v|] />; +var y = <[|s/*ss*/pan|] />; +var z =
;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "ds", "ss", "ps") } diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction1_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction1_test.go index 706f4cb1e0..5a3fa3be7a 100644 --- a/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction1_test.go +++ b/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction1_test.go @@ -14,22 +14,22 @@ func TestTsxGoToDefinitionStatelessFunction1(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface OptionPropBag { - /*pt1*/propx: number - propString: "hell" - /*pt2*/optional?: boolean - } - declare function /*opt*/Opt(attributes: OptionPropBag): JSX.Element; - let opt = <[|O/*one*/pt|] />; - let opt1 = <[|Op/*two*/t|] [|pr/*p1*/opx|]={100} />; - let opt2 = <[|Op/*three*/t|] propx={100} [|opt/*p2*/ional|] />; - let opt3 = <[|Op/*four*/t|] wr/*p3*/ong />;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface OptionPropBag { + /*pt1*/propx: number + propString: "hell" + /*pt2*/optional?: boolean +} +declare function /*opt*/Opt(attributes: OptionPropBag): JSX.Element; +let opt = <[|O/*one*/pt|] />; +let opt1 = <[|Op/*two*/t|] [|pr/*p1*/opx|]={100} />; +let opt2 = <[|Op/*three*/t|] propx={100} [|opt/*p2*/ional|] />; +let opt3 = <[|Op/*four*/t|] wr/*p3*/ong />;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "one", "two", "three", "four", "p1", "p2") } diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction2_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction2_test.go index 60402ac427..542014f9c3 100644 --- a/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction2_test.go +++ b/internal/fourslash/tests/gen/tsxGoToDefinitionStatelessFunction2_test.go @@ -14,31 +14,31 @@ func TestTsxGoToDefinitionStatelessFunction2(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface ClickableProps { - children?: string; - className?: string; - } - interface ButtonProps extends ClickableProps { - onClick(event?: React.MouseEvent): void; - } - interface LinkProps extends ClickableProps { - goTo: string; - } - declare function /*firstSource*/MainButton(buttonProps: ButtonProps): JSX.Element; - declare function /*secondSource*/MainButton(linkProps: LinkProps): JSX.Element; - declare function /*thirdSource*/MainButton(props: ButtonProps | LinkProps): JSX.Element; - let opt = <[|Main/*firstTarget*/Button|] />; - let opt = <[|Main/*secondTarget*/Button|] children="chidlren" />; - let opt = <[|Main/*thirdTarget*/Button|] onClick={()=>{}} />; - let opt = <[|Main/*fourthTarget*/Button|] onClick={()=>{}} ignore-prop />; - let opt = <[|Main/*fifthTarget*/Button|] goTo="goTo" />; - let opt = <[|Main/*sixthTarget*/Button|] wrong />;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface ClickableProps { + children?: string; + className?: string; +} +interface ButtonProps extends ClickableProps { + onClick(event?: React.MouseEvent): void; +} +interface LinkProps extends ClickableProps { + goTo: string; +} +declare function /*firstSource*/MainButton(buttonProps: ButtonProps): JSX.Element; +declare function /*secondSource*/MainButton(linkProps: LinkProps): JSX.Element; +declare function /*thirdSource*/MainButton(props: ButtonProps | LinkProps): JSX.Element; +let opt = <[|Main/*firstTarget*/Button|] />; +let opt = <[|Main/*secondTarget*/Button|] children="chidlren" />; +let opt = <[|Main/*thirdTarget*/Button|] onClick={()=>{}} />; +let opt = <[|Main/*fourthTarget*/Button|] onClick={()=>{}} ignore-prop />; +let opt = <[|Main/*fifthTarget*/Button|] goTo="goTo" />; +let opt = <[|Main/*sixthTarget*/Button|] wrong />;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "firstTarget", "secondTarget", "thirdTarget", "fourthTarget", "fifthTarget", "sixthTarget") } diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType1_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType1_test.go index 9268ad44db..0278a88ab6 100644 --- a/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType1_test.go +++ b/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType1_test.go @@ -14,20 +14,20 @@ func TestTsxGoToDefinitionUnionElementType1(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - function /*pt1*/SFC1(prop: { x: number }) { - return
hello
; - }; - function SFC2(prop: { x: boolean }) { - return

World

; - } - var /*def*/SFCComp = SFC1 || SFC2; - <[|SFC/*one*/Comp|] x />` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +function /*pt1*/SFC1(prop: { x: number }) { + return
hello
; +}; +function SFC2(prop: { x: boolean }) { + return

World

; +} +var /*def*/SFCComp = SFC1 || SFC2; +<[|SFC/*one*/Comp|] x />` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "one") } diff --git a/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType2_test.go b/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType2_test.go index 6fb417cafa..f6a91c8869 100644 --- a/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType2_test.go +++ b/internal/fourslash/tests/gen/tsxGoToDefinitionUnionElementType2_test.go @@ -14,19 +14,19 @@ func TestTsxGoToDefinitionUnionElementType2(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - class RC1 extends React.Component<{}, {}> { - render() { - return null; - } - } - class RC2 extends React.Component<{}, {}> { - render() { - return null; - } - private method() { } - } - var /*pt1*/RCComp = RC1 || RC2; - <[|RC/*one*/Comp|] />` +class RC1 extends React.Component<{}, {}> { + render() { + return null; + } +} +class RC2 extends React.Component<{}, {}> { + render() { + return null; + } + private method() { } +} +var /*pt1*/RCComp = RC1 || RC2; +<[|RC/*one*/Comp|] />` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyBaselineGoToDefinition(t, "one") } diff --git a/internal/fourslash/tests/gen/tsxQuickInfo1_test.go b/internal/fourslash/tests/gen/tsxQuickInfo1_test.go index 08bfd41391..01de96160d 100644 --- a/internal/fourslash/tests/gen/tsxQuickInfo1_test.go +++ b/internal/fourslash/tests/gen/tsxQuickInfo1_test.go @@ -12,9 +12,9 @@ func TestTsxQuickInfo1(t *testing.T) { t.Skip() defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - var x1 = - class MyElement {} - var z = ` +var x1 = +class MyElement {} +var z = ` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "any", "") f.VerifyQuickInfoAt(t, "2", "any", "") diff --git a/internal/fourslash/tests/gen/tsxQuickInfo2_test.go b/internal/fourslash/tests/gen/tsxQuickInfo2_test.go index 88fb36f54c..5168e269c3 100644 --- a/internal/fourslash/tests/gen/tsxQuickInfo2_test.go +++ b/internal/fourslash/tests/gen/tsxQuickInfo2_test.go @@ -12,15 +12,15 @@ func TestTsxQuickInfo2(t *testing.T) { defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx - declare module JSX { - interface Element { } - interface IntrinsicElements { - div: any - } - } - var x1 = - class MyElement {} - var z = ` +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: any + } +} +var x1 = +class MyElement {} +var z = ` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "(property) JSX.IntrinsicElements.div: any", "") f.VerifyQuickInfoAt(t, "2", "(property) JSX.IntrinsicElements.div: any", "") diff --git a/internal/fourslash/tests/gen/tsxQuickInfo3_test.go b/internal/fourslash/tests/gen/tsxQuickInfo3_test.go index 4d03d0de19..5611268ec0 100644 --- a/internal/fourslash/tests/gen/tsxQuickInfo3_test.go +++ b/internal/fourslash/tests/gen/tsxQuickInfo3_test.go @@ -14,20 +14,20 @@ func TestTsxQuickInfo3(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - interface OptionProp { - propx: 2 - } - class Opt extends React.Component { - render() { - return
Hello
; - } - } - const obj1: OptionProp = { - propx: 2 - } - let y1 = ; - let y2 = ; - let y2 = ;` +interface OptionProp { + propx: 2 +} +class Opt extends React.Component { + render() { + return
Hello
; + } +} +const obj1: OptionProp = { + propx: 2 +} +let y1 = ; +let y2 = ; +let y2 = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "class Opt", "") f.VerifyQuickInfoAt(t, "2", "(property) propx: number", "") diff --git a/internal/fourslash/tests/gen/tsxQuickInfo4_test.go b/internal/fourslash/tests/gen/tsxQuickInfo4_test.go index 4d22dc9e1b..c41173a082 100644 --- a/internal/fourslash/tests/gen/tsxQuickInfo4_test.go +++ b/internal/fourslash/tests/gen/tsxQuickInfo4_test.go @@ -14,40 +14,40 @@ func TestTsxQuickInfo4(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - export interface ClickableProps { - children?: string; - className?: string; - } - export interface ButtonProps extends ClickableProps { - onClick(event?: React.MouseEvent): void; - } - export interface LinkProps extends ClickableProps { - to: string; - } - export function MainButton(buttonProps: ButtonProps): JSX.Element; - export function MainButton(linkProps: LinkProps): JSX.Element; - export function MainButton(props: ButtonProps | LinkProps): JSX.Element { - const linkProps = props as LinkProps; - if(linkProps.to) { - return this._buildMainLink(props); - } - return this._buildMainButton(props); - } - function _buildMainButton({ onClick, children, className }: ButtonProps): JSX.Element { - return(); - } - declare function buildMainLink({ to, children, className }: LinkProps): JSX.Element; - function buildSomeElement1(): JSX.Element { - return ( - GO - ); - } - function buildSomeElement2(): JSX.Element { - return ( - {}}>GO; - ); - } - let componenet = {}} ext/*5*/ra-prop>GO;` +export interface ClickableProps { + children?: string; + className?: string; +} +export interface ButtonProps extends ClickableProps { + onClick(event?: React.MouseEvent): void; +} +export interface LinkProps extends ClickableProps { + to: string; +} +export function MainButton(buttonProps: ButtonProps): JSX.Element; +export function MainButton(linkProps: LinkProps): JSX.Element; +export function MainButton(props: ButtonProps | LinkProps): JSX.Element { + const linkProps = props as LinkProps; + if(linkProps.to) { + return this._buildMainLink(props); + } + return this._buildMainButton(props); +} +function _buildMainButton({ onClick, children, className }: ButtonProps): JSX.Element { + return(); +} +declare function buildMainLink({ to, children, className }: LinkProps): JSX.Element; +function buildSomeElement1(): JSX.Element { + return ( + GO + ); +} +function buildSomeElement2(): JSX.Element { + return ( + {}}>GO; + ); +} +let componenet = {}} ext/*5*/ra-prop>GO;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "function MainButton(linkProps: LinkProps): JSX.Element (+1 overload)", "") f.VerifyQuickInfoAt(t, "2", "(property) LinkProps.to: string", "") diff --git a/internal/fourslash/tests/gen/tsxQuickInfo5_test.go b/internal/fourslash/tests/gen/tsxQuickInfo5_test.go index 8ee8842317..555123e53d 100644 --- a/internal/fourslash/tests/gen/tsxQuickInfo5_test.go +++ b/internal/fourslash/tests/gen/tsxQuickInfo5_test.go @@ -14,11 +14,11 @@ func TestTsxQuickInfo5(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare function ComponentWithTwoAttributes(l: {key1: K, value: V}): JSX.Element; - function Baz(key1: T, value: U) { - let a0 = - let a1 = - }` +declare function ComponentWithTwoAttributes(l: {key1: K, value: V}): JSX.Element; +function Baz(key1: T, value: U) { + let a0 = + let a1 = +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "function ComponentWithTwoAttributes(l: {\n key1: T;\n value: U;\n}): JSX.Element", "") f.VerifyQuickInfoAt(t, "2", "(property) key1: T", "") diff --git a/internal/fourslash/tests/gen/tsxQuickInfo6_test.go b/internal/fourslash/tests/gen/tsxQuickInfo6_test.go index 9c7109fc99..c346724cb6 100644 --- a/internal/fourslash/tests/gen/tsxQuickInfo6_test.go +++ b/internal/fourslash/tests/gen/tsxQuickInfo6_test.go @@ -14,13 +14,13 @@ func TestTsxQuickInfo6(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare function ComponentSpecific(l: {prop: U}): JSX.Element; - declare function ComponentSpecific1(l: {prop: U, "ignore-prop": number}): JSX.Element; - function Bar(arg: T) { - let a1 = ; // U is number - let a2 = ; // U is number - let a3 = ; // U is "hello" - }` +declare function ComponentSpecific(l: {prop: U}): JSX.Element; +declare function ComponentSpecific1(l: {prop: U, "ignore-prop": number}): JSX.Element; +function Bar(arg: T) { + let a1 = ; // U is number + let a2 = ; // U is number + let a3 = ; // U is "hello" +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "function ComponentSpecific(l: {\n prop: number;\n}): JSX.Element", "") f.VerifyQuickInfoAt(t, "2", "function ComponentSpecific(l: {\n prop: never;\n}): JSX.Element", "") diff --git a/internal/fourslash/tests/gen/tsxQuickInfo7_test.go b/internal/fourslash/tests/gen/tsxQuickInfo7_test.go index d622480c16..a4dd0eb9db 100644 --- a/internal/fourslash/tests/gen/tsxQuickInfo7_test.go +++ b/internal/fourslash/tests/gen/tsxQuickInfo7_test.go @@ -14,18 +14,18 @@ func TestTsxQuickInfo7(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare function OverloadComponent(attr: {b: U, a?: string, "ignore-prop": boolean}): JSX.Element; - declare function OverloadComponent(attr: {b: U, a: T}): JSX.Element; - declare function OverloadComponent(): JSX.Element; // effective argument type of ` + "`" + `{}` + "`" + `, needs to be last - function Baz(arg1: T, arg2: U) { - let a0 = ; - let a1 = ; - let a2 = ; - let a3 = ; - let a4 = ; - let a5 = ; - let a6 = ; - }` +declare function OverloadComponent(attr: {b: U, a?: string, "ignore-prop": boolean}): JSX.Element; +declare function OverloadComponent(attr: {b: U, a: T}): JSX.Element; +declare function OverloadComponent(): JSX.Element; // effective argument type of ` + "`" + `{}` + "`" + `, needs to be last +function Baz(arg1: T, arg2: U) { + let a0 = ; + let a1 = ; + let a2 = ; + let a3 = ; + let a4 = ; + let a5 = ; + let a6 = ; +}` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "function OverloadComponent(attr: {\n b: number;\n a?: string;\n \"ignore-prop\": boolean;\n}): JSX.Element (+2 overloads)", "") f.VerifyQuickInfoAt(t, "2", "function OverloadComponent(attr: {\n b: string;\n a: boolean;\n}): JSX.Element (+2 overloads)", "") diff --git a/internal/fourslash/tests/gen/tsxRename1_test.go b/internal/fourslash/tests/gen/tsxRename1_test.go new file mode 100644 index 0000000000..afd061e82d --- /dev/null +++ b/internal/fourslash/tests/gen/tsxRename1_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxRename1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +declare module JSX { + interface Element { } + interface IntrinsicElements { + [|[|{| "contextRangeIndex": 0 |}div|]: { + name?: string; + isOpen?: boolean; + };|] + span: { n: string; }; + } +} +var x = [|<[|{| "contextRangeIndex": 2 |}div|] />|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "div") +} diff --git a/internal/fourslash/tests/gen/tsxRename2_test.go b/internal/fourslash/tests/gen/tsxRename2_test.go new file mode 100644 index 0000000000..0177caa15d --- /dev/null +++ b/internal/fourslash/tests/gen/tsxRename2_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxRename2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { + [|[|{| "contextRangeIndex": 0 |}name|]?: string;|] + isOpen?: boolean; + }; + span: { n: string; }; + } +} +var x =
;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "name") +} diff --git a/internal/fourslash/tests/gen/tsxRename3_test.go b/internal/fourslash/tests/gen/tsxRename3_test.go new file mode 100644 index 0000000000..df4f15bab7 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxRename3_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxRename3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props } +} +class MyClass { + props: { + [|[|{| "contextRangeIndex": 0 |}name|]?: string;|] + size?: number; +} + + +var x = ;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "name") +} diff --git a/internal/fourslash/tests/gen/tsxRename5_test.go b/internal/fourslash/tests/gen/tsxRename5_test.go new file mode 100644 index 0000000000..2efeb02c10 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxRename5_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxRename5(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props } +} +class MyClass { + props: { + name?: string; + size?: number; +} + +[|var [|{| "contextRangeIndex": 0 |}nn|]: string;|] +var x = ;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "nn") +} diff --git a/internal/fourslash/tests/gen/tsxRename6_test.go b/internal/fourslash/tests/gen/tsxRename6_test.go new file mode 100644 index 0000000000..06abad84e8 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxRename6_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxRename6(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +// @jsx: preserve +// @noLib: true +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface OptionPropBag { + propx: number + propString: string + optional?: boolean +} +[|declare function [|{| "contextRangeIndex": 0 |}Opt|](attributes: OptionPropBag): JSX.Element;|] +let opt = [|<[|{| "contextRangeIndex": 2 |}Opt|] />|]; +let opt1 = [|<[|{| "contextRangeIndex": 4 |}Opt|] propx={100} propString />|]; +let opt2 = [|<[|{| "contextRangeIndex": 6 |}Opt|] propx={100} optional/>|]; +let opt3 = [|<[|{| "contextRangeIndex": 8 |}Opt|] wrong />|]; +let opt4 = [|<[|{| "contextRangeIndex": 10 |}Opt|] propx={100} propString="hi" />|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "Opt") +} diff --git a/internal/fourslash/tests/gen/tsxRename7_test.go b/internal/fourslash/tests/gen/tsxRename7_test.go new file mode 100644 index 0000000000..119782e5d6 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxRename7_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxRename7(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +// @jsx: preserve +// @noLib: true +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface OptionPropBag { + [|[|{| "contextRangeIndex": 0 |}propx|]: number|] + propString: string + optional?: boolean +} +declare function Opt(attributes: OptionPropBag): JSX.Element; +let opt = ; +let opt1 = ; +let opt2 = ; +let opt3 = ;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "propx") +} diff --git a/internal/fourslash/tests/gen/tsxRename8_test.go b/internal/fourslash/tests/gen/tsxRename8_test.go new file mode 100644 index 0000000000..79bf2e7034 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxRename8_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxRename8(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +// @jsx: preserve +// @noLib: true +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface OptionPropBag { + propx: number + propString: string + optional?: boolean +} +declare function Opt(attributes: OptionPropBag): JSX.Element; +let opt = ; +let opt1 = ; +let opt2 = ; +let opt3 = ; +let opt4 = ;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRename(t, nil /*preferences*/) +} diff --git a/internal/fourslash/tests/gen/tsxRename9_test.go b/internal/fourslash/tests/gen/tsxRename9_test.go new file mode 100644 index 0000000000..e631806a1f --- /dev/null +++ b/internal/fourslash/tests/gen/tsxRename9_test.go @@ -0,0 +1,44 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxRename9(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +// @jsx: preserve +// @noLib: true +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface ClickableProps { + children?: string; + className?: string; +} +interface ButtonProps extends ClickableProps { + [|[|{| "contextRangeIndex": 0 |}onClick|](event?: React.MouseEvent): void;|] +} +interface LinkProps extends ClickableProps { + [|[|{| "contextRangeIndex": 2 |}goTo|]: string;|] +} +[|declare function [|{| "contextRangeIndex": 4 |}MainButton|](buttonProps: ButtonProps): JSX.Element;|] +[|declare function [|{| "contextRangeIndex": 6 |}MainButton|](linkProps: LinkProps): JSX.Element;|] +[|declare function [|{| "contextRangeIndex": 8 |}MainButton|](props: ButtonProps | LinkProps): JSX.Element;|] +let opt = [|<[|{| "contextRangeIndex": 10 |}MainButton|] />|]; +let opt = [|<[|{| "contextRangeIndex": 12 |}MainButton|] children="chidlren" />|]; +let opt = [|<[|{| "contextRangeIndex": 14 |}MainButton|] [|[|{| "contextRangeIndex": 16 |}onClick|]={()=>{}}|] />|]; +let opt = [|<[|{| "contextRangeIndex": 18 |}MainButton|] [|[|{| "contextRangeIndex": 20 |}onClick|]={()=>{}}|] [|ignore-prop|] />|]; +let opt = [|<[|{| "contextRangeIndex": 23 |}MainButton|] [|[|{| "contextRangeIndex": 25 |}goTo|]="goTo"|] />|]; +let opt = [|<[|{| "contextRangeIndex": 27 |}MainButton|] [|wrong|] />|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyBaselineRenameAtRangesWithText(t, nil /*preferences*/, "onClick", "goTo", "MainButton", "ignore-prop", "wrong") +} diff --git a/internal/fourslash/tests/gen/typeOperatorNodeBuilding_test.go b/internal/fourslash/tests/gen/typeOperatorNodeBuilding_test.go index 7b0e47d781..244b13c121 100644 --- a/internal/fourslash/tests/gen/typeOperatorNodeBuilding_test.go +++ b/internal/fourslash/tests/gen/typeOperatorNodeBuilding_test.go @@ -12,18 +12,18 @@ func TestTypeOperatorNodeBuilding(t *testing.T) { t.Skip() defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `// @Filename: keyof.ts - function doSomethingWithKeys(...keys: (keyof T)[]) { } +function doSomethingWithKeys(...keys: (keyof T)[]) { } - const /*1*/utilityFunctions = { - doSomethingWithKeys - }; +const /*1*/utilityFunctions = { + doSomethingWithKeys +}; // @Filename: typeof.ts - class Foo { static a: number; } - function doSomethingWithTypes(...statics: (typeof Foo)[]) {} +class Foo { static a: number; } +function doSomethingWithTypes(...statics: (typeof Foo)[]) {} - const /*2*/utilityFunctions = { - doSomethingWithTypes - };` +const /*2*/utilityFunctions = { + doSomethingWithTypes +};` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyQuickInfoAt(t, "1", "const utilityFunctions: {\n doSomethingWithKeys: (...keys: (keyof T)[]) => void;\n}", "") f.VerifyQuickInfoAt(t, "2", "const utilityFunctions: {\n doSomethingWithTypes: (...statics: (typeof Foo)[]) => void;\n}", "") diff --git a/internal/fourslash/tests/manual/renameForDefaultExport01_test.go b/internal/fourslash/tests/manual/renameForDefaultExport01_test.go new file mode 100644 index 0000000000..ca6ad3dd18 --- /dev/null +++ b/internal/fourslash/tests/manual/renameForDefaultExport01_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestRenameForDefaultExport01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `[|export default class [|{| "contextRangeIndex": 0 |}DefaultExportedClass|] { +}|] +/* + * Commenting [|{| "inComment": true |}DefaultExportedClass|] + */ + +var x: [|DefaultExportedClass|]; + +var y = new [|DefaultExportedClass|];` + + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + ranges := f.GetRangesByText().Get("DefaultExportedClass") + + var markerOrRanges []fourslash.MarkerOrRangeOrName + for _, r := range ranges { + if !(r.Marker != nil && r.Marker.Data != nil && r.Marker.Data["inComment"] == true) { + markerOrRanges = append(markerOrRanges, r) + } + } + + f.VerifyBaselineRename(t, nil /*preferences*/, markerOrRanges...) +} diff --git a/internal/fourslash/tests/manual/tsxCompletion12_test.go b/internal/fourslash/tests/manual/tsxCompletion12_test.go index 959c261f2b..c1fe77d0e4 100644 --- a/internal/fourslash/tests/manual/tsxCompletion12_test.go +++ b/internal/fourslash/tests/manual/tsxCompletion12_test.go @@ -17,23 +17,23 @@ func TestTsxCompletion12(t *testing.T) { const content = `//@Filename: file.tsx // @jsx: preserve // @noLib: true - declare module JSX { - interface Element { } - interface IntrinsicElements { - } - interface ElementAttributesProperty { props; } - } - interface OptionPropBag { - propx: number - propString: "hell" - optional?: boolean - } - declare function Opt(attributes: OptionPropBag): JSX.Element; - let opt = ; - let opt1 = ; - let opt2 = ; - let opt3 = ; - let opt4 = ;` +declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } +} +interface OptionPropBag { + propx: number + propString: "hell" + optional?: boolean +} +declare function Opt(attributes: OptionPropBag): JSX.Element; +let opt = ; +let opt1 = ; +let opt2 = ; +let opt3 = ; +let opt4 = ;` f := fourslash.NewFourslash(t, nil /*capabilities*/, content) f.VerifyCompletions(t, []string{"1", "5"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, diff --git a/internal/fourslash/tests/util/util.go b/internal/fourslash/tests/util/util.go index 2a3a54c921..5624643817 100644 --- a/internal/fourslash/tests/util/util.go +++ b/internal/fourslash/tests/util/util.go @@ -13476,3 +13476,7 @@ var CompletionTypeAssertionKeywords = CompletionGlobalTypesPlus([]fourslash.Comp SortText: PtrTo(string(ls.SortTextGlobalsOrKeywords)), }, }) + +func ToAny[T any](items []T) []any { + return core.Map(items, func(item T) any { return item }) +} diff --git a/internal/ls/types.go b/internal/ls/types.go index 6aafc4bbbb..f5f9d19014 100644 --- a/internal/ls/types.go +++ b/internal/ls/types.go @@ -12,7 +12,16 @@ const ( JsxAttributeCompletionStyleNone JsxAttributeCompletionStyle = "none" ) +type QuotePreference string + +const ( + QuotePreferenceAuto QuotePreference = "auto" + QuotePreferenceDouble QuotePreference = "double" + QuotePreferenceSingle QuotePreference = "single" +) + type UserPreferences struct { + QuotePreference *QuotePreference // If enabled, TypeScript will search through all external modules' exports and add them to the completions list. // This affects lone identifier completions but not completions on the right hand side of `obj.`. IncludeCompletionsForModuleExports *bool @@ -45,6 +54,8 @@ type UserPreferences struct { PreferTypeOnlyAutoImports *bool AutoImportSpecifierExcludeRegexes []string AutoImportFileExcludePatterns []string + + UseAliasesForRename *bool } func (p *UserPreferences) ModuleSpecifierPreferences() modulespecifiers.UserPreferences { diff --git a/testdata/baselines/reference/fourslash/autoImport/AutoImportCompletion1.baseline.md b/testdata/baselines/reference/fourslash/Auto Imports/autoImportCompletion1.baseline.md similarity index 100% rename from testdata/baselines/reference/fourslash/autoImport/AutoImportCompletion1.baseline.md rename to testdata/baselines/reference/fourslash/Auto Imports/autoImportCompletion1.baseline.md diff --git a/testdata/baselines/reference/fourslash/autoImport/AutoImportCompletion2.baseline.md b/testdata/baselines/reference/fourslash/Auto Imports/autoImportCompletion2.baseline.md similarity index 100% rename from testdata/baselines/reference/fourslash/autoImport/AutoImportCompletion2.baseline.md rename to testdata/baselines/reference/fourslash/Auto Imports/autoImportCompletion2.baseline.md diff --git a/testdata/baselines/reference/fourslash/autoImport/AutoImportCompletion3.baseline.md b/testdata/baselines/reference/fourslash/Auto Imports/autoImportCompletion3.baseline.md similarity index 100% rename from testdata/baselines/reference/fourslash/autoImport/AutoImportCompletion3.baseline.md rename to testdata/baselines/reference/fourslash/Auto Imports/autoImportCompletion3.baseline.md diff --git a/testdata/baselines/reference/fourslash/autoImport/NodeModulesImportCompletions1Baseline.baseline.md b/testdata/baselines/reference/fourslash/Auto Imports/nodeModulesImportCompletions1Baseline.baseline.md similarity index 100% rename from testdata/baselines/reference/fourslash/autoImport/NodeModulesImportCompletions1Baseline.baseline.md rename to testdata/baselines/reference/fourslash/Auto Imports/nodeModulesImportCompletions1Baseline.baseline.md diff --git a/testdata/baselines/reference/fourslash/QuickInfo/completionDetailsOfContextSensitiveParameterNoCrash.baseline b/testdata/baselines/reference/fourslash/QuickInfo/completionDetailsOfContextSensitiveParameterNoCrash.baseline new file mode 100644 index 0000000000..b21d2aab66 --- /dev/null +++ b/testdata/baselines/reference/fourslash/QuickInfo/completionDetailsOfContextSensitiveParameterNoCrash.baseline @@ -0,0 +1,114 @@ +// === QuickInfo === +=== /completionDetailsOfContextSensitiveParameterNoCrash.ts === +// type __ = never; +// +// interface CurriedFunction1 { +// (): CurriedFunction1; +// (t1: T1): R; +// } +// interface CurriedFunction2 { +// (): CurriedFunction2; +// (t1: T1): CurriedFunction1; +// (t1: __, t2: T2): CurriedFunction1; +// (t1: T1, t2: T2): R; +// } +// +// interface CurriedFunction3 { +// (): CurriedFunction3; +// (t1: T1): CurriedFunction2; +// (t1: __, t2: T2): CurriedFunction2; +// (t1: T1, t2: T2): CurriedFunction1; +// (t1: __, t2: __, t3: T3): CurriedFunction2; +// (t1: T1, t2: __, t3: T3): CurriedFunction1; +// (t1: __, t2: T2, t3: T3): CurriedFunction1; +// (t1: T1, t2: T2, t3: T3): R; +// } +// +// interface CurriedFunction4 { +// (): CurriedFunction4; +// (t1: T1): CurriedFunction3; +// (t1: __, t2: T2): CurriedFunction3; +// (t1: T1, t2: T2): CurriedFunction2; +// (t1: __, t2: __, t3: T3): CurriedFunction3; +// (t1: __, t2: __, t3: T3): CurriedFunction2; +// (t1: __, t2: T2, t3: T3): CurriedFunction2; +// (t1: T1, t2: T2, t3: T3): CurriedFunction1; +// (t1: __, t2: __, t3: __, t4: T4): CurriedFunction3; +// (t1: T1, t2: __, t3: __, t4: T4): CurriedFunction2; +// (t1: __, t2: T2, t3: __, t4: T4): CurriedFunction2; +// (t1: __, t2: __, t3: T3, t4: T4): CurriedFunction2; +// (t1: T1, t2: T2, t3: __, t4: T4): CurriedFunction1; +// (t1: T1, t2: __, t3: T3, t4: T4): CurriedFunction1; +// (t1: __, t2: T2, t3: T3, t4: T4): CurriedFunction1; +// (t1: T1, t2: T2, t3: T3, t4: T4): R; +// } +// +// declare var curry: { +// (func: (t1: T1) => R, arity?: number): CurriedFunction1; +// (func: (t1: T1, t2: T2) => R, arity?: number): CurriedFunction2; +// (func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): CurriedFunction3; +// (func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): CurriedFunction4; +// (func: (...args: any[]) => any, arity?: number): (...args: any[]) => any; +// placeholder: __; +// }; +// +// export type StylingFunction = ( +// keys: (string | false | undefined) | (string | false | undefined)[], +// ...rest: unknown[] +// ) => object; +// +// declare const getStylingByKeys: ( +// mergedStyling: object, +// keys: (string | false | undefined) | (string | false | undefined)[], +// ...args: unknown[] +// ) => object; +// +// declare var mergedStyling: object; +// +// export const createStyling: CurriedFunction3< +// (base16Theme: object) => unknown, +// object | undefined, +// object | undefined, +// StylingFunction +// > = curry< +// (base16Theme: object) => unknown, +// object | undefined, +// object | undefined, +// StylingFunction +// >( +// ( +// getStylingFromBase16: (base16Theme: object) => unknown, +// options: object = {}, +// themeOrStyling: object = {}, +// ...args +// ): StylingFunction => { +// return curry(getStylingByKeys, 2)(mergedStyling, ...args); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) args: [] +// | ``` +// | +// | ---------------------------------------------------------------------- +// }, +// 3 +// ); +[ + { + "marker": { + "Position": 3097, + "LSPosition": { + "line": 82, + "character": 60 + }, + "Name": "", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) args: []\n```\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/DeprecatedInheritedJSDocOverload.baseline b/testdata/baselines/reference/fourslash/QuickInfo/deprecatedInheritedJSDocOverload.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/DeprecatedInheritedJSDocOverload.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/deprecatedInheritedJSDocOverload.baseline diff --git a/testdata/baselines/reference/fourslash/hover/JsDocAliasQuickInfo.baseline b/testdata/baselines/reference/fourslash/QuickInfo/jsDocAliasQuickInfo.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/JsDocAliasQuickInfo.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/jsDocAliasQuickInfo.baseline diff --git a/testdata/baselines/reference/fourslash/hover/JsDocTypeTagQuickInfo1.baseline b/testdata/baselines/reference/fourslash/QuickInfo/jsDocTypeTagQuickInfo1.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/JsDocTypeTagQuickInfo1.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/jsDocTypeTagQuickInfo1.baseline diff --git a/testdata/baselines/reference/fourslash/hover/JsDocTypeTagQuickInfo2.baseline b/testdata/baselines/reference/fourslash/QuickInfo/jsDocTypeTagQuickInfo2.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/JsDocTypeTagQuickInfo2.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/jsDocTypeTagQuickInfo2.baseline diff --git a/testdata/baselines/reference/fourslash/QuickInfo/jsDocTypedefQuickInfo1.baseline b/testdata/baselines/reference/fourslash/QuickInfo/jsDocTypedefQuickInfo1.baseline new file mode 100644 index 0000000000..a46c1cd2fe --- /dev/null +++ b/testdata/baselines/reference/fourslash/QuickInfo/jsDocTypedefQuickInfo1.baseline @@ -0,0 +1,78 @@ +// === QuickInfo === +=== /jsDocTypedef1.js === +// /** +// * @typedef {Object} Opts +// * @property {string} x +// * @property {string=} y +// * @property {string} [z] +// * @property {string} [w="hi"] +// * +// * @param {Opts} opts +// */ +// function foo(opts) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) opts: Opts +// | ``` +// | +// | ---------------------------------------------------------------------- +// opts.x; +// } +// foo({x: 'abc'}); +// /** +// * @typedef {object} Opts1 +// * @property {string} x +// * @property {string=} y +// * @property {string} [z] +// * @property {string} [w="hi"] +// * +// * @param {Opts1} opts +// */ +// function foo1(opts1) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) opts1: any +// | ``` +// | +// | ---------------------------------------------------------------------- +// opts1.x; +// } +// foo1({x: 'abc'}); +[ + { + "marker": { + "Position": 178, + "LSPosition": { + "line": 9, + "character": 13 + }, + "Name": "1", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) opts: Opts\n```\n" + } + } + }, + { + "marker": { + "Position": 398, + "LSPosition": { + "line": 22, + "character": 14 + }, + "Name": "2", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) opts1: any\n```\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/JsdocLink1.baseline b/testdata/baselines/reference/fourslash/QuickInfo/jsdocLink1.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/JsdocLink1.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/jsdocLink1.baseline diff --git a/testdata/baselines/reference/fourslash/hover/JsdocLink4.baseline b/testdata/baselines/reference/fourslash/QuickInfo/jsdocLink4.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/JsdocLink4.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/jsdocLink4.baseline diff --git a/testdata/baselines/reference/fourslash/hover/JsdocLink5.baseline b/testdata/baselines/reference/fourslash/QuickInfo/jsdocLink5.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/JsdocLink5.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/jsdocLink5.baseline diff --git a/testdata/baselines/reference/fourslash/hover/JsdocOnInheritedMembers1.baseline b/testdata/baselines/reference/fourslash/QuickInfo/jsdocOnInheritedMembers1.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/JsdocOnInheritedMembers1.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/jsdocOnInheritedMembers1.baseline diff --git a/testdata/baselines/reference/fourslash/hover/JsdocOnInheritedMembers2.baseline b/testdata/baselines/reference/fourslash/QuickInfo/jsdocOnInheritedMembers2.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/JsdocOnInheritedMembers2.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/jsdocOnInheritedMembers2.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoAtPropWithAmbientDeclarationInJs.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoAtPropWithAmbientDeclarationInJs.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoAtPropWithAmbientDeclarationInJs.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoAtPropWithAmbientDeclarationInJs.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoCircularInstantiationExpression.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoCircularInstantiationExpression.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoCircularInstantiationExpression.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoCircularInstantiationExpression.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoCommentsClass.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsClass.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoCommentsClass.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsClass.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoCommentsClassMembers.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsClassMembers.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoCommentsClassMembers.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsClassMembers.baseline diff --git a/testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsCommentParsing.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsCommentParsing.baseline new file mode 100644 index 0000000000..b1c17bf57f --- /dev/null +++ b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsCommentParsing.baseline @@ -0,0 +1,1630 @@ +// === QuickInfo === +=== /quickInfoCommentsCommentParsing.ts === +// /// This is simple /// comments +// function simple() { +// } +// +// simple( ); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function simple(): void +// | ``` +// | +// | ---------------------------------------------------------------------- +// +// /// multiLine /// Comments +// /// This is example of multiline /// comments +// /// Another multiLine +// function multiLine() { +// } +// multiLine( ); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function multiLine(): void +// | ``` +// | +// | ---------------------------------------------------------------------- +// +// /** this is eg of single line jsdoc style comment */ +// function jsDocSingleLine() { +// } +// jsDocSingleLine(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocSingleLine(): void +// | ``` +// | this is eg of single line jsdoc style comment +// | ---------------------------------------------------------------------- +// +// +// /** this is multiple line jsdoc stule comment +// *New line1 +// *New Line2*/ +// function jsDocMultiLine() { +// } +// jsDocMultiLine(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocMultiLine(): void +// | ``` +// | this is multiple line jsdoc stule comment +// | New line1 +// | New Line2 +// | ---------------------------------------------------------------------- +// +// /** multiple line jsdoc comments no longer merge +// *New line1 +// *New Line2*/ +// /** Shoul mege this line as well +// * and this too*/ /** Another this one too*/ +// function jsDocMultiLineMerge() { +// } +// jsDocMultiLineMerge(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocMultiLineMerge(): void +// | ``` +// | Another this one too +// | ---------------------------------------------------------------------- +// +// +// /// Triple slash comment +// /** jsdoc comment */ +// function jsDocMixedComments1() { +// } +// jsDocMixedComments1(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocMixedComments1(): void +// | ``` +// | jsdoc comment +// | ---------------------------------------------------------------------- +// +// /// Triple slash comment +// /** jsdoc comment */ /** another jsDocComment*/ +// function jsDocMixedComments2() { +// } +// jsDocMixedComments2(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocMixedComments2(): void +// | ``` +// | another jsDocComment +// | ---------------------------------------------------------------------- +// +// /** jsdoc comment */ /*** triplestar jsDocComment*/ +// /// Triple slash comment +// function jsDocMixedComments3() { +// } +// jsDocMixedComments3(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocMixedComments3(): void +// | ``` +// | * triplestar jsDocComment +// | ---------------------------------------------------------------------- +// +// /** jsdoc comment */ /** another jsDocComment*/ +// /// Triple slash comment +// /// Triple slash comment 2 +// function jsDocMixedComments4() { +// } +// jsDocMixedComments4(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocMixedComments4(): void +// | ``` +// | another jsDocComment +// | ---------------------------------------------------------------------- +// +// /// Triple slash comment 1 +// /** jsdoc comment */ /** another jsDocComment*/ +// /// Triple slash comment +// /// Triple slash comment 2 +// function jsDocMixedComments5() { +// } +// jsDocMixedComments5(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocMixedComments5(): void +// | ``` +// | another jsDocComment +// | ---------------------------------------------------------------------- +// +// /** another jsDocComment*/ +// /// Triple slash comment 1 +// /// Triple slash comment +// /// Triple slash comment 2 +// /** jsdoc comment */ +// function jsDocMixedComments6() { +// } +// jsDocMixedComments6(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocMixedComments6(): void +// | ``` +// | jsdoc comment +// | ---------------------------------------------------------------------- +// +// // This shoulnot be help comment +// function noHelpComment1() { +// } +// noHelpComment1(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function noHelpComment1(): void +// | ``` +// | +// | ---------------------------------------------------------------------- +// +// /* This shoulnot be help comment */ +// function noHelpComment2() { +// } +// noHelpComment2(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function noHelpComment2(): void +// | ``` +// | +// | ---------------------------------------------------------------------- +// +// function noHelpComment3() { +// } +// noHelpComment3(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function noHelpComment3(): void +// | ``` +// | +// | ---------------------------------------------------------------------- +// /** Adds two integers and returns the result +// * @param {number} a first number +// * @param b second number +// */ +// function sum(a: number, b: number) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: number +// | ``` +// | first number +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: number +// | ``` +// | second number +// | +// | ---------------------------------------------------------------------- +// return a + b; +// } +// sum(10, 20); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function sum(a: number, b: number): number +// | ``` +// | Adds two integers and returns the result +// | +// | *@param* `a` — first number +// | +// | +// | *@param* `b` — second number +// | +// | ---------------------------------------------------------------------- +// /** This is multiplication function +// * @param +// * @param a first number +// * @param b +// * @param c { +// @param d @anotherTag +// * @param e LastParam @anotherTag*/ +// function multiply(a: number, b: number, c?: number, d?, e?) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: number +// | ``` +// | first number +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) c: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) d: any +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) e: any +// | ``` +// | LastParam +// | ---------------------------------------------------------------------- +// } +// multiply(10, 20, 30, 40, 50); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function multiply(a: number, b: number, c?: number, d?: any, e?: any): void +// | ``` +// | This is multiplication function +// | +// | *@param* `` +// | +// | *@param* `a` — first number +// | +// | +// | *@param* `b` +// | +// | *@param* `c` +// | +// | *@param* `d` +// | +// | *@anotherTag* +// | +// | *@param* `e` — LastParam +// | +// | *@anotherTag* +// | ---------------------------------------------------------------------- +// /** fn f1 with number +// * @param { string} b about b +// */ +// function f1(a: number); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// function f1(b: string); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: string +// | ``` +// | +// | ---------------------------------------------------------------------- +// /**@param opt optional parameter*/ +// function f1(aOrb, opt?) { +// return aOrb; +// } +// f1(10); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function f1(a: number): any +// | ``` +// | fn f1 with number +// | +// | *@param* `b` — about b +// | +// | ---------------------------------------------------------------------- +// f1("hello"); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function f1(b: string): any +// | ``` +// | +// | ---------------------------------------------------------------------- +// +// /** This is subtract function +// @param { a +// *@param { number | } b this is about b +// @param { { () => string; } } c this is optional param c +// @param { { () => string; } d this is optional param d +// @param { { () => string; } } e this is optional param e +// @param { { { () => string; } } f this is optional param f +// */ +// function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: number +// | ``` +// | this is about b +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) c: () => string +// | ``` +// | this is optional param c +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) d: () => string +// | ``` +// | this is optional param d +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) e: () => string +// | ``` +// | this is optional param e +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) f: () => string +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// subtract(10, 20, null, null, null, null); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | ``` +// | This is subtract function +// | +// | *@param* `` +// | +// | *@param* `b` — this is about b +// | +// | +// | *@param* `c` — this is optional param c +// | +// | +// | *@param* `d` — this is optional param d +// | +// | +// | *@param* `e` — this is optional param e +// | +// | +// | *@param* `` — { () => string; } } f this is optional param f +// | +// | ---------------------------------------------------------------------- +// /** this is square function +// @paramTag { number } a this is input number of paramTag +// @param { number } a this is input number +// @returnType { number } it is return type +// */ +// function square(a: number) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: number +// | ``` +// | this is input number +// | +// | ---------------------------------------------------------------------- +// return a * a; +// } +// square(10); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function square(a: number): number +// | ``` +// | this is square function +// | +// | *@paramTag* — { number } a this is input number of paramTag +// | +// | +// | *@param* `a` — this is input number +// | +// | +// | *@returnType* — { number } it is return type +// | +// | ---------------------------------------------------------------------- +// /** this is divide function +// @param { number} a this is a +// @paramTag { number } g this is optional param g +// @param { number} b this is b +// */ +// function divide(a: number, b: number) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: number +// | ``` +// | this is a +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: number +// | ``` +// | this is b +// | +// | ---------------------------------------------------------------------- +// } +// divide(10, 20); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function divide(a: number, b: number): void +// | ``` +// | this is divide function +// | +// | *@param* `a` — this is a +// | +// | +// | *@paramTag* — { number } g this is optional param g +// | +// | +// | *@param* `b` — this is b +// | +// | ---------------------------------------------------------------------- +// /** +// Function returns string concat of foo and bar +// @param {string} foo is string +// @param {string} bar is second string +// */ +// function fooBar(foo: string, bar: string) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) foo: string +// | ``` +// | is string +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) bar: string +// | ``` +// | is second string +// | +// | ---------------------------------------------------------------------- +// return foo + bar; +// } +// fooBar("foo","bar"); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function fooBar(foo: string, bar: string): string +// | ``` +// | Function returns string concat of foo and bar +// | +// | *@param* `foo` — is string +// | +// | +// | *@param* `bar` — is second string +// | +// | ---------------------------------------------------------------------- +// /** This is a comment */ +// var x; +// /** +// * This is a comment +// */ +// var y; +// /** this is jsdoc style function with param tag as well as inline parameter help +// *@param a it is first parameter +// *@param c it is third parameter +// */ +// function jsDocParamTest(/** this is inline comment for a */a: number, /** this is inline comment for b*/ b: number, c: number, d: number) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: number +// | ``` +// | this is inline comment for a +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: number +// | ``` +// | this is inline comment for b +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) c: number +// | ``` +// | it is third parameter +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) d: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// return a + b + c + d; +// } +// jsDocParamTest(30, 40, 50, 60); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocParamTest(a: number, b: number, c: number, d: number): number +// | ``` +// | this is jsdoc style function with param tag as well as inline parameter help +// | +// | *@param* `a` — it is first parameter +// | +// | +// | *@param* `c` — it is third parameter +// | +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And properly aligned comment +// */ +// function jsDocCommentAlignmentTest1() { +// } +// jsDocCommentAlignmentTest1(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocCommentAlignmentTest1(): void +// | ``` +// | This is function comment +// | And properly aligned comment +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And aligned with 4 space char margin +// */ +// function jsDocCommentAlignmentTest2() { +// } +// jsDocCommentAlignmentTest2(); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocCommentAlignmentTest2(): void +// | ``` +// | This is function comment +// | And aligned with 4 space char margin +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And aligned with 4 space char margin +// * @param {string} a this is info about a +// * spanning on two lines and aligned perfectly +// * @param b this is info about b +// * spanning on two lines and aligned perfectly +// * spanning one more line alined perfectly +// * spanning another line with more margin +// * @param c this is info about b +// * not aligned text about parameter will eat only one space +// */ +// function jsDocCommentAlignmentTest3(a: string, b, c) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: string +// | ``` +// | this is info about a +// | spanning on two lines and aligned perfectly +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: any +// | ``` +// | this is info about b +// | spanning on two lines and aligned perfectly +// | spanning one more line alined perfectly +// | spanning another line with more margin +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) c: any +// | ``` +// | this is info about b +// | not aligned text about parameter will eat only one space +// | +// | ---------------------------------------------------------------------- +// } +// jsDocCommentAlignmentTest3("hello",1, 2); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function jsDocCommentAlignmentTest3(a: string, b: any, c: any): void +// | ``` +// | This is function comment +// | And aligned with 4 space char margin +// | +// | *@param* `a` — this is info about a +// | spanning on two lines and aligned perfectly +// | +// | +// | *@param* `b` — this is info about b +// | spanning on two lines and aligned perfectly +// | spanning one more line alined perfectly +// | spanning another line with more margin +// | +// | +// | *@param* `c` — this is info about b +// | not aligned text about parameter will eat only one space +// | +// | ---------------------------------------------------------------------- +// +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /**/. +// | ---------------------------------------------------------------------- +// class NoQuickInfoClass { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | class NoQuickInfoClass +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +[ + { + "marker": { + "Position": 58, + "LSPosition": { + "line": 4, + "character": 3 + }, + "Name": "1q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction simple(): void\n```\n" + } + } + }, + { + "marker": { + "Position": 190, + "LSPosition": { + "line": 11, + "character": 3 + }, + "Name": "2q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction multiLine(): void\n```\n" + } + } + }, + { + "marker": { + "Position": 291, + "LSPosition": { + "line": 16, + "character": 5 + }, + "Name": "3q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocSingleLine(): void\n```\nthis is eg of single line jsdoc style comment" + } + } + }, + { + "marker": { + "Position": 413, + "LSPosition": { + "line": 24, + "character": 6 + }, + "Name": "4q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocMultiLine(): void\n```\nthis is multiple line jsdoc stule comment\nNew line1\nNew Line2" + } + } + }, + { + "marker": { + "Position": 618, + "LSPosition": { + "line": 33, + "character": 7 + }, + "Name": "5q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocMultiLineMerge(): void\n```\nAnother this one too" + } + } + }, + { + "marker": { + "Position": 725, + "LSPosition": { + "line": 40, + "character": 8 + }, + "Name": "6q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocMixedComments1(): void\n```\njsdoc comment" + } + } + }, + { + "marker": { + "Position": 856, + "LSPosition": { + "line": 46, + "character": 7 + }, + "Name": "7q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocMixedComments2(): void\n```\nanother jsDocComment" + } + } + }, + { + "marker": { + "Position": 994, + "LSPosition": { + "line": 52, + "character": 9 + }, + "Name": "8q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocMixedComments3(): void\n```\n* triplestar jsDocComment" + } + } + }, + { + "marker": { + "Position": 1154, + "LSPosition": { + "line": 59, + "character": 10 + }, + "Name": "9q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocMixedComments4(): void\n```\nanother jsDocComment" + } + } + }, + { + "marker": { + "Position": 1336, + "LSPosition": { + "line": 67, + "character": 6 + }, + "Name": "10q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocMixedComments5(): void\n```\nanother jsDocComment" + } + } + }, + { + "marker": { + "Position": 1524, + "LSPosition": { + "line": 76, + "character": 8 + }, + "Name": "11q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocMixedComments6(): void\n```\njsdoc comment" + } + } + }, + { + "marker": { + "Position": 1608, + "LSPosition": { + "line": 81, + "character": 5 + }, + "Name": "12q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction noHelpComment1(): void\n```\n" + } + } + }, + { + "marker": { + "Position": 1695, + "LSPosition": { + "line": 86, + "character": 7 + }, + "Name": "13q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction noHelpComment2(): void\n```\n" + } + } + }, + { + "marker": { + "Position": 1744, + "LSPosition": { + "line": 90, + "character": 7 + }, + "Name": "14q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction noHelpComment3(): void\n```\n" + } + } + }, + { + "marker": { + "Position": 1880, + "LSPosition": { + "line": 95, + "character": 13 + }, + "Name": "16aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: number\n```\nfirst number\n" + } + } + }, + { + "marker": { + "Position": 1891, + "LSPosition": { + "line": 95, + "character": 24 + }, + "Name": "17aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: number\n```\nsecond number\n" + } + } + }, + { + "marker": { + "Position": 1925, + "LSPosition": { + "line": 98, + "character": 1 + }, + "Name": "16q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction sum(a: number, b: number): number\n```\nAdds two integers and returns the result\n\n*@param* `a` — first number\n\n\n*@param* `b` — second number\n" + } + } + }, + { + "marker": { + "Position": 2110, + "LSPosition": { + "line": 106, + "character": 18 + }, + "Name": "19aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: number\n```\nfirst number\n" + } + } + }, + { + "marker": { + "Position": 2121, + "LSPosition": { + "line": 106, + "character": 29 + }, + "Name": "20aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: number\n```\n" + } + } + }, + { + "marker": { + "Position": 2132, + "LSPosition": { + "line": 106, + "character": 40 + }, + "Name": "21aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) c: number\n```\n" + } + } + }, + { + "marker": { + "Position": 2144, + "LSPosition": { + "line": 106, + "character": 52 + }, + "Name": "22aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) d: any\n```\n" + } + } + }, + { + "marker": { + "Position": 2148, + "LSPosition": { + "line": 106, + "character": 56 + }, + "Name": "23aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) e: any\n```\nLastParam " + } + } + }, + { + "marker": { + "Position": 2160, + "LSPosition": { + "line": 108, + "character": 4 + }, + "Name": "19q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction multiply(a: number, b: number, c?: number, d?: any, e?: any): void\n```\nThis is multiplication function\n\n*@param* ``\n\n*@param* `a` — first number\n\n\n*@param* `b`\n\n*@param* `c`\n\n*@param* `d`\n\n*@anotherTag*\n\n*@param* `e` — LastParam \n\n*@anotherTag*" + } + } + }, + { + "marker": { + "Position": 2252, + "LSPosition": { + "line": 112, + "character": 12 + }, + "Name": "25aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: number\n```\n" + } + } + }, + { + "marker": { + "Position": 2276, + "LSPosition": { + "line": 113, + "character": 12 + }, + "Name": "26aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: string\n```\n" + } + } + }, + { + "marker": { + "Position": 2369, + "LSPosition": { + "line": 118, + "character": 1 + }, + "Name": "25q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction f1(a: number): any\n```\nfn f1 with number\n\n*@param* `b` — about b\n" + } + } + }, + { + "marker": { + "Position": 2377, + "LSPosition": { + "line": 119, + "character": 1 + }, + "Name": "26q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction f1(b: string): any\n```\n" + } + } + }, + { + "marker": { + "Position": 2715, + "LSPosition": { + "line": 129, + "character": 18 + }, + "Name": "28aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: number\n```\n" + } + } + }, + { + "marker": { + "Position": 2726, + "LSPosition": { + "line": 129, + "character": 29 + }, + "Name": "29aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: number\n```\nthis is about b\n" + } + } + }, + { + "marker": { + "Position": 2737, + "LSPosition": { + "line": 129, + "character": 40 + }, + "Name": "30aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) c: () => string\n```\nthis is optional param c\n" + } + } + }, + { + "marker": { + "Position": 2755, + "LSPosition": { + "line": 129, + "character": 58 + }, + "Name": "31aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) d: () => string\n```\nthis is optional param d\n" + } + } + }, + { + "marker": { + "Position": 2773, + "LSPosition": { + "line": 129, + "character": 76 + }, + "Name": "32aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) e: () => string\n```\nthis is optional param e\n" + } + } + }, + { + "marker": { + "Position": 2791, + "LSPosition": { + "line": 129, + "character": 94 + }, + "Name": "33aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) f: () => string\n```\n" + } + } + }, + { + "marker": { + "Position": 2817, + "LSPosition": { + "line": 131, + "character": 4 + }, + "Name": "28q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void\n```\nThis is subtract function\n\n*@param* ``\n\n*@param* `b` — this is about b\n\n\n*@param* `c` — this is optional param c\n\n\n*@param* `d` — this is optional param d\n\n\n*@param* `e` — this is optional param e\n\n\n*@param* `` — { () => string; } } f this is optional param f\n" + } + } + }, + { + "marker": { + "Position": 3044, + "LSPosition": { + "line": 137, + "character": 16 + }, + "Name": "34aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: number\n```\nthis is input number\n" + } + } + }, + { + "marker": { + "Position": 3080, + "LSPosition": { + "line": 140, + "character": 3 + }, + "Name": "34q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction square(a: number): number\n```\nthis is square function\n\n*@paramTag* — { number } a this is input number of paramTag\n\n\n*@param* `a` — this is input number\n\n\n*@returnType* — { number } it is return type\n" + } + } + }, + { + "marker": { + "Position": 3242, + "LSPosition": { + "line": 146, + "character": 16 + }, + "Name": "35aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: number\n```\nthis is a\n" + } + } + }, + { + "marker": { + "Position": 3253, + "LSPosition": { + "line": 146, + "character": 27 + }, + "Name": "36aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: number\n```\nthis is b\n" + } + } + }, + { + "marker": { + "Position": 3271, + "LSPosition": { + "line": 148, + "character": 3 + }, + "Name": "35q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction divide(a: number, b: number): void\n```\nthis is divide function\n\n*@param* `a` — this is a\n\n\n*@paramTag* — { number } g this is optional param g\n\n\n*@param* `b` — this is b\n" + } + } + }, + { + "marker": { + "Position": 3431, + "LSPosition": { + "line": 154, + "character": 16 + }, + "Name": "37aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) foo: string\n```\nis string\n" + } + } + }, + { + "marker": { + "Position": 3444, + "LSPosition": { + "line": 154, + "character": 29 + }, + "Name": "38aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) bar: string\n```\nis second string\n" + } + } + }, + { + "marker": { + "Position": 3485, + "LSPosition": { + "line": 157, + "character": 2 + }, + "Name": "37q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction fooBar(foo: string, bar: string): string\n```\nFunction returns string concat of foo and bar\n\n*@param* `foo` — is string\n\n\n*@param* `bar` — is second string\n" + } + } + }, + { + "marker": { + "Position": 3781, + "LSPosition": { + "line": 168, + "character": 59 + }, + "Name": "40aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: number\n```\nthis is inline comment for a" + } + } + }, + { + "marker": { + "Position": 3827, + "LSPosition": { + "line": 168, + "character": 105 + }, + "Name": "41aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: number\n```\nthis is inline comment for b" + } + } + }, + { + "marker": { + "Position": 3838, + "LSPosition": { + "line": 168, + "character": 116 + }, + "Name": "42aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) c: number\n```\nit is third parameter\n" + } + } + }, + { + "marker": { + "Position": 3849, + "LSPosition": { + "line": 168, + "character": 127 + }, + "Name": "43aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) d: number\n```\n" + } + } + }, + { + "marker": { + "Position": 3893, + "LSPosition": { + "line": 171, + "character": 3 + }, + "Name": "40q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocParamTest(a: number, b: number, c: number, d: number): number\n```\nthis is jsdoc style function with param tag as well as inline parameter help\n\n*@param* `a` — it is first parameter\n\n\n*@param* `c` — it is third parameter\n" + } + } + }, + { + "marker": { + "Position": 4039, + "LSPosition": { + "line": 177, + "character": 8 + }, + "Name": "45q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocCommentAlignmentTest1(): void\n```\nThis is function comment\nAnd properly aligned comment" + } + } + }, + { + "marker": { + "Position": 4192, + "LSPosition": { + "line": 183, + "character": 10 + }, + "Name": "46q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocCommentAlignmentTest2(): void\n```\nThis is function comment\n And aligned with 4 space char margin" + } + } + }, + { + "marker": { + "Position": 4777, + "LSPosition": { + "line": 195, + "character": 36 + }, + "Name": "47aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: string\n```\nthis is info about a\nspanning on two lines and aligned perfectly\n" + } + } + }, + { + "marker": { + "Position": 4788, + "LSPosition": { + "line": 195, + "character": 47 + }, + "Name": "48aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: any\n```\nthis is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin\n" + } + } + }, + { + "marker": { + "Position": 4791, + "LSPosition": { + "line": 195, + "character": 50 + }, + "Name": "49aq", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) c: any\n```\nthis is info about b\nnot aligned text about parameter will eat only one space\n" + } + } + }, + { + "marker": { + "Position": 4808, + "LSPosition": { + "line": 197, + "character": 10 + }, + "Name": "47q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction jsDocCommentAlignmentTest3(a: string, b: any, c: any): void\n```\nThis is function comment\n And aligned with 4 space char margin\n\n*@param* `a` — this is info about a\nspanning on two lines and aligned perfectly\n\n\n*@param* `b` — this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin\n\n\n*@param* `c` — this is info about b\nnot aligned text about parameter will eat only one space\n" + } + } + }, + { + "marker": { + "Position": 4840, + "LSPosition": { + "line": 198, + "character": 0 + }, + "Name": "", + "Data": {} + }, + "item": null + }, + { + "marker": { + "Position": 4853, + "LSPosition": { + "line": 199, + "character": 12 + }, + "Name": "50q", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nclass NoQuickInfoClass\n```\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoCommentsFunctionDeclaration.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsFunctionDeclaration.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoCommentsFunctionDeclaration.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsFunctionDeclaration.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoCommentsFunctionExpression.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsFunctionExpression.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoCommentsFunctionExpression.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoCommentsFunctionExpression.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsArrowFunctionExpression.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsArrowFunctionExpression.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsArrowFunctionExpression.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsArrowFunctionExpression.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClass.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClass.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClass.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClass.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassAccessors.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassAccessors.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassAccessors.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassAccessors.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassAutoAccessors.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassAutoAccessors.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassAutoAccessors.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassAutoAccessors.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassConstructor.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassConstructor.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassConstructor.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassConstructor.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassDefaultAnonymous.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassDefaultAnonymous.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassDefaultAnonymous.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassDefaultAnonymous.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassDefaultNamed.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassDefaultNamed.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassDefaultNamed.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassDefaultNamed.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassIncomplete.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassIncomplete.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassIncomplete.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassIncomplete.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassMethod.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassMethod.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassMethod.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassMethod.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassProperty.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassProperty.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsClassProperty.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsClassProperty.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsConst.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsConst.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsConst.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsConst.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsEnum1.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsEnum1.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsEnum1.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsEnum1.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsEnum2.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsEnum2.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsEnum2.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsEnum2.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsEnum3.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsEnum3.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsEnum3.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsEnum3.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsEnum4.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsEnum4.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsEnum4.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsEnum4.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsExternalModuleAlias.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsExternalModuleAlias.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsExternalModuleAlias.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsExternalModuleAlias.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsExternalModules.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsExternalModules.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsExternalModules.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsExternalModules.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsFunction.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsFunction.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsFunction.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsFunction.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsFunctionExpression.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsFunctionExpression.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsFunctionExpression.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsFunctionExpression.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsFunctionIncomplete.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsFunctionIncomplete.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsFunctionIncomplete.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsFunctionIncomplete.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsInterface.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsInterface.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsInterface.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsInterface.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsInterfaceMembers.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsInterfaceMembers.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsInterfaceMembers.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsInterfaceMembers.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsInternalModuleAlias.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsInternalModuleAlias.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsInternalModuleAlias.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsInternalModuleAlias.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsLet.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsLet.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsLet.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsLet.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsLiteralLikeNames01.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsLiteralLikeNames01.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsLiteralLikeNames01.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsLiteralLikeNames01.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsLocalFunction.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsLocalFunction.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsLocalFunction.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsLocalFunction.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsModules.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsModules.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsModules.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsModules.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsParameters.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsParameters.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsParameters.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsParameters.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeAlias.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeAlias.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeAlias.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeAlias.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInClass.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeParameterInClass.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInClass.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeParameterInClass.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunction.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeParameterInFunction.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunction.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeParameterInFunction.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInInterface.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeParameterInInterface.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInInterface.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeParameterInInterface.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInTypeAlias.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeParameterInTypeAlias.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInTypeAlias.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsTypeParameterInTypeAlias.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsUsing.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsUsing.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsUsing.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsUsing.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsVar.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsVar.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsVar.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsVar.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsVarWithStringTypes01.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsVarWithStringTypes01.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsVarWithStringTypes01.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoDisplayPartsVarWithStringTypes01.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForArgumentsPropertyNameInJsMode1.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForArgumentsPropertyNameInJsMode1.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForArgumentsPropertyNameInJsMode1.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForArgumentsPropertyNameInJsMode1.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForArgumentsPropertyNameInJsMode2.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForArgumentsPropertyNameInJsMode2.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForArgumentsPropertyNameInJsMode2.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForArgumentsPropertyNameInJsMode2.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForConstAssertions.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForConstAssertions.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForConstAssertions.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForConstAssertions.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForJSDocCodefence.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForJSDocCodefence.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForJSDocCodefence.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForJSDocCodefence.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForJSDocUnknownTag.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForJSDocUnknownTag.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForJSDocUnknownTag.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForJSDocUnknownTag.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForJSDocWithHttpLinks.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForJSDocWithHttpLinks.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForJSDocWithHttpLinks.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForJSDocWithHttpLinks.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForJSDocWithUnresolvedHttpLinks.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForJSDocWithUnresolvedHttpLinks.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForJSDocWithUnresolvedHttpLinks.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForJSDocWithUnresolvedHttpLinks.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForObjectBindingElementName03.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForObjectBindingElementName03.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForObjectBindingElementName03.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForObjectBindingElementName03.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForObjectBindingElementName04.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForObjectBindingElementName04.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForObjectBindingElementName04.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForObjectBindingElementName04.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForObjectBindingElementName05.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForObjectBindingElementName05.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForObjectBindingElementName05.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForObjectBindingElementName05.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoForObjectBindingElementName06.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoForObjectBindingElementName06.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoForObjectBindingElementName06.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoForObjectBindingElementName06.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoImportMeta.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoImportMeta.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoImportMeta.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoImportMeta.baseline diff --git a/testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc.baseline new file mode 100644 index 0000000000..4e6aa5f658 --- /dev/null +++ b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc.baseline @@ -0,0 +1,149 @@ +// === QuickInfo === +=== /quickInfoInheritDoc.ts === +// abstract class BaseClass { +// /** +// * Useful description always applicable +// * +// * @returns {string} Useful description of return value always applicable. +// */ +// public static doSomethingUseful(stuff?: any): string { +// throw new Error('Must be implemented by subclass'); +// } +// +// /** +// * BaseClass.func1 +// * @param {any} stuff1 BaseClass.func1.stuff1 +// * @returns {void} BaseClass.func1.returns +// */ +// public static func1(stuff1: any): void { +// } +// +// /** +// * Applicable description always. +// */ +// public static readonly someProperty: string = 'general value'; +// } +// +// +// +// +// class SubClass extends BaseClass { +// +// /** +// * @inheritDoc +// * +// * @param {{ tiger: string; lion: string; }} [mySpecificStuff] Description of my specific parameter. +// */ +// public static doSomethingUseful(mySpecificStuff?: { tiger: string; lion: string; }): string { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) SubClass.doSomethingUseful(mySpecificStuff?: { tiger: string; lion: string; }): string +// | ``` +// | +// | +// | *@inheritDoc* +// | +// | *@param* `mySpecificStuff` — Description of my specific parameter. +// | +// | ---------------------------------------------------------------------- +// let useful = ''; +// +// // do something useful to useful +// +// return useful; +// } +// +// /** +// * @inheritDoc +// * @param {any} stuff1 SubClass.func1.stuff1 +// * @returns {void} SubClass.func1.returns +// */ +// public static func1(stuff1: any): void { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) SubClass.func1(stuff1: any): void +// | ``` +// | +// | +// | *@inheritDoc* +// | +// | *@param* `stuff1` — SubClass.func1.stuff1 +// | +// | +// | *@returns* — SubClass.func1.returns +// | +// | ---------------------------------------------------------------------- +// } +// +// /** +// * text over tag +// * @inheritDoc +// * text after tag +// */ +// public static readonly someProperty: string = 'specific to this class value' +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) SubClass.someProperty: string +// | ``` +// | text over tag +// | +// | *@inheritDoc* — text after tag +// | +// | ---------------------------------------------------------------------- +// } +[ + { + "marker": { + "Position": 815, + "LSPosition": { + "line": 34, + "character": 18 + }, + "Name": "1", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) SubClass.doSomethingUseful(mySpecificStuff?: { tiger: string; lion: string; }): string\n```\n\n\n*@inheritDoc*\n\n*@param* `mySpecificStuff` — Description of my specific parameter.\n" + } + } + }, + { + "marker": { + "Position": 1141, + "LSPosition": { + "line": 47, + "character": 18 + }, + "Name": "2", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) SubClass.func1(stuff1: any): void\n```\n\n\n*@inheritDoc*\n\n*@param* `stuff1` — SubClass.func1.stuff1\n\n\n*@returns* — SubClass.func1.returns\n" + } + } + }, + { + "marker": { + "Position": 1280, + "LSPosition": { + "line": 55, + "character": 27 + }, + "Name": "3", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) SubClass.someProperty: string\n```\ntext over tag\n\n*@inheritDoc* — text after tag\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc2.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc2.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc2.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc2.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc3.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc3.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc3.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc3.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc4.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc4.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc4.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc4.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc5.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc5.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc5.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc5.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc6.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc6.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc6.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoInheritDoc6.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJSDocAtBeforeSpace.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJSDocAtBeforeSpace.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJSDocAtBeforeSpace.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJSDocAtBeforeSpace.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJSDocTags.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJSDocTags.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJSDocTags.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJSDocTags.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDoc.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDoc.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDoc.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDoc.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocAlias.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocAlias.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocAlias.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocAlias.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocGetterSetter.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocGetterSetter.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocGetterSetter.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocGetterSetter.baseline diff --git a/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocInheritage.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocInheritage.baseline new file mode 100644 index 0000000000..c125ef2cce --- /dev/null +++ b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocInheritage.baseline @@ -0,0 +1,684 @@ +// === QuickInfo === +=== /quickInfoJsDocInheritage.ts === +// interface A { +// /** +// * @description A.foo1 +// */ +// foo1: number; +// /** +// * @description A.foo2 +// */ +// foo2: (para1: string) => number; +// } +// +// interface B { +// /** +// * @description B.foo1 +// */ +// foo1: number; +// /** +// * @description B.foo2 +// */ +// foo2: (para2: string) => number; +// } +// +// // implement multi interfaces with duplicate name +// // method for function signature +// class C implements A, B { +// foo1: number = 1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) C.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// foo2(q: string) { return 1 } +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) C.foo2(q: string): number +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// +// // implement multi interfaces with duplicate name +// // property for function signature +// class D implements A, B { +// foo1: number = 1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) D.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// foo2 = (q: string) => { return 1 } +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) D.foo2: (q: string) => number +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// +// new C().foo1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) C.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// new C().foo2; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) C.foo2(q: string): number +// | ``` +// | +// | ---------------------------------------------------------------------- +// new D().foo1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) D.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// new D().foo2; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) D.foo2: (q: string) => number +// | ``` +// | +// | ---------------------------------------------------------------------- +// +// class Base1 { +// /** +// * @description Base1.foo1 +// */ +// foo1: number = 1; +// +// /** +// * +// * @param q Base1.foo2 parameter +// * @returns Base1.foo2 return +// */ +// foo2(q: string) { return 1 } +// } +// +// // extends class and implement interfaces with duplicate name +// // property override method +// class Drived1 extends Base1 implements A { +// foo1: number = 1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived1.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// foo2(para1: string) { return 1 }; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) Drived1.foo2(para1: string): number +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// +// // extends class and implement interfaces with duplicate name +// // method override method +// class Drived2 extends Base1 implements B { +// foo1: number = 1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived2.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// foo2 = (para1: string) => { return 1; }; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived2.foo2: (para1: string) => number +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// +// class Base2 { +// /** +// * @description Base2.foo1 +// */ +// foo1: number = 1; +// /** +// * +// * @param q Base2.foo2 parameter +// * @returns Base2.foo2 return +// */ +// foo2(q: string) { return 1 } +// } +// +// // extends class and implement interfaces with duplicate name +// // property override method +// class Drived3 extends Base2 implements A { +// foo1: number = 1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived3.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// foo2(para1: string) { return 1 }; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) Drived3.foo2(para1: string): number +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// +// // extends class and implement interfaces with duplicate name +// // method override method +// class Drived4 extends Base2 implements B { +// foo1: number = 1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived4.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// foo2 = (para1: string) => { return 1; }; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived4.foo2: (para1: string) => number +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// +// new Drived1().foo1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived1.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// new Drived1().foo2; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) Drived1.foo2(para1: string): number +// | ``` +// | +// | ---------------------------------------------------------------------- +// new Drived2().foo1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived2.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// new Drived2().foo2; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived2.foo2: (para1: string) => number +// | ``` +// | +// | ---------------------------------------------------------------------- +// new Drived3().foo1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived3.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// new Drived3().foo2; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) Drived3.foo2(para1: string): number +// | ``` +// | +// | ---------------------------------------------------------------------- +// new Drived4().foo1; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived4.foo1: number +// | ``` +// | +// | ---------------------------------------------------------------------- +// new Drived4().foo2; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Drived4.foo2: (para1: string) => number +// | ``` +// | +// | ---------------------------------------------------------------------- +[ + { + "marker": { + "Position": 429, + "LSPosition": { + "line": 25, + "character": 4 + }, + "Name": "1", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) C.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 451, + "LSPosition": { + "line": 26, + "character": 4 + }, + "Name": "2", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) C.foo2(q: string): number\n```\n" + } + } + }, + { + "marker": { + "Position": 598, + "LSPosition": { + "line": 32, + "character": 4 + }, + "Name": "3", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) D.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 620, + "LSPosition": { + "line": 33, + "character": 4 + }, + "Name": "4", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) D.foo2: (q: string) => number\n```\n" + } + } + }, + { + "marker": { + "Position": 666, + "LSPosition": { + "line": 36, + "character": 8 + }, + "Name": "5", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) C.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 680, + "LSPosition": { + "line": 37, + "character": 8 + }, + "Name": "6", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) C.foo2(q: string): number\n```\n" + } + } + }, + { + "marker": { + "Position": 694, + "LSPosition": { + "line": 38, + "character": 8 + }, + "Name": "7", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) D.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 708, + "LSPosition": { + "line": 39, + "character": 8 + }, + "Name": "8", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) D.foo2: (q: string) => number\n```\n" + } + } + }, + { + "marker": { + "Position": 1067, + "LSPosition": { + "line": 58, + "character": 4 + }, + "Name": "9", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived1.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 1089, + "LSPosition": { + "line": 59, + "character": 4 + }, + "Name": "10", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) Drived1.foo2(para1: string): number\n```\n" + } + } + }, + { + "marker": { + "Position": 1261, + "LSPosition": { + "line": 65, + "character": 4 + }, + "Name": "11", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived2.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 1283, + "LSPosition": { + "line": 66, + "character": 4 + }, + "Name": "12", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived2.foo2: (para1: string) => number\n```\n" + } + } + }, + { + "marker": { + "Position": 1677, + "LSPosition": { + "line": 85, + "character": 4 + }, + "Name": "13", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived3.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 1699, + "LSPosition": { + "line": 86, + "character": 4 + }, + "Name": "14", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) Drived3.foo2(para1: string): number\n```\n" + } + } + }, + { + "marker": { + "Position": 1871, + "LSPosition": { + "line": 92, + "character": 4 + }, + "Name": "15", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived4.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 1893, + "LSPosition": { + "line": 93, + "character": 4 + }, + "Name": "16", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived4.foo2: (para1: string) => number\n```\n" + } + } + }, + { + "marker": { + "Position": 1951, + "LSPosition": { + "line": 96, + "character": 14 + }, + "Name": "17", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived1.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 1971, + "LSPosition": { + "line": 97, + "character": 14 + }, + "Name": "18", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) Drived1.foo2(para1: string): number\n```\n" + } + } + }, + { + "marker": { + "Position": 1991, + "LSPosition": { + "line": 98, + "character": 14 + }, + "Name": "19", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived2.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 2011, + "LSPosition": { + "line": 99, + "character": 14 + }, + "Name": "20", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived2.foo2: (para1: string) => number\n```\n" + } + } + }, + { + "marker": { + "Position": 2031, + "LSPosition": { + "line": 100, + "character": 14 + }, + "Name": "21", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived3.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 2051, + "LSPosition": { + "line": 101, + "character": 14 + }, + "Name": "22", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) Drived3.foo2(para1: string): number\n```\n" + } + } + }, + { + "marker": { + "Position": 2071, + "LSPosition": { + "line": 102, + "character": 14 + }, + "Name": "23", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived4.foo1: number\n```\n" + } + } + }, + { + "marker": { + "Position": 2091, + "LSPosition": { + "line": 103, + "character": 14 + }, + "Name": "24", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Drived4.foo2: (para1: string) => number\n```\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags1.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags1.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags1.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags1.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags10.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags10.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags10.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags10.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags11.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags11.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags11.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags11.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags12.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags12.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags12.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags12.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags14.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags14.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags14.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags14.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags15.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags15.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags15.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags15.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags16.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags16.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags16.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags16.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags3.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags3.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags3.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags3.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags4.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags4.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags4.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags4.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags5.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags5.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags5.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags5.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags6.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags6.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags6.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags6.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags7.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags7.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags7.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags7.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags8.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags8.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags8.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags8.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags9.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags9.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTags9.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTags9.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTagsCallback.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTagsCallback.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTagsCallback.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTagsCallback.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTagsFunctionOverload01.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTagsFunctionOverload01.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTagsFunctionOverload01.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTagsFunctionOverload01.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTagsFunctionOverload03.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTagsFunctionOverload03.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTagsFunctionOverload03.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTagsFunctionOverload03.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTagsFunctionOverload05.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTagsFunctionOverload05.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTagsFunctionOverload05.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTagsFunctionOverload05.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTagsTypedef.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTagsTypedef.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocTagsTypedef.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocTagsTypedef.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocThisTag.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocThisTag.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoJsDocThisTag.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoJsDocThisTag.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoLink10.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink10.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoLink10.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink10.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoLink11.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink11.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoLink11.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink11.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoLink5.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink5.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoLink5.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink5.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoLink6.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink6.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoLink6.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink6.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoLink7.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink7.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoLink7.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink7.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoLink8.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink8.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoLink8.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink8.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoLink9.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink9.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoLink9.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoLink9.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoNestedExportEqualExportDefault.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoNestedExportEqualExportDefault.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoNestedExportEqualExportDefault.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoNestedExportEqualExportDefault.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoOnJsxIntrinsicDeclaredUsingCatchCallIndexSignature.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnJsxIntrinsicDeclaredUsingCatchCallIndexSignature.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoOnJsxIntrinsicDeclaredUsingCatchCallIndexSignature.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnJsxIntrinsicDeclaredUsingCatchCallIndexSignature.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoOnJsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnJsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoOnJsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnJsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoOnJsxNamespacedName.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnJsxNamespacedName.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoOnJsxNamespacedName.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnJsxNamespacedName.baseline diff --git a/testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnParameterProperties.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnParameterProperties.baseline new file mode 100644 index 0000000000..8c3b8ee838 --- /dev/null +++ b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnParameterProperties.baseline @@ -0,0 +1,77 @@ +// === QuickInfo === +=== /quickInfoOnParameterProperties.ts === +// interface IFoo { +// /** this is the name of blabla +// * - use blabla +// * @example blabla +// */ +// name?: string; +// } +// +// // test1 should work +// class Foo implements IFoo { +// //public name: string = ''; +// constructor( +// public name: string, // documentation should leech and work ! +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Foo.name: string +// | ``` +// | +// | ---------------------------------------------------------------------- +// ) { +// } +// } +// +// // test2 work +// class Foo2 implements IFoo { +// public name: string = ''; // documentation leeched and work ! +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (property) Foo2.name: string +// | ``` +// | +// | ---------------------------------------------------------------------- +// constructor( +// //public name: string, +// ) { +// } +// } +[ + { + "marker": { + "Position": 224, + "LSPosition": { + "line": 12, + "character": 13 + }, + "Name": "1", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Foo.name: string\n```\n" + } + } + }, + { + "marker": { + "Position": 344, + "LSPosition": { + "line": 19, + "character": 11 + }, + "Name": "2", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(property) Foo2.name: string\n```\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoOnThis5.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnThis5.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoOnThis5.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnThis5.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoSatisfiesTag.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoSatisfiesTag.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoSatisfiesTag.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoSatisfiesTag.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoTypedefTag.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoTypedefTag.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoTypedefTag.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoTypedefTag.baseline diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoUniqueSymbolJsDoc.baseline b/testdata/baselines/reference/fourslash/QuickInfo/quickInfoUniqueSymbolJsDoc.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/hover/QuickInfoUniqueSymbolJsDoc.baseline rename to testdata/baselines/reference/fourslash/QuickInfo/quickInfoUniqueSymbolJsDoc.baseline diff --git a/testdata/baselines/reference/fourslash/findAllRef/AmbientShorthandFindAllRefs.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/AmbientShorthandFindAllRefs.baseline.jsonc deleted file mode 100644 index 188cdbb005..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/AmbientShorthandFindAllRefs.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /user.ts === - -// import {/*FIND ALL REFS*/[|x|]} from "jquery"; - - - - -// === findAllReferences === -// === /user2.ts === - -// import {/*FIND ALL REFS*/[|x|]} from "jquery"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/AutoImportProvider_referencesCrash.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/AutoImportProvider_referencesCrash.baseline.jsonc deleted file mode 100644 index 74063b82c8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/AutoImportProvider_referencesCrash.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /home/src/workspaces/project/a/index.d.ts === - -// declare class [|A|] { -// } -// //# sourceMappingURL=index.d.ts.map - - -// === /home/src/workspaces/project/b/b.ts === - -// /// -// new [|A|]/*FIND ALL REFS*/(); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences1.baseline.jsonc deleted file mode 100644 index 2d3fb77015..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences1.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === findAllReferences === -// === /constructorFindAllReferences1.ts === - -// export class C { -// /*FIND ALL REFS*/public constructor() { } -// public foo() { } -// } -// -// new C().foo(); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences2.baseline.jsonc deleted file mode 100644 index e670a87db0..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences2.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === findAllReferences === -// === /constructorFindAllReferences2.ts === - -// export class C { -// /*FIND ALL REFS*/private constructor() { } -// public foo() { } -// } -// -// new C().foo(); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences3.baseline.jsonc deleted file mode 100644 index eafd38c140..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences3.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === findAllReferences === -// === /constructorFindAllReferences3.ts === - -// export class [|C|] { -// /*FIND ALL REFS*/constructor() { } -// public foo() { } -// } -// -// new [|C|]().foo(); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences4.baseline.jsonc deleted file mode 100644 index 8116716578..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ConstructorFindAllReferences4.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === findAllReferences === -// === /constructorFindAllReferences4.ts === - -// export class C { -// /*FIND ALL REFS*/protected constructor() { } -// public foo() { } -// } -// -// new C().foo(); diff --git a/testdata/baselines/reference/fourslash/findAllRef/EsModuleInteropFindAllReferences.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/EsModuleInteropFindAllReferences.baseline.jsonc deleted file mode 100644 index 8496512cb3..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/EsModuleInteropFindAllReferences.baseline.jsonc +++ /dev/null @@ -1,38 +0,0 @@ -// === findAllReferences === -// === /abc.d.ts === - -// declare module "a" { -// /*FIND ALL REFS*/export const x: number; -// } - - - - -// === findAllReferences === -// === /abc.d.ts === - -// declare module "a" { -// export const /*FIND ALL REFS*/[|x|]: number; -// } - - -// === /b.ts === - -// import a from "a"; -// a.[|x|]; - - - - -// === findAllReferences === -// === /abc.d.ts === - -// declare module "a" { -// export const [|x|]: number; -// } - - -// === /b.ts === - -// import a from "a"; -// a./*FIND ALL REFS*/[|x|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/EsModuleInteropFindAllReferences2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/EsModuleInteropFindAllReferences2.baseline.jsonc deleted file mode 100644 index dec538b1a0..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/EsModuleInteropFindAllReferences2.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /a.d.ts === - -// export as namespace abc; -// /*FIND ALL REFS*/export const x: number; - - - - -// === findAllReferences === -// === /a.d.ts === - -// export as namespace abc; -// export const /*FIND ALL REFS*/[|x|]: number; - - -// === /b.ts === - -// import a from "./a"; -// a.[|x|]; - - - - -// === findAllReferences === -// === /a.d.ts === - -// export as namespace abc; -// export const [|x|]: number; - - -// === /b.ts === - -// import a from "./a"; -// a./*FIND ALL REFS*/[|x|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ExplainFilesNodeNextWithTypesReference.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ExplainFilesNodeNextWithTypesReference.baseline.jsonc deleted file mode 100644 index 86cc90f512..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ExplainFilesNodeNextWithTypesReference.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === findAllReferences === -// === /node_modules/react-hook-form/dist/index.d.ts === - -// /// -// export type Foo = React.Whatever; -// export function useForm(): any; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferPropertyAccessExpressionHeritageClause.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferPropertyAccessExpressionHeritageClause.baseline.jsonc deleted file mode 100644 index 888592014d..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferPropertyAccessExpressionHeritageClause.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /findAllReferPropertyAccessExpressionHeritageClause.ts === - -// class B {} -// function foo() { -// return {/*FIND ALL REFS*/[|B|]: B}; -// } -// class C extends (foo()).[|B|] {} -// class C1 extends foo().[|B|] {} - - - - -// === findAllReferences === -// === /findAllReferPropertyAccessExpressionHeritageClause.ts === - -// class B {} -// function foo() { -// return {[|B|]: B}; -// } -// class C extends (foo())./*FIND ALL REFS*/[|B|] {} -// class C1 extends foo().[|B|] {} - - - - -// === findAllReferences === -// === /findAllReferPropertyAccessExpressionHeritageClause.ts === - -// class B {} -// function foo() { -// return {[|B|]: B}; -// } -// class C extends (foo()).[|B|] {} -// class C1 extends foo()./*FIND ALL REFS*/[|B|] {} diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFilteringMappedTypeProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFilteringMappedTypeProperty.baseline.jsonc deleted file mode 100644 index 53c7ba4ecf..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFilteringMappedTypeProperty.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === findAllReferences === -// === /findAllReferencesFilteringMappedTypeProperty.ts === - -// const obj = { /*FIND ALL REFS*/[|a|]: 1, b: 2 }; -// const filtered: { [P in keyof typeof obj as P extends 'b' ? never : P]: 0; } = { [|a|]: 0 }; -// filtered.[|a|]; - - - - -// === findAllReferences === -// === /findAllReferencesFilteringMappedTypeProperty.ts === - -// const obj = { [|a|]: 1, b: 2 }; -// const filtered: { [P in keyof typeof obj as P extends 'b' ? never : P]: 0; } = { /*FIND ALL REFS*/[|a|]: 0 }; -// filtered.[|a|]; - - - - -// === findAllReferences === -// === /findAllReferencesFilteringMappedTypeProperty.ts === - -// const obj = { [|a|]: 1, b: 2 }; -// const filtered: { [P in keyof typeof obj as P extends 'b' ? never : P]: 0; } = { [|a|]: 0 }; -// filtered./*FIND ALL REFS*/[|a|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference1.baseline.jsonc deleted file mode 100644 index 50d5750dba..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference1.baseline.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -// === findAllReferences === -// === /findAllReferencesFromLinkTagReference1.ts === - -// enum E { -// /** {@link /*FIND ALL REFS*/[|A|]} */ -// [|A|] -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference2.baseline.jsonc deleted file mode 100644 index 695b9e0156..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference2.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// enum E { -// /** {@link /*FIND ALL REFS*/[|Foo|]} */ -// [|Foo|] -// } -// interface Foo { -// foo: E.[|Foo|]; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference3.baseline.jsonc deleted file mode 100644 index 6a32db2c98..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference3.baseline.jsonc +++ /dev/null @@ -1,14 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// interface Foo { -// foo: E.[|Foo|]; -// } - - -// === /b.ts === - -// enum E { -// /** {@link /*FIND ALL REFS*/[|Foo|]} */ -// [|Foo|] -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference4.baseline.jsonc deleted file mode 100644 index d23437b30e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference4.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === findAllReferences === -// === /findAllReferencesFromLinkTagReference4.ts === - -// enum E { -// /** {@link /*FIND ALL REFS*/[|B|]} */ -// A, -// [|B|] -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference5.baseline.jsonc deleted file mode 100644 index d403a9f723..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesFromLinkTagReference5.baseline.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -// === findAllReferences === -// === /findAllReferencesFromLinkTagReference5.ts === - -// enum E { -// /** {@link E./*FIND ALL REFS*/[|A|]} */ -// [|A|] -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesImportMeta.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesImportMeta.baseline.jsonc deleted file mode 100644 index a79adfcfcc..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesImportMeta.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === findAllReferences === -// === /findAllReferencesImportMeta.ts === - -// // Haha that's so meta! -// -// let x = import.[|meta|]/*FIND ALL REFS*/; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJSDocFunctionNew.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJSDocFunctionNew.baseline.jsonc deleted file mode 100644 index 5db175d76c..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJSDocFunctionNew.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === findAllReferences === -// === /Foo.js === - -// /** @type {function (/*FIND ALL REFS*/new: string, string): string} */ -// var f; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJSDocFunctionThis.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJSDocFunctionThis.baseline.jsonc deleted file mode 100644 index fea3b8ffff..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJSDocFunctionThis.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === findAllReferences === -// === /Foo.js === - -// /** @type {function (this: string, string): string} */ -// var f = function (s) { return /*FIND ALL REFS*/[|this|] + s; } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsDocTypeLiteral.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsDocTypeLiteral.baseline.jsonc deleted file mode 100644 index 17b53da550..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsDocTypeLiteral.baseline.jsonc +++ /dev/null @@ -1,24 +0,0 @@ -// === findAllReferences === -// === /foo.js === - -// /** -// * @param {object} o - very important! -// * @param {string} o.x - a thing, its ok -// * @param {number} o.y - another thing -// * @param {Object} o.nested - very nested -// * @param {boolean} o.nested./*FIND ALL REFS*/great - much greatness -// * @param {number} o.nested.times - twice? probably!?? -// */ -// function f(o) { return o.nested.great; } - - - - -// === findAllReferences === -// === /foo.js === - -// --- (line: 5) skipped --- -// * @param {boolean} o.nested.great - much greatness -// * @param {number} o.nested.times - twice? probably!?? -// */ -// function f(o) { return o.nested./*FIND ALL REFS*/[|great|]; } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsOverloadedFunctionParameter.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsOverloadedFunctionParameter.baseline.jsonc deleted file mode 100644 index bbebef7b04..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsOverloadedFunctionParameter.baseline.jsonc +++ /dev/null @@ -1,18 +0,0 @@ -// === findAllReferences === -// === /foo.js === - -// /** -// * @overload -// * @param {number} [|x|] -// * @returns {number} -// * -// * @overload -// * @param {string} [|x|] -// * @returns {string} -// * -// * @param {unknown} [|x|] -// * @returns {unknown} -// */ -// function foo([|x|]/*FIND ALL REFS*/) { -// return [|x|]; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsRequireDestructuring.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsRequireDestructuring.baseline.jsonc deleted file mode 100644 index da9b88ff2a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsRequireDestructuring.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === findAllReferences === -// === /bar.js === - -// const { /*FIND ALL REFS*/[|foo|]: bar } = require('./foo'); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsRequireDestructuring1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsRequireDestructuring1.baseline.jsonc deleted file mode 100644 index d2354a097c..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesJsRequireDestructuring1.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === findAllReferences === -// === /Y.js === - -// const { /*FIND ALL REFS*/[|x|]: { y } } = require("./X"); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesLinkTag1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesLinkTag1.baseline.jsonc deleted file mode 100644 index 3af0640c35..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesLinkTag1.baseline.jsonc +++ /dev/null @@ -1,226 +0,0 @@ -// === findAllReferences === -// === /findAllReferencesLinkTag1.ts === - -// class C { -// [|m|]/*FIND ALL REFS*/() { } -// n = 1 -// static s() { } -// /** -// * {@link [|m|]} -// * @see {[|m|]} -// * {@link C.[|m|]} -// * @see {C.[|m|]} -// * {@link C#[|m|]} -// * @see {C#[|m|]} -// * {@link C.prototype.[|m|]} -// * @see {C.prototype.[|m|]} -// */ -// p() { } -// /** -// // --- (line: 17) skipped --- - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag1.ts === - -// class C { -// m() { } -// [|n|]/*FIND ALL REFS*/ = 1 -// static s() { } -// /** -// * {@link m} -// // --- (line: 7) skipped --- - - -// --- (line: 13) skipped --- -// */ -// p() { } -// /** -// * {@link [|n|]} -// * @see {[|n|]} -// * {@link C.[|n|]} -// * @see {C.[|n|]} -// * {@link C#[|n|]} -// * @see {C#[|n|]} -// * {@link C.prototype.[|n|]} -// * @see {C.prototype.[|n|]} -// */ -// q() { } -// /** -// // --- (line: 28) skipped --- - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag1.ts === - -// class C { -// m() { } -// n = 1 -// static [|s|]/*FIND ALL REFS*/() { } -// /** -// * {@link m} -// * @see {m} -// // --- (line: 8) skipped --- - - -// --- (line: 24) skipped --- -// */ -// q() { } -// /** -// * {@link [|s|]} -// * @see {[|s|]} -// * {@link C.[|s|]} -// * @see {C.[|s|]} -// */ -// r() { } -// } -// // --- (line: 35) skipped --- - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag1.ts === - -// --- (line: 33) skipped --- -// } -// -// interface I { -// [|a|]/*FIND ALL REFS*/() -// b: 1 -// /** -// * {@link [|a|]} -// * @see {[|a|]} -// * {@link I.[|a|]} -// * @see {I.[|a|]} -// * {@link I#[|a|]} -// * @see {I#[|a|]} -// */ -// c() -// /** -// // --- (line: 49) skipped --- - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag1.ts === - -// --- (line: 34) skipped --- -// -// interface I { -// a() -// [|b|]/*FIND ALL REFS*/: 1 -// /** -// * {@link a} -// * @see {a} -// // --- (line: 42) skipped --- - - -// --- (line: 45) skipped --- -// */ -// c() -// /** -// * {@link [|b|]} -// * @see {[|b|]} -// * {@link I.[|b|]} -// * @see {I.[|b|]} -// */ -// d() -// } -// // --- (line: 56) skipped --- - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag1.ts === - -// --- (line: 54) skipped --- -// } -// -// function nestor() { -// /** {@link [|r2|]} */ -// function ref() { } -// /** @see {[|r2|]} */ -// function d3() { } -// function [|r2|]/*FIND ALL REFS*/() { } -// } - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag1.ts === - -// class [|C|]/*FIND ALL REFS*/ { -// m() { } -// n = 1 -// static s() { } -// /** -// * {@link m} -// * @see {m} -// * {@link [|C|].m} -// * @see {[|C|].m} -// * {@link [|C|]#m} -// * @see {[|C|]#m} -// * {@link [|C|].prototype.m} -// * @see {[|C|].prototype.m} -// */ -// p() { } -// /** -// * {@link n} -// * @see {n} -// * {@link [|C|].n} -// * @see {[|C|].n} -// * {@link [|C|]#n} -// * @see {[|C|]#n} -// * {@link [|C|].prototype.n} -// * @see {[|C|].prototype.n} -// */ -// q() { } -// /** -// * {@link s} -// * @see {s} -// * {@link [|C|].s} -// * @see {[|C|].s} -// */ -// r() { } -// } -// // --- (line: 35) skipped --- - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag1.ts === - -// --- (line: 32) skipped --- -// r() { } -// } -// -// interface [|I|]/*FIND ALL REFS*/ { -// a() -// b: 1 -// /** -// * {@link a} -// * @see {a} -// * {@link [|I|].a} -// * @see {[|I|].a} -// * {@link [|I|]#a} -// * @see {[|I|]#a} -// */ -// c() -// /** -// * {@link b} -// * @see {b} -// * {@link [|I|].b} -// * @see {[|I|].b} -// */ -// d() -// } -// // --- (line: 56) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesLinkTag2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesLinkTag2.baseline.jsonc deleted file mode 100644 index 8a9a99f944..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesLinkTag2.baseline.jsonc +++ /dev/null @@ -1,148 +0,0 @@ -// === findAllReferences === -// === /findAllReferencesLinkTag2.ts === - -// namespace NPR { -// export class Consider { -// This = class { -// show() { } -// } -// [|m|]/*FIND ALL REFS*/() { } -// } -// /** -// * @see {Consider.prototype.[|m|]} -// * {@link Consider#[|m|]} -// * @see {Consider#This#show} -// * {@link Consider.This.show} -// * @see {NPR.Consider#This#show} -// // --- (line: 14) skipped --- - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag2.ts === - -// namespace NPR { -// export class Consider { -// This = class { -// [|show|]/*FIND ALL REFS*/() { } -// } -// m() { } -// } -// /** -// * @see {Consider.prototype.m} -// * {@link Consider#m} -// * @see {Consider#This#[|show|]} -// * {@link Consider.This.[|show|]} -// * @see {NPR.Consider#This#[|show|]} -// * {@link NPR.Consider.This#[|show|]} -// * @see {NPR.Consider#This.show} # doesn't parse trailing . -// * @see {NPR.Consider.This.[|show|]} -// */ -// export function ref() { } -// } -// /** -// * {@link NPR.Consider#This#[|show|] hello hello} -// * {@link NPR.Consider.This#[|show|]} -// * @see {NPR.Consider#This.show} # doesn't parse trailing . -// * @see {NPR.Consider.This.[|show|]} -// */ -// export function outerref() { } - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag2.ts === - -// namespace NPR { -// export class Consider { -// [|This|]/*FIND ALL REFS*/ = class { -// show() { } -// } -// m() { } -// } -// /** -// * @see {Consider.prototype.m} -// * {@link Consider#m} -// * @see {Consider#[|This|]#show} -// * {@link Consider.[|This|].show} -// * @see {NPR.Consider#[|This|]#show} -// * {@link NPR.Consider.[|This|]#show} -// * @see {NPR.Consider#[|This|].show} # doesn't parse trailing . -// * @see {NPR.Consider.[|This|].show} -// */ -// export function ref() { } -// } -// /** -// * {@link NPR.Consider#[|This|]#show hello hello} -// * {@link NPR.Consider.[|This|]#show} -// * @see {NPR.Consider#[|This|].show} # doesn't parse trailing . -// * @see {NPR.Consider.[|This|].show} -// */ -// export function outerref() { } - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag2.ts === - -// namespace NPR { -// export class [|Consider|]/*FIND ALL REFS*/ { -// This = class { -// show() { } -// } -// m() { } -// } -// /** -// * @see {[|Consider|].prototype.m} -// * {@link [|Consider|]#m} -// * @see {[|Consider|]#This#show} -// * {@link [|Consider|].This.show} -// * @see {NPR.[|Consider|]#This#show} -// * {@link NPR.[|Consider|].This#show} -// * @see {NPR.[|Consider|]#This.show} # doesn't parse trailing . -// * @see {NPR.[|Consider|].This.show} -// */ -// export function ref() { } -// } -// /** -// * {@link NPR.[|Consider|]#This#show hello hello} -// * {@link NPR.[|Consider|].This#show} -// * @see {NPR.[|Consider|]#This.show} # doesn't parse trailing . -// * @see {NPR.[|Consider|].This.show} -// */ -// export function outerref() { } - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag2.ts === - -// namespace [|NPR|]/*FIND ALL REFS*/ { -// export class Consider { -// This = class { -// show() { } -// // --- (line: 5) skipped --- - - -// --- (line: 9) skipped --- -// * {@link Consider#m} -// * @see {Consider#This#show} -// * {@link Consider.This.show} -// * @see {[|NPR|].Consider#This#show} -// * {@link [|NPR|].Consider.This#show} -// * @see {[|NPR|].Consider#This.show} # doesn't parse trailing . -// * @see {[|NPR|].Consider.This.show} -// */ -// export function ref() { } -// } -// /** -// * {@link [|NPR|].Consider#This#show hello hello} -// * {@link [|NPR|].Consider.This#show} -// * @see {[|NPR|].Consider#This.show} # doesn't parse trailing . -// * @see {[|NPR|].Consider.This.show} -// */ -// export function outerref() { } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesLinkTag3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesLinkTag3.baseline.jsonc deleted file mode 100644 index 5778aa942f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesLinkTag3.baseline.jsonc +++ /dev/null @@ -1,148 +0,0 @@ -// === findAllReferences === -// === /findAllReferencesLinkTag3.ts === - -// namespace NPR { -// export class Consider { -// This = class { -// show() { } -// } -// [|m|]/*FIND ALL REFS*/() { } -// } -// /** -// * {@linkcode Consider.prototype.[|m|]} -// * {@linkplain Consider#[|m|]} -// * {@linkcode Consider#This#show} -// * {@linkplain Consider.This.show} -// * {@linkcode NPR.Consider#This#show} -// // --- (line: 14) skipped --- - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag3.ts === - -// namespace NPR { -// export class Consider { -// This = class { -// [|show|]/*FIND ALL REFS*/() { } -// } -// m() { } -// } -// /** -// * {@linkcode Consider.prototype.m} -// * {@linkplain Consider#m} -// * {@linkcode Consider#This#[|show|]} -// * {@linkplain Consider.This.[|show|]} -// * {@linkcode NPR.Consider#This#[|show|]} -// * {@linkplain NPR.Consider.This#[|show|]} -// * {@linkcode NPR.Consider#This.show} # doesn't parse trailing . -// * {@linkcode NPR.Consider.This.[|show|]} -// */ -// export function ref() { } -// } -// /** -// * {@linkplain NPR.Consider#This#[|show|] hello hello} -// * {@linkplain NPR.Consider.This#[|show|]} -// * {@linkcode NPR.Consider#This.show} # doesn't parse trailing . -// * {@linkcode NPR.Consider.This.[|show|]} -// */ -// export function outerref() { } - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag3.ts === - -// namespace NPR { -// export class Consider { -// [|This|]/*FIND ALL REFS*/ = class { -// show() { } -// } -// m() { } -// } -// /** -// * {@linkcode Consider.prototype.m} -// * {@linkplain Consider#m} -// * {@linkcode Consider#[|This|]#show} -// * {@linkplain Consider.[|This|].show} -// * {@linkcode NPR.Consider#[|This|]#show} -// * {@linkplain NPR.Consider.[|This|]#show} -// * {@linkcode NPR.Consider#[|This|].show} # doesn't parse trailing . -// * {@linkcode NPR.Consider.[|This|].show} -// */ -// export function ref() { } -// } -// /** -// * {@linkplain NPR.Consider#[|This|]#show hello hello} -// * {@linkplain NPR.Consider.[|This|]#show} -// * {@linkcode NPR.Consider#[|This|].show} # doesn't parse trailing . -// * {@linkcode NPR.Consider.[|This|].show} -// */ -// export function outerref() { } - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag3.ts === - -// namespace NPR { -// export class [|Consider|]/*FIND ALL REFS*/ { -// This = class { -// show() { } -// } -// m() { } -// } -// /** -// * {@linkcode [|Consider|].prototype.m} -// * {@linkplain [|Consider|]#m} -// * {@linkcode [|Consider|]#This#show} -// * {@linkplain [|Consider|].This.show} -// * {@linkcode NPR.[|Consider|]#This#show} -// * {@linkplain NPR.[|Consider|].This#show} -// * {@linkcode NPR.[|Consider|]#This.show} # doesn't parse trailing . -// * {@linkcode NPR.[|Consider|].This.show} -// */ -// export function ref() { } -// } -// /** -// * {@linkplain NPR.[|Consider|]#This#show hello hello} -// * {@linkplain NPR.[|Consider|].This#show} -// * {@linkcode NPR.[|Consider|]#This.show} # doesn't parse trailing . -// * {@linkcode NPR.[|Consider|].This.show} -// */ -// export function outerref() { } - - - - -// === findAllReferences === -// === /findAllReferencesLinkTag3.ts === - -// namespace [|NPR|]/*FIND ALL REFS*/ { -// export class Consider { -// This = class { -// show() { } -// // --- (line: 5) skipped --- - - -// --- (line: 9) skipped --- -// * {@linkplain Consider#m} -// * {@linkcode Consider#This#show} -// * {@linkplain Consider.This.show} -// * {@linkcode [|NPR|].Consider#This#show} -// * {@linkplain [|NPR|].Consider.This#show} -// * {@linkcode [|NPR|].Consider#This.show} # doesn't parse trailing . -// * {@linkcode [|NPR|].Consider.This.show} -// */ -// export function ref() { } -// } -// /** -// * {@linkplain [|NPR|].Consider#This#show hello hello} -// * {@linkplain [|NPR|].Consider.This#show} -// * {@linkcode [|NPR|].Consider#This.show} # doesn't parse trailing . -// * {@linkcode [|NPR|].Consider.This.show} -// */ -// export function outerref() { } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesOfConstructor.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesOfConstructor.baseline.jsonc deleted file mode 100644 index 8884a4f22f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesOfConstructor.baseline.jsonc +++ /dev/null @@ -1,137 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// export class [|C|] { -// /*FIND ALL REFS*/constructor(n: number); -// constructor(); -// constructor(n?: number){} -// static f() { -// this.f(); -// new this(); -// } -// } -// new [|C|](); -// const D = [|C|]; -// new D(); - - -// === /b.ts === - -// import { [|C|] } from "./a"; -// new [|C|](); - - -// === /c.ts === - -// import { [|C|] } from "./a"; -// class D extends [|C|] { -// constructor() { -// super(); -// super.method(); -// } -// method() { super(); } -// } -// class E implements [|C|] { -// constructor() { super(); } -// } - - -// === /d.ts === - -// import * as a from "./a"; -// new a.[|C|](); -// class d extends a.[|C|] { constructor() { super(); } - - - - -// === findAllReferences === -// === /a.ts === - -// export class [|C|] { -// constructor(n: number); -// /*FIND ALL REFS*/constructor(); -// constructor(n?: number){} -// static f() { -// this.f(); -// new this(); -// } -// } -// new [|C|](); -// const D = [|C|]; -// new D(); - - -// === /b.ts === - -// import { [|C|] } from "./a"; -// new [|C|](); - - -// === /c.ts === - -// import { [|C|] } from "./a"; -// class D extends [|C|] { -// constructor() { -// super(); -// super.method(); -// } -// method() { super(); } -// } -// class E implements [|C|] { -// constructor() { super(); } -// } - - -// === /d.ts === - -// import * as a from "./a"; -// new a.[|C|](); -// class d extends a.[|C|] { constructor() { super(); } - - - - -// === findAllReferences === -// === /a.ts === - -// export class [|C|] { -// constructor(n: number); -// constructor(); -// /*FIND ALL REFS*/constructor(n?: number){} -// static f() { -// this.f(); -// new this(); -// } -// } -// new [|C|](); -// const D = [|C|]; -// new D(); - - -// === /b.ts === - -// import { [|C|] } from "./a"; -// new [|C|](); - - -// === /c.ts === - -// import { [|C|] } from "./a"; -// class D extends [|C|] { -// constructor() { -// super(); -// super.method(); -// } -// method() { super(); } -// } -// class E implements [|C|] { -// constructor() { super(); } -// } - - -// === /d.ts === - -// import * as a from "./a"; -// new a.[|C|](); -// class d extends a.[|C|] { constructor() { super(); } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesOfConstructor_badOverload.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesOfConstructor_badOverload.baseline.jsonc deleted file mode 100644 index 8e7048cb20..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesOfConstructor_badOverload.baseline.jsonc +++ /dev/null @@ -1,18 +0,0 @@ -// === findAllReferences === -// === /findAllReferencesOfConstructor_badOverload.ts === - -// class [|C|] { -// /*FIND ALL REFS*/constructor(n: number); -// constructor(){} -// } - - - - -// === findAllReferences === -// === /findAllReferencesOfConstructor_badOverload.ts === - -// class [|C|] { -// constructor(n: number); -// /*FIND ALL REFS*/constructor(){} -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesOfJsonModule.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesOfJsonModule.baseline.jsonc deleted file mode 100644 index c9a228c16f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesOfJsonModule.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === findAllReferences === -// === /foo.ts === - -// /*FIND ALL REFS*/import settings from "./settings.json"; -// settings; - - - - -// === findAllReferences === -// === /foo.ts === - -// import /*FIND ALL REFS*/[|settings|] from "./settings.json"; -// [|settings|]; - - - - -// === findAllReferences === -// === /foo.ts === - -// import [|settings|] from "./settings.json"; -// /*FIND ALL REFS*/[|settings|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesUndefined.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesUndefined.baseline.jsonc deleted file mode 100644 index 741083d716..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesUndefined.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// /*FIND ALL REFS*/[|undefined|]; -// -// void [|undefined|]; - - -// === /b.ts === - -// [|undefined|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsBadImport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsBadImport.baseline.jsonc deleted file mode 100644 index 8080894d68..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsBadImport.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /findAllRefsBadImport.ts === - -// import { /*FIND ALL REFS*/ab as cd } from "doesNotExist"; - - - - -// === findAllReferences === -// === /findAllRefsBadImport.ts === - -// import { ab as /*FIND ALL REFS*/[|cd|] } from "doesNotExist"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsCatchClause.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsCatchClause.baseline.jsonc deleted file mode 100644 index 3be0bbd0d6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsCatchClause.baseline.jsonc +++ /dev/null @@ -1,18 +0,0 @@ -// === findAllReferences === -// === /findAllRefsCatchClause.ts === - -// try { } -// catch (/*FIND ALL REFS*/[|err|]) { -// [|err|]; -// } - - - - -// === findAllReferences === -// === /findAllRefsCatchClause.ts === - -// try { } -// catch ([|err|]) { -// /*FIND ALL REFS*/[|err|]; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassExpression0.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassExpression0.baseline.jsonc deleted file mode 100644 index 2d6a77088a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassExpression0.baseline.jsonc +++ /dev/null @@ -1,60 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// export = class /*FIND ALL REFS*/[|A|] { -// m() { [|A|]; } -// }; - - -// === /b.ts === - -// import [|A|] = require("./a"); -// [|A|]; - - - - -// === findAllReferences === -// === /a.ts === - -// export = class [|A|] { -// m() { /*FIND ALL REFS*/[|A|]; } -// }; - - -// === /b.ts === - -// import [|A|] = require("./a"); -// [|A|]; - - - - -// === findAllReferences === -// === /a.ts === - -// export = class [|A|] { -// m() { [|A|]; } -// }; - - -// === /b.ts === - -// import /*FIND ALL REFS*/[|A|] = require("./a"); -// [|A|]; - - - - -// === findAllReferences === -// === /a.ts === - -// export = class [|A|] { -// m() { [|A|]; } -// }; - - -// === /b.ts === - -// import [|A|] = require("./a"); -// /*FIND ALL REFS*/[|A|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassExpression1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassExpression1.baseline.jsonc deleted file mode 100644 index 6ce52f582b..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassExpression1.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// module.exports = class /*FIND ALL REFS*/[|A|] {}; - - - - -// === findAllReferences === -// === /b.js === - -// import /*FIND ALL REFS*/[|A|] = require("./a"); -// [|A|]; - - - - -// === findAllReferences === -// === /b.js === - -// import [|A|] = require("./a"); -// /*FIND ALL REFS*/[|A|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassExpression2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassExpression2.baseline.jsonc deleted file mode 100644 index f96e62e6e4..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassExpression2.baseline.jsonc +++ /dev/null @@ -1,38 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// exports./*FIND ALL REFS*/[|A|] = class {}; - - -// === /b.js === - -// import { [|A|] } from "./a"; -// [|A|]; - - - - -// === findAllReferences === -// === /a.js === - -// exports.[|A|] = class {}; - - -// === /b.js === - -// import { /*FIND ALL REFS*/[|A|] } from "./a"; -// [|A|]; - - - - -// === findAllReferences === -// === /a.js === - -// exports.[|A|] = class {}; - - -// === /b.js === - -// import { [|A|] } from "./a"; -// /*FIND ALL REFS*/[|A|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassStaticBlocks.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassStaticBlocks.baseline.jsonc deleted file mode 100644 index 2c3929d9fd..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsClassStaticBlocks.baseline.jsonc +++ /dev/null @@ -1,39 +0,0 @@ -// === findAllReferences === -// === /findAllRefsClassStaticBlocks.ts === - -// class ClassStaticBocks { -// static x; -// /*FIND ALL REFS*/[|static|] {} -// static y; -// static {} -// static y; -// static {} -// } - - - - -// === findAllReferences === -// === /findAllRefsClassStaticBlocks.ts === - -// class ClassStaticBocks { -// static x; -// static {} -// static y; -// /*FIND ALL REFS*/[|static|] {} -// static y; -// static {} -// } - - - - -// === findAllReferences === -// === /findAllRefsClassStaticBlocks.ts === - -// --- (line: 3) skipped --- -// static y; -// static {} -// static y; -// /*FIND ALL REFS*/[|static|] {} -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsConstructorFunctions.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsConstructorFunctions.baseline.jsonc deleted file mode 100644 index 92b3f1ad6d..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsConstructorFunctions.baseline.jsonc +++ /dev/null @@ -1,64 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// function f() { -// /*FIND ALL REFS*/[|this|].x = 0; -// } -// f.prototype.setX = function() { -// this.x = 1; -// } -// f.prototype.useX = function() { this.x; } - - - - -// === findAllReferences === -// === /a.js === - -// function f() { -// this./*FIND ALL REFS*/x = 0; -// } -// f.prototype.setX = function() { -// this.x = 1; -// } -// f.prototype.useX = function() { this.x; } - - - - -// === findAllReferences === -// === /a.js === - -// function f() { -// this.x = 0; -// } -// f.prototype.setX = function() { -// /*FIND ALL REFS*/[|this|].x = 1; -// } -// f.prototype.useX = function() { this.x; } - - - - -// === findAllReferences === -// === /a.js === - -// function f() { -// this.x = 0; -// } -// f.prototype.setX = function() { -// this./*FIND ALL REFS*/x = 1; -// } -// f.prototype.useX = function() { this.x; } - - - - -// === findAllReferences === -// === /a.js === - -// --- (line: 3) skipped --- -// f.prototype.setX = function() { -// this.x = 1; -// } -// f.prototype.useX = function() { this./*FIND ALL REFS*/x; } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDeclareClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDeclareClass.baseline.jsonc deleted file mode 100644 index e2e8f2d550..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDeclareClass.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === findAllReferences === -// === /findAllRefsDeclareClass.ts === - -// /*FIND ALL REFS*/declare class C { -// static m(): void; -// } - - - - -// === findAllReferences === -// === /findAllRefsDeclareClass.ts === - -// declare class /*FIND ALL REFS*/[|C|] { -// static m(): void; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDefaultImport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDefaultImport.baseline.jsonc deleted file mode 100644 index bb5c61b725..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDefaultImport.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// export default function /*FIND ALL REFS*/[|a|]() {} - - -// === /b.ts === - -// import [|a|], * as ns from "./a"; - - - - -// === findAllReferences === -// === /a.ts === - -// export default function [|a|]() {} - - -// === /b.ts === - -// import /*FIND ALL REFS*/[|a|], * as ns from "./a"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDefinition.baseline.jsonc deleted file mode 100644 index 59afb275df..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDefinition.baseline.jsonc +++ /dev/null @@ -1,14 +0,0 @@ -// === findAllReferences === -// === /findAllRefsDefinition.ts === - -// const /*FIND ALL REFS*/[|x|] = 0; -// [|x|]; - - - - -// === findAllReferences === -// === /findAllRefsDefinition.ts === - -// const [|x|] = 0; -// /*FIND ALL REFS*/[|x|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDestructureGeneric.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDestructureGeneric.baseline.jsonc deleted file mode 100644 index bc2d160244..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDestructureGeneric.baseline.jsonc +++ /dev/null @@ -1,20 +0,0 @@ -// === findAllReferences === -// === /findAllRefsDestructureGeneric.ts === - -// interface I { -// /*FIND ALL REFS*/[|x|]: boolean; -// } -// declare const i: I; -// const { [|x|] } = i; - - - - -// === findAllReferences === -// === /findAllRefsDestructureGeneric.ts === - -// interface I { -// [|x|]: boolean; -// } -// declare const i: I; -// const { /*FIND ALL REFS*/[|x|] } = i; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDestructureGetter.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDestructureGetter.baseline.jsonc deleted file mode 100644 index 17fdbff3f0..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsDestructureGetter.baseline.jsonc +++ /dev/null @@ -1,80 +0,0 @@ -// === findAllReferences === -// === /findAllRefsDestructureGetter.ts === - -// class Test { -// get /*FIND ALL REFS*/[|x|]() { return 0; } -// -// set y(a: number) {} -// } -// const { [|x|], y } = new Test(); -// x; y; - - - - -// === findAllReferences === -// === /findAllRefsDestructureGetter.ts === - -// class Test { -// get [|x|]() { return 0; } -// -// set y(a: number) {} -// } -// const { /*FIND ALL REFS*/[|x|], y } = new Test(); -// [|x|]; y; - - - - -// === findAllReferences === -// === /findAllRefsDestructureGetter.ts === - -// class Test { -// get x() { return 0; } -// -// set y(a: number) {} -// } -// const { [|x|], y } = new Test(); -// /*FIND ALL REFS*/[|x|]; y; - - - - -// === findAllReferences === -// === /findAllRefsDestructureGetter.ts === - -// class Test { -// get x() { return 0; } -// -// set /*FIND ALL REFS*/[|y|](a: number) {} -// } -// const { x, [|y|] } = new Test(); -// x; y; - - - - -// === findAllReferences === -// === /findAllRefsDestructureGetter.ts === - -// class Test { -// get x() { return 0; } -// -// set [|y|](a: number) {} -// } -// const { x, /*FIND ALL REFS*/[|y|] } = new Test(); -// x; [|y|]; - - - - -// === findAllReferences === -// === /findAllRefsDestructureGetter.ts === - -// class Test { -// get x() { return 0; } -// -// set y(a: number) {} -// } -// const { x, [|y|] } = new Test(); -// x; /*FIND ALL REFS*/[|y|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsEnumAsNamespace.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsEnumAsNamespace.baseline.jsonc deleted file mode 100644 index 739032e8f8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsEnumAsNamespace.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === findAllReferences === -// === /findAllRefsEnumAsNamespace.ts === - -// /*FIND ALL REFS*/enum E { A } -// let e: E.A; - - - - -// === findAllReferences === -// === /findAllRefsEnumAsNamespace.ts === - -// enum /*FIND ALL REFS*/[|E|] { A } -// let e: [|E|].A; - - - - -// === findAllReferences === -// === /findAllRefsEnumAsNamespace.ts === - -// enum [|E|] { A } -// let e: /*FIND ALL REFS*/[|E|].A; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsEnumMember.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsEnumMember.baseline.jsonc deleted file mode 100644 index 37857947e8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsEnumMember.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === findAllReferences === -// === /findAllRefsEnumMember.ts === - -// enum E { /*FIND ALL REFS*/[|A|], B } -// const e: E.[|A|] = E.[|A|]; - - - - -// === findAllReferences === -// === /findAllRefsEnumMember.ts === - -// enum E { [|A|], B } -// const e: E./*FIND ALL REFS*/[|A|] = E.[|A|]; - - - - -// === findAllReferences === -// === /findAllRefsEnumMember.ts === - -// enum E { [|A|], B } -// const e: E.[|A|] = E./*FIND ALL REFS*/[|A|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsExportConstEqualToClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsExportConstEqualToClass.baseline.jsonc deleted file mode 100644 index 1906e220e3..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsExportConstEqualToClass.baseline.jsonc +++ /dev/null @@ -1,24 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// class C {} -// export const /*FIND ALL REFS*/[|D|] = C; - - -// === /b.ts === - -// import { [|D|] } from "./a"; - - - - -// === findAllReferences === -// === /a.ts === - -// class C {} -// export const [|D|] = C; - - -// === /b.ts === - -// import { /*FIND ALL REFS*/[|D|] } from "./a"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsExportDefaultClassConstructor.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsExportDefaultClassConstructor.baseline.jsonc deleted file mode 100644 index 1224d18ddc..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsExportDefaultClassConstructor.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === findAllReferences === -// === /findAllRefsExportDefaultClassConstructor.ts === - -// export default class { -// /*FIND ALL REFS*/constructor() {} -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsExportNotAtTopLevel.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsExportNotAtTopLevel.baseline.jsonc deleted file mode 100644 index 07693d564c..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsExportNotAtTopLevel.baseline.jsonc +++ /dev/null @@ -1,29 +0,0 @@ -// === findAllReferences === -// === /findAllRefsExportNotAtTopLevel.ts === - -// { -// /*FIND ALL REFS*/export const x = 0; -// x; -// } - - - - -// === findAllReferences === -// === /findAllRefsExportNotAtTopLevel.ts === - -// { -// export const /*FIND ALL REFS*/[|x|] = 0; -// [|x|]; -// } - - - - -// === findAllReferences === -// === /findAllRefsExportNotAtTopLevel.ts === - -// { -// export const [|x|] = 0; -// /*FIND ALL REFS*/[|x|]; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForComputedProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForComputedProperties.baseline.jsonc deleted file mode 100644 index 8781689e20..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForComputedProperties.baseline.jsonc +++ /dev/null @@ -1,50 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForComputedProperties.ts === - -// interface I { -// ["/*FIND ALL REFS*/[|prop1|]"]: () => void; -// } -// -// class C implements I { -// ["[|prop1|]"]: any; -// } -// -// var x: I = { -// ["[|prop1|]"]: function () { }, -// } - - - - -// === findAllReferences === -// === /findAllRefsForComputedProperties.ts === - -// interface I { -// ["[|prop1|]"]: () => void; -// } -// -// class C implements I { -// ["/*FIND ALL REFS*/[|prop1|]"]: any; -// } -// -// var x: I = { -// ["[|prop1|]"]: function () { }, -// } - - - - -// === findAllReferences === -// === /findAllRefsForComputedProperties.ts === - -// interface I { -// ["[|prop1|]"]: () => void; -// } -// -// class C implements I { -// ["[|prop1|]"]: any; -// } -// -// var x: I = { -// ["/*FIND ALL REFS*/[|prop1|]"]: function () { }, -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForComputedProperties2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForComputedProperties2.baseline.jsonc deleted file mode 100644 index fb96b320e0..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForComputedProperties2.baseline.jsonc +++ /dev/null @@ -1,50 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForComputedProperties2.ts === - -// interface I { -// [/*FIND ALL REFS*/[|42|]](): void; -// } -// -// class C implements I { -// [[|42|]]: any; -// } -// -// var x: I = { -// ["[|42|]"]: function () { } -// } - - - - -// === findAllReferences === -// === /findAllRefsForComputedProperties2.ts === - -// interface I { -// [[|42|]](): void; -// } -// -// class C implements I { -// [/*FIND ALL REFS*/[|42|]]: any; -// } -// -// var x: I = { -// ["[|42|]"]: function () { } -// } - - - - -// === findAllReferences === -// === /findAllRefsForComputedProperties2.ts === - -// interface I { -// [[|42|]](): void; -// } -// -// class C implements I { -// [[|42|]]: any; -// } -// -// var x: I = { -// ["/*FIND ALL REFS*/[|42|]"]: function () { } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport.baseline.jsonc deleted file mode 100644 index ecd32ba103..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport.baseline.jsonc +++ /dev/null @@ -1,19 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// export default function /*FIND ALL REFS*/[|f|]() {} - - -// === /b.ts === - -// import [|g|] from "./a"; -// [|g|](); - - - - -// === findAllReferences === -// === /b.ts === - -// import /*FIND ALL REFS*/[|g|] from "./a"; -// [|g|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport01.baseline.jsonc deleted file mode 100644 index b274338afa..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport01.baseline.jsonc +++ /dev/null @@ -1,48 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForDefaultExport01.ts === - -// /*FIND ALL REFS*/export default class DefaultExportedClass { -// } -// -// var x: DefaultExportedClass; -// -// var y = new DefaultExportedClass; - - - - -// === findAllReferences === -// === /findAllRefsForDefaultExport01.ts === - -// export default class /*FIND ALL REFS*/[|DefaultExportedClass|] { -// } -// -// var x: [|DefaultExportedClass|]; -// -// var y = new [|DefaultExportedClass|]; - - - - -// === findAllReferences === -// === /findAllRefsForDefaultExport01.ts === - -// export default class [|DefaultExportedClass|] { -// } -// -// var x: /*FIND ALL REFS*/[|DefaultExportedClass|]; -// -// var y = new [|DefaultExportedClass|]; - - - - -// === findAllReferences === -// === /findAllRefsForDefaultExport01.ts === - -// export default class [|DefaultExportedClass|] { -// } -// -// var x: [|DefaultExportedClass|]; -// -// var y = new /*FIND ALL REFS*/[|DefaultExportedClass|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport02.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport02.baseline.jsonc deleted file mode 100644 index ed7329e7d8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport02.baseline.jsonc +++ /dev/null @@ -1,102 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForDefaultExport02.ts === - -// /*FIND ALL REFS*/export default function DefaultExportedFunction() { -// return DefaultExportedFunction; -// } -// -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsForDefaultExport02.ts === - -// export default function /*FIND ALL REFS*/[|DefaultExportedFunction|]() { -// return [|DefaultExportedFunction|]; -// } -// -// var x: typeof [|DefaultExportedFunction|]; -// -// var y = [|DefaultExportedFunction|](); -// -// namespace DefaultExportedFunction { -// } - - - - -// === findAllReferences === -// === /findAllRefsForDefaultExport02.ts === - -// export default function [|DefaultExportedFunction|]() { -// return /*FIND ALL REFS*/[|DefaultExportedFunction|]; -// } -// -// var x: typeof [|DefaultExportedFunction|]; -// -// var y = [|DefaultExportedFunction|](); -// -// namespace DefaultExportedFunction { -// } - - - - -// === findAllReferences === -// === /findAllRefsForDefaultExport02.ts === - -// export default function [|DefaultExportedFunction|]() { -// return [|DefaultExportedFunction|]; -// } -// -// var x: typeof /*FIND ALL REFS*/[|DefaultExportedFunction|]; -// -// var y = [|DefaultExportedFunction|](); -// -// namespace DefaultExportedFunction { -// } - - - - -// === findAllReferences === -// === /findAllRefsForDefaultExport02.ts === - -// export default function [|DefaultExportedFunction|]() { -// return [|DefaultExportedFunction|]; -// } -// -// var x: typeof [|DefaultExportedFunction|]; -// -// var y = /*FIND ALL REFS*/[|DefaultExportedFunction|](); -// -// namespace DefaultExportedFunction { -// } - - - - -// === findAllReferences === -// === /findAllRefsForDefaultExport02.ts === - -// --- (line: 5) skipped --- -// -// var y = DefaultExportedFunction(); -// -// /*FIND ALL REFS*/namespace DefaultExportedFunction { -// } - - - - -// === findAllReferences === -// === /findAllRefsForDefaultExport02.ts === - -// --- (line: 5) skipped --- -// -// var y = DefaultExportedFunction(); -// -// namespace /*FIND ALL REFS*/[|DefaultExportedFunction|] { -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport04.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport04.baseline.jsonc deleted file mode 100644 index 4d11cf46ab..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport04.baseline.jsonc +++ /dev/null @@ -1,53 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// const /*FIND ALL REFS*/[|a|] = 0; -// export default [|a|]; - - -// === /b.ts === - -// import [|a|] from "./a"; -// [|a|]; - - - - -// === findAllReferences === -// === /a.ts === - -// const [|a|] = 0; -// export default /*FIND ALL REFS*/[|a|]; - - -// === /b.ts === - -// import [|a|] from "./a"; -// [|a|]; - - - - -// === findAllReferences === -// === /a.ts === - -// const a = 0; -// export /*FIND ALL REFS*/default a; - - - - -// === findAllReferences === -// === /b.ts === - -// import /*FIND ALL REFS*/[|a|] from "./a"; -// [|a|]; - - - - -// === findAllReferences === -// === /b.ts === - -// import [|a|] from "./a"; -// /*FIND ALL REFS*/[|a|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport09.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport09.baseline.jsonc deleted file mode 100644 index cf193dcabd..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport09.baseline.jsonc +++ /dev/null @@ -1,106 +0,0 @@ -// === findAllReferences === -// === /foo.ts === - -// import * as /*FIND ALL REFS*/[|a|] from "./a.js" -// import aDefault from "./a.js" -// import * as b from "./b.js" -// import bDefault from "./b.js" -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /foo.ts === - -// import * as a from "./a.js" -// import /*FIND ALL REFS*/[|aDefault|] from "./a.js" -// import * as b from "./b.js" -// import bDefault from "./b.js" -// -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /foo.ts === - -// import * as a from "./a.js" -// import aDefault from "./a.js" -// import * as /*FIND ALL REFS*/[|b|] from "./b.js" -// import bDefault from "./b.js" -// -// import * as c from "./c" -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /foo.ts === - -// import * as a from "./a.js" -// import aDefault from "./a.js" -// import * as b from "./b.js" -// import /*FIND ALL REFS*/[|bDefault|] from "./b.js" -// -// import * as c from "./c" -// import cDefault from "./c" -// import * as d from "./d" -// import dDefault from "./d" - - - - -// === findAllReferences === -// === /foo.ts === - -// import * as a from "./a.js" -// import aDefault from "./a.js" -// import * as b from "./b.js" -// import bDefault from "./b.js" -// -// import * as /*FIND ALL REFS*/[|c|] from "./c" -// import cDefault from "./c" -// import * as d from "./d" -// import dDefault from "./d" - - - - -// === findAllReferences === -// === /foo.ts === - -// --- (line: 3) skipped --- -// import bDefault from "./b.js" -// -// import * as c from "./c" -// import /*FIND ALL REFS*/[|cDefault|] from "./c" -// import * as d from "./d" -// import dDefault from "./d" - - - - -// === findAllReferences === -// === /foo.ts === - -// --- (line: 4) skipped --- -// -// import * as c from "./c" -// import cDefault from "./c" -// import * as /*FIND ALL REFS*/[|d|] from "./d" -// import dDefault from "./d" - - - - -// === findAllReferences === -// === /foo.ts === - -// --- (line: 5) skipped --- -// import * as c from "./c" -// import cDefault from "./c" -// import * as d from "./d" -// import /*FIND ALL REFS*/[|dDefault|] from "./d" diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport_anonymous.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport_anonymous.baseline.jsonc deleted file mode 100644 index fd5bfc031a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport_anonymous.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// export /*FIND ALL REFS*/default 1; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport_reExport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport_reExport.baseline.jsonc deleted file mode 100644 index 31a04e0e06..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultExport_reExport.baseline.jsonc +++ /dev/null @@ -1,30 +0,0 @@ -// === findAllReferences === -// === /export.ts === - -// const /*FIND ALL REFS*/[|foo|] = 1; -// export default [|foo|]; - - - - -// === findAllReferences === -// === /export.ts === - -// const [|foo|] = 1; -// export default /*FIND ALL REFS*/[|foo|]; - - - - -// === findAllReferences === -// === /re-export.ts === - -// export { /*FIND ALL REFS*/default } from "./export"; - - - - -// === findAllReferences === -// === /re-export-dep.ts === - -// import /*FIND ALL REFS*/[|fooDefault|] from "./re-export"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultKeyword.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultKeyword.baseline.jsonc deleted file mode 100644 index 849fd109f3..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForDefaultKeyword.baseline.jsonc +++ /dev/null @@ -1,67 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForDefaultKeyword.ts === - -// function f(value: string, /*FIND ALL REFS*/default: string) {} -// -// const default = 1; -// -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsForDefaultKeyword.ts === - -// function f(value: string, default: string) {} -// -// const /*FIND ALL REFS*/default = 1; -// -// function default() {} -// -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsForDefaultKeyword.ts === - -// function f(value: string, default: string) {} -// -// const default = 1; -// -// function /*FIND ALL REFS*/default() {} -// -// class default {} -// -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsForDefaultKeyword.ts === - -// --- (line: 3) skipped --- -// -// function default() {} -// -// class /*FIND ALL REFS*/default {} -// -// const foo = { -// default: 1 -// } - - - - -// === findAllReferences === -// === /findAllRefsForDefaultKeyword.ts === - -// --- (line: 6) skipped --- -// class default {} -// -// const foo = { -// /*FIND ALL REFS*/[|default|]: 1 -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForFunctionExpression01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForFunctionExpression01.baseline.jsonc deleted file mode 100644 index b87a54edce..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForFunctionExpression01.baseline.jsonc +++ /dev/null @@ -1,66 +0,0 @@ -// === findAllReferences === -// === /file1.ts === - -// var foo = /*FIND ALL REFS*/function foo(a = foo(), b = () => foo) { -// foo(foo, foo); -// } - - - - -// === findAllReferences === -// === /file1.ts === - -// var foo = function /*FIND ALL REFS*/[|foo|](a = [|foo|](), b = () => [|foo|]) { -// [|foo|]([|foo|], [|foo|]); -// } - - - - -// === findAllReferences === -// === /file1.ts === - -// var foo = function [|foo|](a = /*FIND ALL REFS*/[|foo|](), b = () => [|foo|]) { -// [|foo|]([|foo|], [|foo|]); -// } - - - - -// === findAllReferences === -// === /file1.ts === - -// var foo = function [|foo|](a = [|foo|](), b = () => /*FIND ALL REFS*/[|foo|]) { -// [|foo|]([|foo|], [|foo|]); -// } - - - - -// === findAllReferences === -// === /file1.ts === - -// var foo = function [|foo|](a = [|foo|](), b = () => [|foo|]) { -// /*FIND ALL REFS*/[|foo|]([|foo|], [|foo|]); -// } - - - - -// === findAllReferences === -// === /file1.ts === - -// var foo = function [|foo|](a = [|foo|](), b = () => [|foo|]) { -// [|foo|](/*FIND ALL REFS*/[|foo|], [|foo|]); -// } - - - - -// === findAllReferences === -// === /file1.ts === - -// var foo = function [|foo|](a = [|foo|](), b = () => [|foo|]) { -// [|foo|]([|foo|], /*FIND ALL REFS*/[|foo|]); -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForImportCall.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForImportCall.baseline.jsonc deleted file mode 100644 index eeaa45f0e4..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForImportCall.baseline.jsonc +++ /dev/null @@ -1,17 +0,0 @@ -// === findAllReferences === -// === /app.ts === - -// export function [|he/*FIND ALL REFS*/llo|]() {}; - - -// === /direct-use.ts === - -// async function main() { -// const mod = await import("./app") -// mod.[|hello|](); -// } - - -// === /indirect-use.ts === - -// import("./re-export").then(mod => mod.services.app.[|hello|]()); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForImportCallType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForImportCallType.baseline.jsonc deleted file mode 100644 index 3b134b8e89..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForImportCallType.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === findAllReferences === -// === /app.ts === - -// export function [|he/*FIND ALL REFS*/llo|]() {}; - - -// === /indirect-use.ts === - -// import type { app } from "./re-export"; -// declare const app: app -// app.[|hello|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForMappedType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForMappedType.baseline.jsonc deleted file mode 100644 index c4956c8440..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForMappedType.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === findAllReferences === -// === /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 } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForObjectLiteralProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForObjectLiteralProperties.baseline.jsonc deleted file mode 100644 index 19cd8bb48d..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForObjectLiteralProperties.baseline.jsonc +++ /dev/null @@ -1,50 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForObjectLiteralProperties.ts === - -// var x = { -// /*FIND ALL REFS*/[|property|]: {} -// }; -// -// x.[|property|]; -// -// let {[|property|]: pVar} = x; - - - - -// === findAllReferences === -// === /findAllRefsForObjectLiteralProperties.ts === - -// var x = { -// [|property|]: {} -// }; -// -// x./*FIND ALL REFS*/[|property|]; -// -// let {[|property|]: pVar} = x; - - - - -// === findAllReferences === -// === /findAllRefsForObjectLiteralProperties.ts === - -// --- (line: 3) skipped --- -// -// x.property; -// -// /*FIND ALL REFS*/let {property: pVar} = x; - - - - -// === findAllReferences === -// === /findAllRefsForObjectLiteralProperties.ts === - -// var x = { -// [|property|]: {} -// }; -// -// x.[|property|]; -// -// let {/*FIND ALL REFS*/[|property|]: pVar} = x; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForObjectSpread.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForObjectSpread.baseline.jsonc deleted file mode 100644 index 7ed09580c9..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForObjectSpread.baseline.jsonc +++ /dev/null @@ -1,52 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForObjectSpread.ts === - -// interface A1 { readonly /*FIND ALL REFS*/[|a|]: string }; -// interface A2 { a?: number }; -// let a1: A1; -// let a2: A2; -// let a12 = { ...a1, ...a2 }; -// a12.[|a|]; -// a1.[|a|]; - - - - -// === findAllReferences === -// === /findAllRefsForObjectSpread.ts === - -// interface A1 { readonly a: string }; -// interface A2 { /*FIND ALL REFS*/[|a|]?: number }; -// let a1: A1; -// let a2: A2; -// let a12 = { ...a1, ...a2 }; -// a12.[|a|]; -// a1.a; - - - - -// === findAllReferences === -// === /findAllRefsForObjectSpread.ts === - -// interface A1 { readonly [|a|]: string }; -// interface A2 { [|a|]?: number }; -// let a1: A1; -// let a2: A2; -// let a12 = { ...a1, ...a2 }; -// a12./*FIND ALL REFS*/[|a|]; -// a1.[|a|]; - - - - -// === findAllReferences === -// === /findAllRefsForObjectSpread.ts === - -// interface A1 { readonly [|a|]: string }; -// interface A2 { a?: number }; -// let a1: A1; -// let a2: A2; -// let a12 = { ...a1, ...a2 }; -// a12.[|a|]; -// a1./*FIND ALL REFS*/[|a|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForRest.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForRest.baseline.jsonc deleted file mode 100644 index 7eaac036a6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForRest.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForRest.ts === - -// interface Gen { -// x: number -// /*FIND ALL REFS*/[|parent|]: Gen; -// millenial: string; -// } -// let t: Gen; -// var { x, ...rest } = t; -// rest.[|parent|]; - - - - -// === findAllReferences === -// === /findAllRefsForRest.ts === - -// interface Gen { -// x: number -// [|parent|]: Gen; -// millenial: string; -// } -// let t: Gen; -// var { x, ...rest } = t; -// rest./*FIND ALL REFS*/[|parent|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStaticInstanceMethodInheritance.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStaticInstanceMethodInheritance.baseline.jsonc deleted file mode 100644 index fbdf8be2bb..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStaticInstanceMethodInheritance.baseline.jsonc +++ /dev/null @@ -1,100 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForStaticInstanceMethodInheritance.ts === - -// class X{ -// /*FIND ALL REFS*/[|foo|](): void{} -// } -// -// class Y extends X{ -// static foo(): void{} -// } -// -// class Z extends Y{ -// static foo(): void{} -// [|foo|](): void{} -// } -// -// const x = new X(); -// const y = new Y(); -// const z = new Z(); -// x.[|foo|](); -// y.[|foo|](); -// z.[|foo|](); -// Y.foo(); -// Z.foo(); - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstanceMethodInheritance.ts === - -// class X{ -// foo(): void{} -// } -// -// class Y extends X{ -// static /*FIND ALL REFS*/[|foo|](): void{} -// } -// -// class Z extends Y{ -// // --- (line: 10) skipped --- - - -// --- (line: 16) skipped --- -// x.foo(); -// y.foo(); -// z.foo(); -// Y.[|foo|](); -// Z.foo(); - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstanceMethodInheritance.ts === - -// --- (line: 6) skipped --- -// } -// -// class Z extends Y{ -// static /*FIND ALL REFS*/[|foo|](): void{} -// foo(): void{} -// } -// -// // --- (line: 14) skipped --- - - -// --- (line: 17) skipped --- -// y.foo(); -// z.foo(); -// Y.foo(); -// Z.[|foo|](); - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstanceMethodInheritance.ts === - -// class X{ -// [|foo|](): void{} -// } -// -// class Y extends X{ -// static foo(): void{} -// } -// -// class Z extends Y{ -// static foo(): void{} -// /*FIND ALL REFS*/[|foo|](): void{} -// } -// -// const x = new X(); -// const y = new Y(); -// const z = new Z(); -// x.[|foo|](); -// y.[|foo|](); -// z.[|foo|](); -// Y.foo(); -// Z.foo(); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStaticInstancePropertyInheritance.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStaticInstancePropertyInheritance.baseline.jsonc deleted file mode 100644 index 765d864857..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStaticInstancePropertyInheritance.baseline.jsonc +++ /dev/null @@ -1,232 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForStaticInstancePropertyInheritance.ts === - -// class X{ -// /*FIND ALL REFS*/[|foo|]:any -// } -// -// class Y extends X{ -// static foo:any -// } -// -// class Z extends Y{ -// static foo:any -// [|foo|]:any -// } -// -// const x = new X(); -// const y = new Y(); -// const z = new Z(); -// x.[|foo|]; -// y.[|foo|]; -// z.[|foo|]; -// Y.foo; -// Z.foo; - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstancePropertyInheritance.ts === - -// class X{ -// foo:any -// } -// -// class Y extends X{ -// static /*FIND ALL REFS*/[|foo|]:any -// } -// -// class Z extends Y{ -// // --- (line: 10) skipped --- - - -// --- (line: 16) skipped --- -// x.foo; -// y.foo; -// z.foo; -// Y.[|foo|]; -// Z.foo; - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstancePropertyInheritance.ts === - -// --- (line: 6) skipped --- -// } -// -// class Z extends Y{ -// static /*FIND ALL REFS*/[|foo|]:any -// foo:any -// } -// -// // --- (line: 14) skipped --- - - -// --- (line: 17) skipped --- -// y.foo; -// z.foo; -// Y.foo; -// Z.[|foo|]; - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstancePropertyInheritance.ts === - -// class X{ -// [|foo|]:any -// } -// -// class Y extends X{ -// static foo:any -// } -// -// class Z extends Y{ -// static foo:any -// /*FIND ALL REFS*/[|foo|]:any -// } -// -// const x = new X(); -// const y = new Y(); -// const z = new Z(); -// x.[|foo|]; -// y.[|foo|]; -// z.[|foo|]; -// Y.foo; -// Z.foo; - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstancePropertyInheritance.ts === - -// class X{ -// [|foo|]:any -// } -// -// class Y extends X{ -// static foo:any -// } -// -// class Z extends Y{ -// static foo:any -// [|foo|]:any -// } -// -// const x = new X(); -// const y = new Y(); -// const z = new Z(); -// x./*FIND ALL REFS*/[|foo|]; -// y.[|foo|]; -// z.[|foo|]; -// Y.foo; -// Z.foo; - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstancePropertyInheritance.ts === - -// class X{ -// [|foo|]:any -// } -// -// class Y extends X{ -// static foo:any -// } -// -// class Z extends Y{ -// static foo:any -// [|foo|]:any -// } -// -// const x = new X(); -// const y = new Y(); -// const z = new Z(); -// x.[|foo|]; -// y./*FIND ALL REFS*/[|foo|]; -// z.[|foo|]; -// Y.foo; -// Z.foo; - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstancePropertyInheritance.ts === - -// class X{ -// [|foo|]:any -// } -// -// class Y extends X{ -// static foo:any -// } -// -// class Z extends Y{ -// static foo:any -// [|foo|]:any -// } -// -// const x = new X(); -// const y = new Y(); -// const z = new Z(); -// x.[|foo|]; -// y.[|foo|]; -// z./*FIND ALL REFS*/[|foo|]; -// Y.foo; -// Z.foo; - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstancePropertyInheritance.ts === - -// class X{ -// foo:any -// } -// -// class Y extends X{ -// static [|foo|]:any -// } -// -// class Z extends Y{ -// // --- (line: 10) skipped --- - - -// --- (line: 16) skipped --- -// x.foo; -// y.foo; -// z.foo; -// Y./*FIND ALL REFS*/[|foo|]; -// Z.foo; - - - - -// === findAllReferences === -// === /findAllRefsForStaticInstancePropertyInheritance.ts === - -// --- (line: 6) skipped --- -// } -// -// class Z extends Y{ -// static [|foo|]:any -// foo:any -// } -// -// // --- (line: 14) skipped --- - - -// --- (line: 17) skipped --- -// y.foo; -// z.foo; -// Y.foo; -// Z./*FIND ALL REFS*/[|foo|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStringLiteral.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStringLiteral.baseline.jsonc deleted file mode 100644 index 7e9203009f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStringLiteral.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// interface Foo { -// property: /*FIND ALL REFS*/"foo"; -// } -// /** -// * @type {{ property: "foo"}} -// // --- (line: 6) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStringLiteralTypes.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStringLiteralTypes.baseline.jsonc deleted file mode 100644 index a6f57497f3..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForStringLiteralTypes.baseline.jsonc +++ /dev/null @@ -1,14 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForStringLiteralTypes.ts === - -// type Options = "/*FIND ALL REFS*/option 1" | "option 2"; -// let myOption: Options = "option 1"; - - - - -// === findAllReferences === -// === /findAllRefsForStringLiteralTypes.ts === - -// type Options = "option 1" | "option 2"; -// let myOption: Options = "/*FIND ALL REFS*/option 1"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForUMDModuleAlias1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForUMDModuleAlias1.baseline.jsonc deleted file mode 100644 index b9127b4a45..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForUMDModuleAlias1.baseline.jsonc +++ /dev/null @@ -1,38 +0,0 @@ -// === findAllReferences === -// === /0.d.ts === - -// export function doThing(): string; -// export function doTheOtherThing(): void; -// /*FIND ALL REFS*/export as namespace myLib; - - - - -// === findAllReferences === -// === /0.d.ts === - -// export function doThing(): string; -// export function doTheOtherThing(): void; -// export as namespace /*FIND ALL REFS*/[|myLib|]; - - -// === /1.ts === - -// /// -// [|myLib|].doThing(); - - - - -// === findAllReferences === -// === /0.d.ts === - -// export function doThing(): string; -// export function doTheOtherThing(): void; -// export as namespace [|myLib|]; - - -// === /1.ts === - -// /// -// /*FIND ALL REFS*/[|myLib|].doThing(); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForVariableInExtendsClause01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForVariableInExtendsClause01.baseline.jsonc deleted file mode 100644 index 2f1a4b5681..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForVariableInExtendsClause01.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForVariableInExtendsClause01.ts === - -// /*FIND ALL REFS*/var Base = class { }; -// class C extends Base { } - - - - -// === findAllReferences === -// === /findAllRefsForVariableInExtendsClause01.ts === - -// var /*FIND ALL REFS*/[|Base|] = class { }; -// class C extends [|Base|] { } - - - - -// === findAllReferences === -// === /findAllRefsForVariableInExtendsClause01.ts === - -// var [|Base|] = class { }; -// class C extends /*FIND ALL REFS*/[|Base|] { } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForVariableInExtendsClause02.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForVariableInExtendsClause02.baseline.jsonc deleted file mode 100644 index a7f6d381da..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForVariableInExtendsClause02.baseline.jsonc +++ /dev/null @@ -1,32 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForVariableInExtendsClause02.ts === - -// /*FIND ALL REFS*/interface Base { } -// namespace n { -// var Base = class { }; -// interface I extends Base { } -// } - - - - -// === findAllReferences === -// === /findAllRefsForVariableInExtendsClause02.ts === - -// interface /*FIND ALL REFS*/[|Base|] { } -// namespace n { -// var Base = class { }; -// interface I extends [|Base|] { } -// } - - - - -// === findAllReferences === -// === /findAllRefsForVariableInExtendsClause02.ts === - -// interface [|Base|] { } -// namespace n { -// var Base = class { }; -// interface I extends /*FIND ALL REFS*/[|Base|] { } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForVariableInImplementsClause01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForVariableInImplementsClause01.baseline.jsonc deleted file mode 100644 index 3662b40351..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsForVariableInImplementsClause01.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === findAllReferences === -// === /findAllRefsForVariableInImplementsClause01.ts === - -// var Base = class { }; -// class C extends Base implements /*FIND ALL REFS*/Base { } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsGlobalThisKeywordInModule.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsGlobalThisKeywordInModule.baseline.jsonc deleted file mode 100644 index 2dcc039a4e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsGlobalThisKeywordInModule.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === findAllReferences === -// === /findAllRefsGlobalThisKeywordInModule.ts === - -// /*FIND ALL REFS*/this; -// export const c = 1; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsImportEquals.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsImportEquals.baseline.jsonc deleted file mode 100644 index 3de6dcb22e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsImportEquals.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === findAllReferences === -// === /findAllRefsImportEquals.ts === - -// import j = N./*FIND ALL REFS*/[|q|]; -// namespace N { export const q = 0; } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsImportType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsImportType.baseline.jsonc deleted file mode 100644 index f497fcf9bd..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsImportType.baseline.jsonc +++ /dev/null @@ -1,27 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// module.exports = 0; -// /*FIND ALL REFS*/export type N = number; - - - - -// === findAllReferences === -// === /a.js === - -// module.exports = 0; -// export type /*FIND ALL REFS*/[|N|] = number; - - -// === /b.js === - -// type T = import("./a").[|N|]; - - - - -// === findAllReferences === -// === /b.js === - -// type T = import("./a")./*FIND ALL REFS*/N; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInClassExpression.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInClassExpression.baseline.jsonc deleted file mode 100644 index ac58d2b7a8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInClassExpression.baseline.jsonc +++ /dev/null @@ -1,18 +0,0 @@ -// === findAllReferences === -// === /findAllRefsInClassExpression.ts === - -// interface I { /*FIND ALL REFS*/[|boom|](): void; } -// new class C implements I { -// [|boom|](){} -// } - - - - -// === findAllReferences === -// === /findAllRefsInClassExpression.ts === - -// interface I { [|boom|](): void; } -// new class C implements I { -// /*FIND ALL REFS*/[|boom|](){} -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsIndexedAccessTypes.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsIndexedAccessTypes.baseline.jsonc deleted file mode 100644 index 2dad9f1fee..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsIndexedAccessTypes.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === findAllReferences === -// === /findAllRefsIndexedAccessTypes.ts === - -// interface I { -// /*FIND ALL REFS*/[|0|]: number; -// s: string; -// } -// interface J { -// a: I[[|0|]], -// b: I["s"], -// } - - - - -// === findAllReferences === -// === /findAllRefsIndexedAccessTypes.ts === - -// interface I { -// 0: number; -// /*FIND ALL REFS*/[|s|]: string; -// } -// interface J { -// a: I[0], -// b: I["[|s|]"], -// } - - - - -// === findAllReferences === -// === /findAllRefsIndexedAccessTypes.ts === - -// interface I { -// [|0|]: number; -// s: string; -// } -// interface J { -// a: I[/*FIND ALL REFS*/[|0|]], -// b: I["s"], -// } - - - - -// === findAllReferences === -// === /findAllRefsIndexedAccessTypes.ts === - -// interface I { -// 0: number; -// [|s|]: string; -// } -// interface J { -// a: I[0], -// b: I["/*FIND ALL REFS*/[|s|]"], -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties1.baseline.jsonc deleted file mode 100644 index 012aff5696..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties1.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === findAllReferences === -// === /findAllRefsInheritedProperties1.ts === - -// class class1 extends class1 { -// /*FIND ALL REFS*/[|doStuff|]() { } -// propName: string; -// } -// -// var v: class1; -// v.[|doStuff|](); -// v.propName; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties1.ts === - -// class class1 extends class1 { -// doStuff() { } -// /*FIND ALL REFS*/[|propName|]: string; -// } -// -// var v: class1; -// v.doStuff(); -// v.[|propName|]; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties1.ts === - -// class class1 extends class1 { -// [|doStuff|]() { } -// propName: string; -// } -// -// var v: class1; -// v./*FIND ALL REFS*/[|doStuff|](); -// v.propName; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties1.ts === - -// class class1 extends class1 { -// doStuff() { } -// [|propName|]: string; -// } -// -// var v: class1; -// v.doStuff(); -// v./*FIND ALL REFS*/[|propName|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties2.baseline.jsonc deleted file mode 100644 index 2d8796609a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties2.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === findAllReferences === -// === /findAllRefsInheritedProperties2.ts === - -// interface interface1 extends interface1 { -// /*FIND ALL REFS*/[|doStuff|](): void; // r0 -// propName: string; // r1 -// } -// -// var v: interface1; -// v.[|doStuff|](); // r2 -// v.propName; // r3 - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties2.ts === - -// interface interface1 extends interface1 { -// doStuff(): void; // r0 -// /*FIND ALL REFS*/[|propName|]: string; // r1 -// } -// -// var v: interface1; -// v.doStuff(); // r2 -// v.[|propName|]; // r3 - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties2.ts === - -// interface interface1 extends interface1 { -// [|doStuff|](): void; // r0 -// propName: string; // r1 -// } -// -// var v: interface1; -// v./*FIND ALL REFS*/[|doStuff|](); // r2 -// v.propName; // r3 - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties2.ts === - -// interface interface1 extends interface1 { -// doStuff(): void; // r0 -// [|propName|]: string; // r1 -// } -// -// var v: interface1; -// v.doStuff(); // r2 -// v./*FIND ALL REFS*/[|propName|]; // r3 diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties3.baseline.jsonc deleted file mode 100644 index a95744a09a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties3.baseline.jsonc +++ /dev/null @@ -1,178 +0,0 @@ -// === findAllReferences === -// === /findAllRefsInheritedProperties3.ts === - -// class class1 extends class1 { -// /*FIND ALL REFS*/[|doStuff|]() { } -// propName: string; -// } -// interface interface1 extends interface1 { -// doStuff(): void; -// propName: string; -// } -// class class2 extends class1 implements interface1 { -// [|doStuff|]() { } -// propName: string; -// } -// -// var v: class2; -// v.[|doStuff|](); -// v.propName; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties3.ts === - -// class class1 extends class1 { -// doStuff() { } -// /*FIND ALL REFS*/[|propName|]: string; -// } -// interface interface1 extends interface1 { -// doStuff(): void; -// propName: string; -// } -// class class2 extends class1 implements interface1 { -// doStuff() { } -// [|propName|]: string; -// } -// -// var v: class2; -// v.doStuff(); -// v.[|propName|]; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties3.ts === - -// class class1 extends class1 { -// doStuff() { } -// propName: string; -// } -// interface interface1 extends interface1 { -// /*FIND ALL REFS*/[|doStuff|](): void; -// propName: string; -// } -// class class2 extends class1 implements interface1 { -// [|doStuff|]() { } -// propName: string; -// } -// -// var v: class2; -// v.[|doStuff|](); -// v.propName; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties3.ts === - -// --- (line: 3) skipped --- -// } -// interface interface1 extends interface1 { -// doStuff(): void; -// /*FIND ALL REFS*/[|propName|]: string; -// } -// class class2 extends class1 implements interface1 { -// doStuff() { } -// [|propName|]: string; -// } -// -// var v: class2; -// v.doStuff(); -// v.[|propName|]; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties3.ts === - -// class class1 extends class1 { -// [|doStuff|]() { } -// propName: string; -// } -// interface interface1 extends interface1 { -// [|doStuff|](): void; -// propName: string; -// } -// class class2 extends class1 implements interface1 { -// /*FIND ALL REFS*/[|doStuff|]() { } -// propName: string; -// } -// -// var v: class2; -// v.[|doStuff|](); -// v.propName; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties3.ts === - -// class class1 extends class1 { -// [|doStuff|]() { } -// propName: string; -// } -// interface interface1 extends interface1 { -// [|doStuff|](): void; -// propName: string; -// } -// class class2 extends class1 implements interface1 { -// [|doStuff|]() { } -// propName: string; -// } -// -// var v: class2; -// v./*FIND ALL REFS*/[|doStuff|](); -// v.propName; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties3.ts === - -// class class1 extends class1 { -// doStuff() { } -// [|propName|]: string; -// } -// interface interface1 extends interface1 { -// doStuff(): void; -// [|propName|]: string; -// } -// class class2 extends class1 implements interface1 { -// doStuff() { } -// /*FIND ALL REFS*/[|propName|]: string; -// } -// -// var v: class2; -// v.doStuff(); -// v.[|propName|]; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties3.ts === - -// class class1 extends class1 { -// doStuff() { } -// [|propName|]: string; -// } -// interface interface1 extends interface1 { -// doStuff(): void; -// [|propName|]: string; -// } -// class class2 extends class1 implements interface1 { -// doStuff() { } -// [|propName|]: string; -// } -// -// var v: class2; -// v.doStuff(); -// v./*FIND ALL REFS*/[|propName|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties4.baseline.jsonc deleted file mode 100644 index f83b0363aa..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties4.baseline.jsonc +++ /dev/null @@ -1,79 +0,0 @@ -// === findAllReferences === -// === /findAllRefsInheritedProperties4.ts === - -// interface C extends D { -// /*FIND ALL REFS*/[|prop0|]: string; -// prop1: number; -// } -// -// interface D extends C { -// [|prop0|]: string; -// } -// -// var d: D; -// d.[|prop0|]; -// d.prop1; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties4.ts === - -// interface C extends D { -// [|prop0|]: string; -// prop1: number; -// } -// -// interface D extends C { -// /*FIND ALL REFS*/[|prop0|]: string; -// } -// -// var d: D; -// d.[|prop0|]; -// d.prop1; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties4.ts === - -// interface C extends D { -// [|prop0|]: string; -// prop1: number; -// } -// -// interface D extends C { -// [|prop0|]: string; -// } -// -// var d: D; -// d./*FIND ALL REFS*/[|prop0|]; -// d.prop1; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties4.ts === - -// interface C extends D { -// prop0: string; -// /*FIND ALL REFS*/[|prop1|]: number; -// } -// -// interface D extends C { -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties4.ts === - -// --- (line: 8) skipped --- -// -// var d: D; -// d.prop0; -// d./*FIND ALL REFS*/prop1; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties5.baseline.jsonc deleted file mode 100644 index 4fe7fef95d..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInheritedProperties5.baseline.jsonc +++ /dev/null @@ -1,69 +0,0 @@ -// === findAllReferences === -// === /findAllRefsInheritedProperties5.ts === - -// class C extends D { -// /*FIND ALL REFS*/[|prop0|]: string; -// prop1: number; -// } -// -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties5.ts === - -// class C extends D { -// prop0: string; -// /*FIND ALL REFS*/[|prop1|]: number; -// } -// -// class D extends C { -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties5.ts === - -// --- (line: 3) skipped --- -// } -// -// class D extends C { -// /*FIND ALL REFS*/[|prop0|]: string; -// } -// -// var d: D; -// d.[|prop0|]; -// d.prop1; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties5.ts === - -// --- (line: 3) skipped --- -// } -// -// class D extends C { -// [|prop0|]: string; -// } -// -// var d: D; -// d./*FIND ALL REFS*/[|prop0|]; -// d.prop1; - - - - -// === findAllReferences === -// === /findAllRefsInheritedProperties5.ts === - -// --- (line: 8) skipped --- -// -// var d: D; -// d.prop0; -// d./*FIND ALL REFS*/prop1; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInsideTemplates1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInsideTemplates1.baseline.jsonc deleted file mode 100644 index 41a93f2506..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInsideTemplates1.baseline.jsonc +++ /dev/null @@ -1,32 +0,0 @@ -// === findAllReferences === -// === /findAllRefsInsideTemplates1.ts === - -// /*FIND ALL REFS*/var x = 10; -// var y = `${ x } ${ x }` - - - - -// === findAllReferences === -// === /findAllRefsInsideTemplates1.ts === - -// var /*FIND ALL REFS*/[|x|] = 10; -// var y = `${ [|x|] } ${ [|x|] }` - - - - -// === findAllReferences === -// === /findAllRefsInsideTemplates1.ts === - -// var [|x|] = 10; -// var y = `${ /*FIND ALL REFS*/[|x|] } ${ [|x|] }` - - - - -// === findAllReferences === -// === /findAllRefsInsideTemplates1.ts === - -// var [|x|] = 10; -// var y = `${ [|x|] } ${ /*FIND ALL REFS*/[|x|] }` diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInsideTemplates2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInsideTemplates2.baseline.jsonc deleted file mode 100644 index 846f0a7c87..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInsideTemplates2.baseline.jsonc +++ /dev/null @@ -1,41 +0,0 @@ -// === findAllReferences === -// === /findAllRefsInsideTemplates2.ts === - -// /*FIND ALL REFS*/function f(...rest: any[]) { } -// f `${ f } ${ f }` - - - - -// === findAllReferences === -// === /findAllRefsInsideTemplates2.ts === - -// function /*FIND ALL REFS*/[|f|](...rest: any[]) { } -// [|f|] `${ [|f|] } ${ [|f|] }` - - - - -// === findAllReferences === -// === /findAllRefsInsideTemplates2.ts === - -// function [|f|](...rest: any[]) { } -// /*FIND ALL REFS*/[|f|] `${ [|f|] } ${ [|f|] }` - - - - -// === findAllReferences === -// === /findAllRefsInsideTemplates2.ts === - -// function [|f|](...rest: any[]) { } -// [|f|] `${ /*FIND ALL REFS*/[|f|] } ${ [|f|] }` - - - - -// === findAllReferences === -// === /findAllRefsInsideTemplates2.ts === - -// function [|f|](...rest: any[]) { } -// [|f|] `${ [|f|] } ${ /*FIND ALL REFS*/[|f|] }` diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInsideWithBlock.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInsideWithBlock.baseline.jsonc deleted file mode 100644 index 5d7c031f52..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsInsideWithBlock.baseline.jsonc +++ /dev/null @@ -1,53 +0,0 @@ -// === findAllReferences === -// === /findAllRefsInsideWithBlock.ts === - -// /*FIND ALL REFS*/var x = 0; -// -// with ({}) { -// var y = x; // Reference of x here should not be picked -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsInsideWithBlock.ts === - -// var /*FIND ALL REFS*/[|x|] = 0; -// -// with ({}) { -// var y = x; // Reference of x here should not be picked -// y++; // also reference for y should be ignored -// } -// -// [|x|] = [|x|] + 1; - - - - -// === findAllReferences === -// === /findAllRefsInsideWithBlock.ts === - -// var [|x|] = 0; -// -// with ({}) { -// var y = x; // Reference of x here should not be picked -// y++; // also reference for y should be ignored -// } -// -// /*FIND ALL REFS*/[|x|] = [|x|] + 1; - - - - -// === findAllReferences === -// === /findAllRefsInsideWithBlock.ts === - -// var [|x|] = 0; -// -// with ({}) { -// var y = x; // Reference of x here should not be picked -// y++; // also reference for y should be ignored -// } -// -// [|x|] = /*FIND ALL REFS*/[|x|] + 1; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsIsDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsIsDefinition.baseline.jsonc deleted file mode 100644 index 35488ee0eb..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsIsDefinition.baseline.jsonc +++ /dev/null @@ -1,115 +0,0 @@ -// === findAllReferences === -// === /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 }); -// // --- (line: 15) skipped --- - - - - -// === findAllReferences === -// === /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 }); -// // --- (line: 15) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsIsDefinition.ts === - -// --- (line: 9) skipped --- -// -// foo; foon; -// -// export const [|bar|]/*FIND ALL REFS*/ = 123; -// console.log({ [|bar|] }); -// -// interface IFoo { -// foo(): void; -// // --- (line: 18) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsIsDefinition.ts === - -// --- (line: 13) skipped --- -// 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() } -// } - - - - -// === findAllReferences === -// === /findAllRefsIsDefinition.ts === - -// --- (line: 15) skipped --- -// 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() } -// } - - - - -// === findAllReferences === -// === /findAllRefsIsDefinition.ts === - -// --- (line: 13) skipped --- -// 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() } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag.baseline.jsonc deleted file mode 100644 index 82335f57b6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// /** -// * @import { [|A|] } from "./b"; -// */ -// -// /** -// * @param { [|A|]/*FIND ALL REFS*/ } a -// */ -// function f(a) {} - - -// === /b.ts === - -// export interface [|A|] { } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag2.baseline.jsonc deleted file mode 100644 index 4b2ad05698..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag2.baseline.jsonc +++ /dev/null @@ -1,30 +0,0 @@ -// === findAllReferences === -// === /component.js === - -// export default class [|Component|] { -// constructor() { -// this.id_ = Math.random(); -// } -// // --- (line: 5) skipped --- - - -// === /player.js === - -// import [|Component|] from './component.js'; -// -// /** -// * @extends [|Component|]/*FIND ALL REFS*/ -// */ -// export class Player extends [|Component|] {} - - -// === /spatial-navigation.js === - -// /** @import [|Component|] from './component.js' */ -// -// export class SpatialNavigation { -// /** -// * @param {[|Component|]} component -// */ -// add(component) {} -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag3.baseline.jsonc deleted file mode 100644 index 9bde729c45..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag3.baseline.jsonc +++ /dev/null @@ -1,30 +0,0 @@ -// === findAllReferences === -// === /component.js === - -// export class [|Component|] { -// constructor() { -// this.id_ = Math.random(); -// } -// // --- (line: 5) skipped --- - - -// === /player.js === - -// import { [|Component|] } from './component.js'; -// -// /** -// * @extends [|Component|]/*FIND ALL REFS*/ -// */ -// export class Player extends [|Component|] {} - - -// === /spatial-navigation.js === - -// /** @import { [|Component|] } from './component.js' */ -// -// export class SpatialNavigation { -// /** -// * @param {[|Component|]} component -// */ -// add(component) {} -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag4.baseline.jsonc deleted file mode 100644 index 00dad63ffb..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag4.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === findAllReferences === -// === /player.js === - -// import * as [|C|] from './component.js'; -// -// /** -// * @extends [|C|]/*FIND ALL REFS*/.Component -// */ -// export class Player extends Component {} diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag5.baseline.jsonc deleted file mode 100644 index 430a09cf38..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocImportTag5.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// export default function /*FIND ALL REFS*/[|a|]() {} - - -// === /b.js === - -// /** @import [|a|], * as ns from "./a" */ - - - - -// === findAllReferences === -// === /a.js === - -// export default function [|a|]() {} - - -// === /b.js === - -// /** @import /*FIND ALL REFS*/[|a|], * as ns from "./a" */ diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocTemplateTag_class.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocTemplateTag_class.baseline.jsonc deleted file mode 100644 index bd853462b7..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocTemplateTag_class.baseline.jsonc +++ /dev/null @@ -1,14 +0,0 @@ -// === findAllReferences === -// === /findAllRefsJsDocTemplateTag_class.ts === - -// /** @template /*FIND ALL REFS*/T */ -// class C {} - - - - -// === findAllReferences === -// === /findAllRefsJsDocTemplateTag_class.ts === - -// /** @template T */ -// class C {} diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocTemplateTag_function.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocTemplateTag_function.baseline.jsonc deleted file mode 100644 index 6ce6028fed..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocTemplateTag_function.baseline.jsonc +++ /dev/null @@ -1,14 +0,0 @@ -// === findAllReferences === -// === /findAllRefsJsDocTemplateTag_function.ts === - -// /** @template /*FIND ALL REFS*/T */ -// function f() {} - - - - -// === findAllReferences === -// === /findAllRefsJsDocTemplateTag_function.ts === - -// /** @template T */ -// function f() {} diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocTypeDef.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocTypeDef.baseline.jsonc deleted file mode 100644 index 293f64aee6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsDocTypeDef.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === findAllReferences === -// === /findAllRefsJsDocTypeDef.ts === - -// /** @typedef {Object} /*FIND ALL REFS*/T */ -// function foo() {} diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsThisPropertyAssignment.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsThisPropertyAssignment.baseline.jsonc deleted file mode 100644 index 44c5225d74..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsThisPropertyAssignment.baseline.jsonc +++ /dev/null @@ -1,30 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// import { infer } from "./infer"; -// infer({ -// m() { -// this.[|x|] = 1; -// this./*FIND ALL REFS*/[|x|]; -// }, -// }); - - -// === /infer.d.ts === - -// export declare function infer(o: { m(): void } & ThisType<{ [|x|]: number }>): void; - - - - -// === findAllReferences === -// === /b.js === - -// --- (line: 4) skipped --- -// function infer(o) {} -// infer({ -// m() { -// this.[|x|] = 2; -// this./*FIND ALL REFS*/[|x|]; -// }, -// }); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsThisPropertyAssignment2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsThisPropertyAssignment2.baseline.jsonc deleted file mode 100644 index 91781f1b5b..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsJsThisPropertyAssignment2.baseline.jsonc +++ /dev/null @@ -1,64 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// import { infer } from "./infer"; -// infer({ -// m: { -// initData() { -// this.[|x|] = 1; -// this./*FIND ALL REFS*/[|x|]; -// }, -// } -// }); - - -// === /b.ts === - -// import { infer } from "./infer"; -// infer({ -// m: { -// initData() { -// this.[|x|] = 1; -// this.[|x|]; -// }, -// } -// }); - - -// === /infer.d.ts === - -// export declare function infer(o: { m: Record } & ThisType<{ [|x|]: number }>): void; - - - - -// === findAllReferences === -// === /a.js === - -// import { infer } from "./infer"; -// infer({ -// m: { -// initData() { -// this.[|x|] = 1; -// this.[|x|]; -// }, -// } -// }); - - -// === /b.ts === - -// import { infer } from "./infer"; -// infer({ -// m: { -// initData() { -// this.[|x|] = 1; -// this./*FIND ALL REFS*/[|x|]; -// }, -// } -// }); - - -// === /infer.d.ts === - -// export declare function infer(o: { m: Record } & ThisType<{ [|x|]: number }>): void; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsMappedType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsMappedType.baseline.jsonc deleted file mode 100644 index 595ca19d09..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsMappedType.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /findAllRefsMappedType.ts === - -// interface T { /*FIND ALL REFS*/[|a|]: number; } -// type U = { readonly [K in keyof T]?: string }; -// declare const t: T; -// t.[|a|]; -// declare const u: U; -// u.[|a|]; - - - - -// === findAllReferences === -// === /findAllRefsMappedType.ts === - -// interface T { [|a|]: number; } -// type U = { readonly [K in keyof T]?: string }; -// declare const t: T; -// t./*FIND ALL REFS*/[|a|]; -// declare const u: U; -// u.[|a|]; - - - - -// === findAllReferences === -// === /findAllRefsMappedType.ts === - -// interface T { [|a|]: number; } -// type U = { readonly [K in keyof T]?: string }; -// declare const t: T; -// t.[|a|]; -// declare const u: U; -// u./*FIND ALL REFS*/[|a|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsMappedType_nonHomomorphic.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsMappedType_nonHomomorphic.baseline.jsonc deleted file mode 100644 index a424fcaed1..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsMappedType_nonHomomorphic.baseline.jsonc +++ /dev/null @@ -1,18 +0,0 @@ -// === findAllReferences === -// === /findAllRefsMappedType_nonHomomorphic.ts === - -// function f(x: { [K in "m"]: number; }) { -// x./*FIND ALL REFS*/[|m|]; -// x.[|m|] -// } - - - - -// === findAllReferences === -// === /findAllRefsMappedType_nonHomomorphic.ts === - -// function f(x: { [K in "m"]: number; }) { -// x.[|m|]; -// x./*FIND ALL REFS*/[|m|] -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsMissingModulesOverlappingSpecifiers.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsMissingModulesOverlappingSpecifiers.baseline.jsonc deleted file mode 100644 index f7cf770d52..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsMissingModulesOverlappingSpecifiers.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === findAllReferences === -// === /findAllRefsMissingModulesOverlappingSpecifiers.ts === - -// // https://github.com/microsoft/TypeScript/issues/5551 -// import { resolve/*FIND ALL REFS*/ as resolveUrl } from "idontcare"; -// import { resolve } from "whatever"; - - - - -// === findAllReferences === -// === /findAllRefsMissingModulesOverlappingSpecifiers.ts === - -// // https://github.com/microsoft/TypeScript/issues/5551 -// import { resolve as resolveUrl } from "idontcare"; -// import { [|resolve|]/*FIND ALL REFS*/ } from "whatever"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNoImportClause.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNoImportClause.baseline.jsonc deleted file mode 100644 index aca1027ca4..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNoImportClause.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// /*FIND ALL REFS*/export const x = 0; - - - - -// === findAllReferences === -// === /a.ts === - -// export const /*FIND ALL REFS*/[|x|] = 0; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNoSubstitutionTemplateLiteralNoCrash1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNoSubstitutionTemplateLiteralNoCrash1.baseline.jsonc deleted file mode 100644 index 68196163ac..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNoSubstitutionTemplateLiteralNoCrash1.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === findAllReferences === -// === /findAllRefsNoSubstitutionTemplateLiteralNoCrash1.ts === - -// type Test = `T/*FIND ALL REFS*/`; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNonModule.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNonModule.baseline.jsonc deleted file mode 100644 index d0673c78f8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNonModule.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === findAllReferences === -// === /import.ts === - -// import "./script/*FIND ALL REFS*/"; - - - - -// === findAllReferences === -// === /require.js === - -// require("./script/*FIND ALL REFS*/"); -// console.log("./script"); - - - - -// === findAllReferences === -// === /require.js === - -// require("./script"); -// console.log("./script/*FIND ALL REFS*/"); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNonexistentPropertyNoCrash1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNonexistentPropertyNoCrash1.baseline.jsonc deleted file mode 100644 index 6557f2d5a6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsNonexistentPropertyNoCrash1.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /src/parser.js === - -// --- (line: 10) skipped --- -// variable: function () { -// let name; -// -// if (parserInput.currentChar() === "/*FIND ALL REFS*/@") { -// return name[1]; -// } -// }, -// // --- (line: 18) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName01.baseline.jsonc deleted file mode 100644 index 1b331d7fc8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName01.baseline.jsonc +++ /dev/null @@ -1,36 +0,0 @@ -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName01.ts === - -// interface I { -// /*FIND ALL REFS*/[|property1|]: number; -// property2: string; -// } -// -// var foo: I; -// var { [|property1|]: prop1 } = foo; - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName01.ts === - -// --- (line: 3) skipped --- -// } -// -// var foo: I; -// /*FIND ALL REFS*/var { property1: prop1 } = foo; - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName01.ts === - -// interface I { -// [|property1|]: number; -// property2: string; -// } -// -// var foo: I; -// var { /*FIND ALL REFS*/[|property1|]: prop1 } = foo; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName02.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName02.baseline.jsonc deleted file mode 100644 index 6407c6031f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName02.baseline.jsonc +++ /dev/null @@ -1,36 +0,0 @@ -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName02.ts === - -// interface I { -// /*FIND ALL REFS*/[|property1|]: number; -// property2: string; -// } -// -// var foo: I; -// var { [|property1|]: {} } = foo; - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName02.ts === - -// --- (line: 3) skipped --- -// } -// -// var foo: I; -// /*FIND ALL REFS*/var { property1: {} } = foo; - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName02.ts === - -// interface I { -// [|property1|]: number; -// property2: string; -// } -// -// var foo: I; -// var { /*FIND ALL REFS*/[|property1|]: {} } = foo; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName03.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName03.baseline.jsonc deleted file mode 100644 index 58c28b0f61..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName03.baseline.jsonc +++ /dev/null @@ -1,24 +0,0 @@ -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName03.ts === - -// interface I { -// /*FIND ALL REFS*/[|property1|]: number; -// property2: string; -// } -// -// var foo: I; -// var [ { [|property1|]: prop1 }, { [|property1|], property2 } ] = [foo, foo]; - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName03.ts === - -// interface I { -// [|property1|]: number; -// property2: string; -// } -// -// var foo: I; -// var [ { [|property1|]: prop1 }, { /*FIND ALL REFS*/[|property1|], property2 } ] = [foo, foo]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName04.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName04.baseline.jsonc deleted file mode 100644 index 915b803c98..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName04.baseline.jsonc +++ /dev/null @@ -1,66 +0,0 @@ -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName04.ts === - -// interface I { -// /*FIND ALL REFS*/[|property1|]: number; -// property2: string; -// } -// -// function f({ [|property1|]: p1 }: I, -// { [|property1|] }: I, -// { property1: p2 }) { -// -// return property1 + 1; -// } - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName04.ts === - -// interface I { -// [|property1|]: number; -// property2: string; -// } -// -// function f({ /*FIND ALL REFS*/[|property1|]: p1 }: I, -// { [|property1|] }: I, -// { property1: p2 }) { -// -// return property1 + 1; -// } - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName04.ts === - -// interface I { -// [|property1|]: number; -// property2: string; -// } -// -// function f({ [|property1|]: p1 }: I, -// { /*FIND ALL REFS*/[|property1|] }: I, -// { property1: p2 }) { -// -// return [|property1|] + 1; -// } - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName04.ts === - -// --- (line: 3) skipped --- -// } -// -// function f({ property1: p1 }: I, -// { [|property1|] }: I, -// { property1: p2 }) { -// -// return /*FIND ALL REFS*/[|property1|] + 1; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName05.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName05.baseline.jsonc deleted file mode 100644 index 3978cfa9f9..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName05.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName05.ts === - -// interface I { -// property1: number; -// property2: string; -// } -// -// function f({ /*FIND ALL REFS*/property1: p }, { property1 }) { -// let x = property1; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName06.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName06.baseline.jsonc deleted file mode 100644 index 8e498e58b7..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName06.baseline.jsonc +++ /dev/null @@ -1,106 +0,0 @@ -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName06.ts === - -// interface I { -// /*FIND ALL REFS*/[|property1|]: number; -// property2: string; -// } -// -// var elems: I[]; -// for (let { [|property1|]: p } of elems) { -// } -// for (let { [|property1|] } of elems) { -// } -// for (var { [|property1|]: p1 } of elems) { -// } -// var p2; -// for ({ [|property1|] : p2 } of elems) { -// } - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName06.ts === - -// interface I { -// [|property1|]: number; -// property2: string; -// } -// -// var elems: I[]; -// for (let { /*FIND ALL REFS*/[|property1|]: p } of elems) { -// } -// for (let { [|property1|] } of elems) { -// } -// for (var { [|property1|]: p1 } of elems) { -// } -// var p2; -// for ({ [|property1|] : p2 } of elems) { -// } - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName06.ts === - -// interface I { -// [|property1|]: number; -// property2: string; -// } -// -// var elems: I[]; -// for (let { [|property1|]: p } of elems) { -// } -// for (let { [|property1|] } of elems) { -// } -// for (var { /*FIND ALL REFS*/[|property1|]: p1 } of elems) { -// } -// var p2; -// for ({ [|property1|] : p2 } of elems) { -// } - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName06.ts === - -// interface I { -// [|property1|]: number; -// property2: string; -// } -// -// var elems: I[]; -// for (let { [|property1|]: p } of elems) { -// } -// for (let { [|property1|] } of elems) { -// } -// for (var { [|property1|]: p1 } of elems) { -// } -// var p2; -// for ({ /*FIND ALL REFS*/[|property1|] : p2 } of elems) { -// } - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName06.ts === - -// interface I { -// [|property1|]: number; -// property2: string; -// } -// -// var elems: I[]; -// for (let { [|property1|]: p } of elems) { -// } -// for (let { /*FIND ALL REFS*/[|property1|] } of elems) { -// } -// for (var { [|property1|]: p1 } of elems) { -// } -// var p2; -// for ({ [|property1|] : p2 } of elems) { -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName07.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName07.baseline.jsonc deleted file mode 100644 index 1a23173a81..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName07.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName07.ts === - -// let p, b; -// -// p, [{ /*FIND ALL REFS*/[|a|]: p, b }] = [{ [|a|]: 10, b: true }]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName10.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName10.baseline.jsonc deleted file mode 100644 index e31ad68b38..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsObjectBindingElementPropertyName10.baseline.jsonc +++ /dev/null @@ -1,52 +0,0 @@ -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName10.ts === - -// interface Recursive { -// /*FIND ALL REFS*/[|next|]?: Recursive; -// value: any; -// } -// -// function f ({ [|next|]: { [|next|]: x} }: Recursive) { -// } - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName10.ts === - -// interface Recursive { -// next?: Recursive; -// value: any; -// } -// -// function f (/*FIND ALL REFS*/{ next: { next: x} }: Recursive) { -// } - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName10.ts === - -// interface Recursive { -// [|next|]?: Recursive; -// value: any; -// } -// -// function f ({ /*FIND ALL REFS*/[|next|]: { [|next|]: x} }: Recursive) { -// } - - - - -// === findAllReferences === -// === /findAllRefsObjectBindingElementPropertyName10.ts === - -// interface Recursive { -// [|next|]?: Recursive; -// value: any; -// } -// -// function f ({ [|next|]: { /*FIND ALL REFS*/[|next|]: x} }: Recursive) { -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOfConstructor_withModifier.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOfConstructor_withModifier.baseline.jsonc deleted file mode 100644 index 79cc67c300..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOfConstructor_withModifier.baseline.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -// === findAllReferences === -// === /findAllRefsOfConstructor_withModifier.ts === - -// class [|X|] { -// public /*FIND ALL REFS*/constructor() {} -// } -// var x = new [|X|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnDecorators.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnDecorators.baseline.jsonc deleted file mode 100644 index 8c02da7df4..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnDecorators.baseline.jsonc +++ /dev/null @@ -1,107 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// /*FIND ALL REFS*/function decorator(target) { -// return target; -// } -// decorator(); - - - - -// === findAllReferences === -// === /a.ts === - -// function /*FIND ALL REFS*/[|decorator|](target) { -// return target; -// } -// [|decorator|](); - - -// === /b.ts === - -// @[|decorator|] @[|decorator|]("again") -// class C { -// @[|decorator|] -// method() {} -// } - - - - -// === findAllReferences === -// === /a.ts === - -// function [|decorator|](target) { -// return target; -// } -// /*FIND ALL REFS*/[|decorator|](); - - -// === /b.ts === - -// @[|decorator|] @[|decorator|]("again") -// class C { -// @[|decorator|] -// method() {} -// } - - - - -// === findAllReferences === -// === /a.ts === - -// function [|decorator|](target) { -// return target; -// } -// [|decorator|](); - - -// === /b.ts === - -// @/*FIND ALL REFS*/[|decorator|] @[|decorator|]("again") -// class C { -// @[|decorator|] -// method() {} -// } - - - - -// === findAllReferences === -// === /a.ts === - -// function [|decorator|](target) { -// return target; -// } -// [|decorator|](); - - -// === /b.ts === - -// @[|decorator|] @/*FIND ALL REFS*/[|decorator|]("again") -// class C { -// @[|decorator|] -// method() {} -// } - - - - -// === findAllReferences === -// === /a.ts === - -// function [|decorator|](target) { -// return target; -// } -// [|decorator|](); - - -// === /b.ts === - -// @[|decorator|] @[|decorator|]("again") -// class C { -// @/*FIND ALL REFS*/[|decorator|] -// method() {} -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnDefinition.baseline.jsonc deleted file mode 100644 index 483317456a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnDefinition.baseline.jsonc +++ /dev/null @@ -1,62 +0,0 @@ -// === findAllReferences === -// === /findAllRefsOnDefinition-import.ts === - -// --- (line: 3) skipped --- -// -// } -// -// /*FIND ALL REFS*/public start(){ -// return this; -// } -// -// // --- (line: 11) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsOnDefinition-import.ts === - -// --- (line: 3) skipped --- -// -// } -// -// public /*FIND ALL REFS*/[|start|](){ -// return this; -// } -// -// // --- (line: 11) skipped --- - - -// === /findAllRefsOnDefinition.ts === - -// import Second = require("./findAllRefsOnDefinition-import"); -// -// var second = new Second.Test() -// second.[|start|](); -// second.stop(); - - - - -// === findAllReferences === -// === /findAllRefsOnDefinition-import.ts === - -// --- (line: 3) skipped --- -// -// } -// -// public [|start|](){ -// return this; -// } -// -// // --- (line: 11) skipped --- - - -// === /findAllRefsOnDefinition.ts === - -// import Second = require("./findAllRefsOnDefinition-import"); -// -// var second = new Second.Test() -// second./*FIND ALL REFS*/[|start|](); -// second.stop(); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnDefinition2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnDefinition2.baseline.jsonc deleted file mode 100644 index b8e8d6fe68..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnDefinition2.baseline.jsonc +++ /dev/null @@ -1,51 +0,0 @@ -// === findAllReferences === -// === /findAllRefsOnDefinition2-import.ts === - -// export module Test{ -// -// /*FIND ALL REFS*/export interface start { } -// -// export interface stop { } -// } - - - - -// === findAllReferences === -// === /findAllRefsOnDefinition2-import.ts === - -// export module Test{ -// -// export interface /*FIND ALL REFS*/[|start|] { } -// -// export interface stop { } -// } - - -// === /findAllRefsOnDefinition2.ts === - -// import Second = require("./findAllRefsOnDefinition2-import"); -// -// var start: Second.Test.[|start|]; -// var stop: Second.Test.stop; - - - - -// === findAllReferences === -// === /findAllRefsOnDefinition2-import.ts === - -// export module Test{ -// -// export interface [|start|] { } -// -// export interface stop { } -// } - - -// === /findAllRefsOnDefinition2.ts === - -// import Second = require("./findAllRefsOnDefinition2-import"); -// -// var start: Second.Test./*FIND ALL REFS*/[|start|]; -// var stop: Second.Test.stop; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnImportAliases.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnImportAliases.baseline.jsonc deleted file mode 100644 index d775aa9da9..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnImportAliases.baseline.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// export class /*FIND ALL REFS*/[|Class|] { -// } - - -// === /b.ts === - -// import { [|Class|] } from "./a"; -// -// var c = new [|Class|](); - - - - -// === findAllReferences === -// === /a.ts === - -// export class [|Class|] { -// } - - -// === /b.ts === - -// import { /*FIND ALL REFS*/[|Class|] } from "./a"; -// -// var c = new [|Class|](); - - - - -// === findAllReferences === -// === /a.ts === - -// export class [|Class|] { -// } - - -// === /b.ts === - -// import { [|Class|] } from "./a"; -// -// var c = new /*FIND ALL REFS*/[|Class|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnPrivateParameterProperty1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnPrivateParameterProperty1.baseline.jsonc deleted file mode 100644 index 407551ecf5..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsOnPrivateParameterProperty1.baseline.jsonc +++ /dev/null @@ -1,39 +0,0 @@ -// === findAllReferences === -// === /findAllRefsOnPrivateParameterProperty1.ts === - -// class ABCD { -// constructor(private x: number, public y: number, /*FIND ALL REFS*/private z: number) { -// } -// -// func() { -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsOnPrivateParameterProperty1.ts === - -// class ABCD { -// constructor(private x: number, public y: number, private /*FIND ALL REFS*/[|z|]: number) { -// } -// -// func() { -// return this.[|z|]; -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsOnPrivateParameterProperty1.ts === - -// class ABCD { -// constructor(private x: number, public y: number, private [|z|]: number) { -// } -// -// func() { -// return this./*FIND ALL REFS*/[|z|]; -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration1.baseline.jsonc deleted file mode 100644 index 1051fef3e0..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration1.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration1.ts === - -// class Foo { -// constructor(private /*FIND ALL REFS*/[|privateParam|]: number) { -// let localPrivate = [|privateParam|]; -// this.[|privateParam|] += 10; -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration2.baseline.jsonc deleted file mode 100644 index 7ad1bdc9fd..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration2.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration2.ts === - -// class Foo { -// constructor(public /*FIND ALL REFS*/[|publicParam|]: number) { -// let localPublic = [|publicParam|]; -// this.[|publicParam|] += 10; -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration2.ts === - -// class Foo { -// constructor(public [|publicParam|]: number) { -// let localPublic = /*FIND ALL REFS*/[|publicParam|]; -// this.[|publicParam|] += 10; -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration2.ts === - -// class Foo { -// constructor(public [|publicParam|]: number) { -// let localPublic = [|publicParam|]; -// this./*FIND ALL REFS*/[|publicParam|] += 10; -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration3.baseline.jsonc deleted file mode 100644 index a0cdacdd22..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration3.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration3.ts === - -// class Foo { -// constructor(protected /*FIND ALL REFS*/[|protectedParam|]: number) { -// let localProtected = [|protectedParam|]; -// this.[|protectedParam|] += 10; -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration3.ts === - -// class Foo { -// constructor(protected [|protectedParam|]: number) { -// let localProtected = /*FIND ALL REFS*/[|protectedParam|]; -// this.[|protectedParam|] += 10; -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration3.ts === - -// class Foo { -// constructor(protected [|protectedParam|]: number) { -// let localProtected = [|protectedParam|]; -// this./*FIND ALL REFS*/[|protectedParam|] += 10; -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration_inheritance.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration_inheritance.baseline.jsonc deleted file mode 100644 index 2a68d0dcfe..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsParameterPropertyDeclaration_inheritance.baseline.jsonc +++ /dev/null @@ -1,61 +0,0 @@ -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration_inheritance.ts === - -// class C { -// constructor(public /*FIND ALL REFS*/[|x|]: string) { -// [|x|]; -// } -// } -// class D extends C { -// constructor(public [|x|]: string) { -// super([|x|]); -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration_inheritance.ts === - -// class C { -// constructor(public [|x|]: string) { -// /*FIND ALL REFS*/[|x|]; -// } -// } -// class D extends C { -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration_inheritance.ts === - -// class C { -// constructor(public [|x|]: string) { -// [|x|]; -// } -// } -// class D extends C { -// constructor(public /*FIND ALL REFS*/[|x|]: string) { -// super([|x|]); -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsParameterPropertyDeclaration_inheritance.ts === - -// class C { -// constructor(public [|x|]: string) { -// [|x|]; -// } -// } -// class D extends C { -// constructor(public [|x|]: string) { -// super(/*FIND ALL REFS*/[|x|]); -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrimitiveJsDoc.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrimitiveJsDoc.baseline.jsonc deleted file mode 100644 index 3996cc5d59..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrimitiveJsDoc.baseline.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// === findAllReferences === -// === /findAllRefsPrimitiveJsDoc.ts === - -// /** -// * @param {/*FIND ALL REFS*/[|number|]} n -// * @returns {[|number|]} -// */ -// function f(n: [|number|]): [|number|] {} - - - - -// === findAllReferences === -// === /findAllRefsPrimitiveJsDoc.ts === - -// /** -// * @param {[|number|]} n -// * @returns {/*FIND ALL REFS*/[|number|]} -// */ -// function f(n: [|number|]): [|number|] {} - - - - -// === findAllReferences === -// === /findAllRefsPrimitiveJsDoc.ts === - -// /** -// * @param {[|number|]} n -// * @returns {[|number|]} -// */ -// function f(n: /*FIND ALL REFS*/[|number|]): [|number|] {} - - - - -// === findAllReferences === -// === /findAllRefsPrimitiveJsDoc.ts === - -// /** -// * @param {[|number|]} n -// * @returns {[|number|]} -// */ -// function f(n: [|number|]): /*FIND ALL REFS*/[|number|] {} diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrivateNameAccessors.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrivateNameAccessors.baseline.jsonc deleted file mode 100644 index b60326f81a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrivateNameAccessors.baseline.jsonc +++ /dev/null @@ -1,155 +0,0 @@ -// === findAllReferences === -// === /findAllRefsPrivateNameAccessors.ts === - -// class C { -// /*FIND ALL REFS*/get #foo(){ return 1; } -// set #foo(value: number){ } -// constructor() { -// this.#foo(); -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameAccessors.ts === - -// class C { -// get /*FIND ALL REFS*/[|#foo|](){ return 1; } -// set [|#foo|](value: number){ } -// constructor() { -// this.[|#foo|](); -// } -// } -// class D extends C { -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameAccessors.ts === - -// class C { -// get #foo(){ return 1; } -// /*FIND ALL REFS*/set #foo(value: number){ } -// constructor() { -// this.#foo(); -// } -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameAccessors.ts === - -// class C { -// get [|#foo|](){ return 1; } -// set /*FIND ALL REFS*/[|#foo|](value: number){ } -// constructor() { -// this.[|#foo|](); -// } -// } -// class D extends C { -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameAccessors.ts === - -// class C { -// get [|#foo|](){ return 1; } -// set [|#foo|](value: number){ } -// constructor() { -// this./*FIND ALL REFS*/[|#foo|](); -// } -// } -// class D extends C { -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameAccessors.ts === - -// --- (line: 11) skipped --- -// } -// } -// class E { -// /*FIND ALL REFS*/get #foo(){ return 1; } -// set #foo(value: number){ } -// constructor() { -// this.#foo(); -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameAccessors.ts === - -// --- (line: 11) skipped --- -// } -// } -// class E { -// get /*FIND ALL REFS*/[|#foo|](){ return 1; } -// set [|#foo|](value: number){ } -// constructor() { -// this.[|#foo|](); -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameAccessors.ts === - -// --- (line: 12) skipped --- -// } -// class E { -// get #foo(){ return 1; } -// /*FIND ALL REFS*/set #foo(value: number){ } -// constructor() { -// this.#foo(); -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameAccessors.ts === - -// --- (line: 11) skipped --- -// } -// } -// class E { -// get [|#foo|](){ return 1; } -// set /*FIND ALL REFS*/[|#foo|](value: number){ } -// constructor() { -// this.[|#foo|](); -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameAccessors.ts === - -// --- (line: 11) skipped --- -// } -// } -// class E { -// get [|#foo|](){ return 1; } -// set [|#foo|](value: number){ } -// constructor() { -// this./*FIND ALL REFS*/[|#foo|](); -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrivateNameMethods.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrivateNameMethods.baseline.jsonc deleted file mode 100644 index f24a72a75c..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrivateNameMethods.baseline.jsonc +++ /dev/null @@ -1,58 +0,0 @@ -// === findAllReferences === -// === /findAllRefsPrivateNameMethods.ts === - -// class C { -// /*FIND ALL REFS*/[|#foo|](){ } -// constructor() { -// this.[|#foo|](); -// } -// } -// class D extends C { -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameMethods.ts === - -// class C { -// [|#foo|](){ } -// constructor() { -// this./*FIND ALL REFS*/[|#foo|](); -// } -// } -// class D extends C { -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameMethods.ts === - -// --- (line: 10) skipped --- -// } -// } -// class E { -// /*FIND ALL REFS*/[|#foo|](){ } -// constructor() { -// this.[|#foo|](); -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameMethods.ts === - -// --- (line: 10) skipped --- -// } -// } -// class E { -// [|#foo|](){ } -// constructor() { -// this./*FIND ALL REFS*/[|#foo|](); -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrivateNameProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrivateNameProperties.baseline.jsonc deleted file mode 100644 index 9cca24a9f5..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPrivateNameProperties.baseline.jsonc +++ /dev/null @@ -1,76 +0,0 @@ -// === findAllReferences === -// === /findAllRefsPrivateNameProperties.ts === - -// class C { -// /*FIND ALL REFS*/[|#foo|] = 10; -// constructor() { -// this.[|#foo|] = 20; -// [|#foo|] in this; -// } -// } -// class D extends C { -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameProperties.ts === - -// class C { -// [|#foo|] = 10; -// constructor() { -// this./*FIND ALL REFS*/[|#foo|] = 20; -// [|#foo|] in this; -// } -// } -// class D extends C { -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameProperties.ts === - -// class C { -// [|#foo|] = 10; -// constructor() { -// this.[|#foo|] = 20; -// /*FIND ALL REFS*/[|#foo|] in this; -// } -// } -// class D extends C { -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameProperties.ts === - -// --- (line: 11) skipped --- -// } -// } -// class E { -// /*FIND ALL REFS*/[|#foo|]: number; -// constructor() { -// this.[|#foo|] = 20; -// } -// } - - - - -// === findAllReferences === -// === /findAllRefsPrivateNameProperties.ts === - -// --- (line: 11) skipped --- -// } -// } -// class E { -// [|#foo|]: number; -// constructor() { -// this./*FIND ALL REFS*/[|#foo|] = 20; -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPropertyContextuallyTypedByTypeParam01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPropertyContextuallyTypedByTypeParam01.baseline.jsonc deleted file mode 100644 index 82414b2b25..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsPropertyContextuallyTypedByTypeParam01.baseline.jsonc +++ /dev/null @@ -1,19 +0,0 @@ -// === findAllReferences === -// === /findAllRefsPropertyContextuallyTypedByTypeParam01.ts === - -// interface IFoo { -// /*FIND ALL REFS*/[|a|]: string; -// } -// class C { -// method() { -// var x: T = { -// [|a|]: "" -// }; -// x.[|a|]; -// } -// } -// -// -// var x: IFoo = { -// [|a|]: "ss" -// }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsReExport_broken2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsReExport_broken2.baseline.jsonc deleted file mode 100644 index 559cb63f09..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsReExport_broken2.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// /*FIND ALL REFS*/export { x } from "nonsense"; - - - - -// === findAllReferences === -// === /a.ts === - -// export { /*FIND ALL REFS*/x } from "nonsense"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsRedeclaredPropertyInDerivedInterface.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsRedeclaredPropertyInDerivedInterface.baseline.jsonc deleted file mode 100644 index 33f988fd9a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsRedeclaredPropertyInDerivedInterface.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === findAllReferences === -// === /findAllRefsRedeclaredPropertyInDerivedInterface.ts === - -// interface A { -// readonly /*FIND ALL REFS*/[|x|]: number | string; -// } -// interface B extends A { -// readonly [|x|]: number; -// } -// const a: A = { [|x|]: 0 }; -// const b: B = { [|x|]: 0 }; - - - - -// === findAllReferences === -// === /findAllRefsRedeclaredPropertyInDerivedInterface.ts === - -// interface A { -// readonly [|x|]: number | string; -// } -// interface B extends A { -// readonly /*FIND ALL REFS*/[|x|]: number; -// } -// const a: A = { [|x|]: 0 }; -// const b: B = { [|x|]: 0 }; - - - - -// === findAllReferences === -// === /findAllRefsRedeclaredPropertyInDerivedInterface.ts === - -// interface A { -// readonly [|x|]: number | string; -// } -// interface B extends A { -// readonly [|x|]: number; -// } -// const a: A = { /*FIND ALL REFS*/[|x|]: 0 }; -// const b: B = { [|x|]: 0 }; - - - - -// === findAllReferences === -// === /findAllRefsRedeclaredPropertyInDerivedInterface.ts === - -// interface A { -// readonly [|x|]: number | string; -// } -// interface B extends A { -// readonly [|x|]: number; -// } -// const a: A = { [|x|]: 0 }; -// const b: B = { /*FIND ALL REFS*/[|x|]: 0 }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsRootSymbols.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsRootSymbols.baseline.jsonc deleted file mode 100644 index 7b17dcb086..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsRootSymbols.baseline.jsonc +++ /dev/null @@ -1,40 +0,0 @@ -// === findAllReferences === -// === /findAllRefsRootSymbols.ts === - -// interface I { /*FIND ALL REFS*/[|x|]: {}; } -// interface J { x: {}; } -// declare const o: (I | J) & { x: string }; -// o.[|x|]; - - - - -// === findAllReferences === -// === /findAllRefsRootSymbols.ts === - -// interface I { x: {}; } -// interface J { /*FIND ALL REFS*/[|x|]: {}; } -// declare const o: (I | J) & { x: string }; -// o.[|x|]; - - - - -// === findAllReferences === -// === /findAllRefsRootSymbols.ts === - -// interface I { x: {}; } -// interface J { x: {}; } -// declare const o: (I | J) & { /*FIND ALL REFS*/[|x|]: string }; -// o.[|x|]; - - - - -// === findAllReferences === -// === /findAllRefsRootSymbols.ts === - -// interface I { [|x|]: {}; } -// interface J { [|x|]: {}; } -// declare const o: (I | J) & { [|x|]: string }; -// o./*FIND ALL REFS*/[|x|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsThisKeyword.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsThisKeyword.baseline.jsonc deleted file mode 100644 index 7b2b4938eb..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsThisKeyword.baseline.jsonc +++ /dev/null @@ -1,170 +0,0 @@ -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// /*FIND ALL REFS*/[|this|]; -// function f(this) { -// return this; -// function g(this) { return this; } -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// this; -// function f(/*FIND ALL REFS*/[|this|]) { -// return [|this|]; -// function g(this) { return this; } -// } -// class C { -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// this; -// function f([|this|]) { -// return /*FIND ALL REFS*/[|this|]; -// function g(this) { return this; } -// } -// class C { -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// this; -// function f(this) { -// return this; -// function g(/*FIND ALL REFS*/[|this|]) { return [|this|]; } -// } -// class C { -// static x() { -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// this; -// function f(this) { -// return this; -// function g([|this|]) { return /*FIND ALL REFS*/[|this|]; } -// } -// class C { -// static x() { -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// --- (line: 4) skipped --- -// } -// class C { -// static x() { -// /*FIND ALL REFS*/[|this|]; -// } -// static y() { -// () => [|this|]; -// } -// constructor() { -// this; -// // --- (line: 15) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// --- (line: 4) skipped --- -// } -// class C { -// static x() { -// [|this|]; -// } -// static y() { -// () => /*FIND ALL REFS*/[|this|]; -// } -// constructor() { -// this; -// // --- (line: 15) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// --- (line: 10) skipped --- -// () => this; -// } -// constructor() { -// /*FIND ALL REFS*/[|this|]; -// } -// method() { -// () => [|this|]; -// } -// } -// // These are *not* real uses of the 'this' keyword, they are identifiers. -// const x = { this: 0 } -// x.this; - - - - -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// --- (line: 10) skipped --- -// () => this; -// } -// constructor() { -// [|this|]; -// } -// method() { -// () => /*FIND ALL REFS*/[|this|]; -// } -// } -// // These are *not* real uses of the 'this' keyword, they are identifiers. -// const x = { this: 0 } -// x.this; - - - - -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// --- (line: 17) skipped --- -// } -// } -// // These are *not* real uses of the 'this' keyword, they are identifiers. -// const x = { /*FIND ALL REFS*/[|this|]: 0 } -// x.[|this|]; - - - - -// === findAllReferences === -// === /findAllRefsThisKeyword.ts === - -// --- (line: 17) skipped --- -// } -// } -// // These are *not* real uses of the 'this' keyword, they are identifiers. -// const x = { [|this|]: 0 } -// x./*FIND ALL REFS*/[|this|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsThisKeywordMultipleFiles.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsThisKeywordMultipleFiles.baseline.jsonc deleted file mode 100644 index 26a96ba35a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsThisKeywordMultipleFiles.baseline.jsonc +++ /dev/null @@ -1,70 +0,0 @@ -// === findAllReferences === -// === /file1.ts === - -// /*FIND ALL REFS*/[|this|]; [|this|]; - - - - -// === findAllReferences === -// === /file1.ts === - -// [|this|]; /*FIND ALL REFS*/[|this|]; - - - - -// === findAllReferences === -// === /file2.ts === - -// /*FIND ALL REFS*/[|this|]; -// [|this|]; - - - - -// === findAllReferences === -// === /file2.ts === - -// [|this|]; -// /*FIND ALL REFS*/[|this|]; - - - - -// === findAllReferences === -// === /file3.ts === - -// ((x = /*FIND ALL REFS*/[|this|], y) => [|this|])([|this|], [|this|]); -// // different 'this' -// function f(this) { return this; } - - - - -// === findAllReferences === -// === /file3.ts === - -// ((x = [|this|], y) => /*FIND ALL REFS*/[|this|])([|this|], [|this|]); -// // different 'this' -// function f(this) { return this; } - - - - -// === findAllReferences === -// === /file3.ts === - -// ((x = [|this|], y) => [|this|])(/*FIND ALL REFS*/[|this|], [|this|]); -// // different 'this' -// function f(this) { return this; } - - - - -// === findAllReferences === -// === /file3.ts === - -// ((x = [|this|], y) => [|this|])([|this|], /*FIND ALL REFS*/[|this|]); -// // different 'this' -// function f(this) { return this; } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypeParameterInMergedInterface.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypeParameterInMergedInterface.baseline.jsonc deleted file mode 100644 index 5297bb58fe..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypeParameterInMergedInterface.baseline.jsonc +++ /dev/null @@ -1,32 +0,0 @@ -// === findAllReferences === -// === /findAllRefsTypeParameterInMergedInterface.ts === - -// interface I { a: [|T|] } -// interface I<[|T|]> { b: [|T|] } - - - - -// === findAllReferences === -// === /findAllRefsTypeParameterInMergedInterface.ts === - -// interface I<[|T|]> { a: /*FIND ALL REFS*/[|T|] } -// interface I<[|T|]> { b: [|T|] } - - - - -// === findAllReferences === -// === /findAllRefsTypeParameterInMergedInterface.ts === - -// interface I<[|T|]> { a: [|T|] } -// interface I { b: [|T|] } - - - - -// === findAllReferences === -// === /findAllRefsTypeParameterInMergedInterface.ts === - -// interface I<[|T|]> { a: [|T|] } -// interface I<[|T|]> { b: /*FIND ALL REFS*/[|T|] } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypedef.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypedef.baseline.jsonc deleted file mode 100644 index e52f205635..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypedef.baseline.jsonc +++ /dev/null @@ -1,41 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// /** -// * @typedef I {Object} -// * /*FIND ALL REFS*/@prop p {number} -// */ -// -// /** @type {I} */ -// let x; -// x.p; - - - - -// === findAllReferences === -// === /a.js === - -// /** -// * @typedef I {Object} -// * @prop /*FIND ALL REFS*/[|p|] {number} -// */ -// -// /** @type {I} */ -// let x; -// x.[|p|]; - - - - -// === findAllReferences === -// === /a.js === - -// /** -// * @typedef I {Object} -// * @prop [|p|] {number} -// */ -// -// /** @type {I} */ -// let x; -// x./*FIND ALL REFS*/[|p|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypedef_importType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypedef_importType.baseline.jsonc deleted file mode 100644 index 169acfdcee..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypedef_importType.baseline.jsonc +++ /dev/null @@ -1,31 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// module.exports = 0; -// /** /*FIND ALL REFS*/@typedef {number} Foo */ -// const dummy = 0; - - - - -// === findAllReferences === -// === /a.js === - -// module.exports = 0; -// /** @typedef {number} /*FIND ALL REFS*/[|Foo|] */ -// const dummy = 0; - - -// === /b.js === - -// /** @type {import('./a').[|Foo|]} */ -// const x = 0; - - - - -// === findAllReferences === -// === /b.js === - -// /** @type {import('./a')./*FIND ALL REFS*/Foo} */ -// const x = 0; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypeofImport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypeofImport.baseline.jsonc deleted file mode 100644 index 78be51693f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsTypeofImport.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// /*FIND ALL REFS*/export const x = 0; -// declare const a: typeof import("./a"); -// a.x; - - - - -// === findAllReferences === -// === /a.ts === - -// export const /*FIND ALL REFS*/[|x|] = 0; -// declare const a: typeof import("./a"); -// a.[|x|]; - - - - -// === findAllReferences === -// === /a.ts === - -// export const [|x|] = 0; -// declare const a: typeof import("./a"); -// a./*FIND ALL REFS*/[|x|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnionProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnionProperty.baseline.jsonc deleted file mode 100644 index 7afaaa75e1..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnionProperty.baseline.jsonc +++ /dev/null @@ -1,167 +0,0 @@ -// === findAllReferences === -// === /findAllRefsUnionProperty.ts === - -// type T = -// | { /*FIND ALL REFS*/[|type|]: "a", prop: number } -// | { [|type|]: "b", prop: string }; -// const tt: T = { -// [|type|]: "a", -// prop: 0, -// }; -// declare const t: T; -// if (t.[|type|] === "a") { -// t.[|type|]; -// } else { -// t.[|type|]; -// } - - - - -// === findAllReferences === -// === /findAllRefsUnionProperty.ts === - -// type T = -// | { [|type|]: "a", prop: number } -// | { /*FIND ALL REFS*/[|type|]: "b", prop: string }; -// const tt: T = { -// [|type|]: "a", -// prop: 0, -// }; -// declare const t: T; -// if (t.[|type|] === "a") { -// t.[|type|]; -// } else { -// t.[|type|]; -// } - - - - -// === findAllReferences === -// === /findAllRefsUnionProperty.ts === - -// type T = -// | { [|type|]: "a", prop: number } -// | { [|type|]: "b", prop: string }; -// const tt: T = { -// [|type|]: "a", -// prop: 0, -// }; -// declare const t: T; -// if (t./*FIND ALL REFS*/[|type|] === "a") { -// t.[|type|]; -// } else { -// t.[|type|]; -// } - - - - -// === findAllReferences === -// === /findAllRefsUnionProperty.ts === - -// type T = -// | { [|type|]: "a", prop: number } -// | { [|type|]: "b", prop: string }; -// const tt: T = { -// [|type|]: "a", -// prop: 0, -// }; -// declare const t: T; -// if (t.[|type|] === "a") { -// t./*FIND ALL REFS*/[|type|]; -// } else { -// t.[|type|]; -// } - - - - -// === findAllReferences === -// === /findAllRefsUnionProperty.ts === - -// type T = -// | { [|type|]: "a", prop: number } -// | { [|type|]: "b", prop: string }; -// const tt: T = { -// [|type|]: "a", -// prop: 0, -// }; -// declare const t: T; -// if (t.[|type|] === "a") { -// t.[|type|]; -// } else { -// t./*FIND ALL REFS*/[|type|]; -// } - - - - -// === findAllReferences === -// === /findAllRefsUnionProperty.ts === - -// type T = -// | { [|type|]: "a", prop: number } -// | { type: "b", prop: string }; -// const tt: T = { -// /*FIND ALL REFS*/[|type|]: "a", -// prop: 0, -// }; -// declare const t: T; -// if (t.[|type|] === "a") { -// t.[|type|]; -// } else { -// t.type; -// } - - - - -// === findAllReferences === -// === /findAllRefsUnionProperty.ts === - -// type T = -// | { type: "a", /*FIND ALL REFS*/[|prop|]: number } -// | { type: "b", [|prop|]: string }; -// const tt: T = { -// type: "a", -// [|prop|]: 0, -// }; -// declare const t: T; -// if (t.type === "a") { -// // --- (line: 10) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsUnionProperty.ts === - -// type T = -// | { type: "a", [|prop|]: number } -// | { type: "b", /*FIND ALL REFS*/[|prop|]: string }; -// const tt: T = { -// type: "a", -// [|prop|]: 0, -// }; -// declare const t: T; -// if (t.type === "a") { -// // --- (line: 10) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsUnionProperty.ts === - -// type T = -// | { type: "a", [|prop|]: number } -// | { type: "b", prop: string }; -// const tt: T = { -// type: "a", -// /*FIND ALL REFS*/[|prop|]: 0, -// }; -// declare const t: T; -// if (t.type === "a") { -// // --- (line: 10) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnresolvedSymbols1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnresolvedSymbols1.baseline.jsonc deleted file mode 100644 index af8ae38dbe..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnresolvedSymbols1.baseline.jsonc +++ /dev/null @@ -1,126 +0,0 @@ -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols1.ts === - -// let a: /*FIND ALL REFS*/[|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: Bar.X; -// let e: Bar.X; -// let f: Bar.X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols1.ts === - -// let a: [|Bar|]; -// let b: /*FIND ALL REFS*/[|Bar|]; -// let c: [|Bar|]; -// let d: Bar.X; -// let e: Bar.X; -// let f: Bar.X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols1.ts === - -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: /*FIND ALL REFS*/[|Bar|]; -// let d: Bar.X; -// let e: Bar.X; -// let f: Bar.X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols1.ts === - -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: /*FIND ALL REFS*/[|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols1.ts === - -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: [|Bar|].X; -// let e: /*FIND ALL REFS*/[|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols1.ts === - -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: /*FIND ALL REFS*/[|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols1.ts === - -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: Bar./*FIND ALL REFS*/[|X|]; -// let e: Bar.[|X|]; -// let f: Bar.X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols1.ts === - -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: Bar.[|X|]; -// let e: Bar./*FIND ALL REFS*/[|X|]; -// let f: Bar.X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols1.ts === - -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: Bar.X; -// let e: Bar.X; -// let f: Bar./*FIND ALL REFS*/[|X|].Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols1.ts === - -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: Bar.X; -// let e: Bar.X; -// let f: Bar.X./*FIND ALL REFS*/[|Y|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnresolvedSymbols2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnresolvedSymbols2.baseline.jsonc deleted file mode 100644 index 4835af1a9a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnresolvedSymbols2.baseline.jsonc +++ /dev/null @@ -1,155 +0,0 @@ -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// import { /*FIND ALL REFS*/[|Bar|] } from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// import { [|Bar|] } from "does-not-exist"; -// -// let a: /*FIND ALL REFS*/[|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// import { [|Bar|] } from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: /*FIND ALL REFS*/[|Bar|]; -// let c: [|Bar|]; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// import { [|Bar|] } from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: /*FIND ALL REFS*/[|Bar|]; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// import { [|Bar|] } from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: /*FIND ALL REFS*/[|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// import { [|Bar|] } from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: [|Bar|].X; -// let e: /*FIND ALL REFS*/[|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// import { [|Bar|] } from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: /*FIND ALL REFS*/[|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// import { Bar } from "does-not-exist"; -// -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: Bar./*FIND ALL REFS*/[|X|]; -// let e: Bar.[|X|]; -// let f: Bar.X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// import { Bar } from "does-not-exist"; -// -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: Bar.[|X|]; -// let e: Bar./*FIND ALL REFS*/[|X|]; -// let f: Bar.X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// --- (line: 4) skipped --- -// let c: Bar; -// let d: Bar.X; -// let e: Bar.X; -// let f: Bar./*FIND ALL REFS*/[|X|].Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols2.ts === - -// --- (line: 4) skipped --- -// let c: Bar; -// let d: Bar.X; -// let e: Bar.X; -// let f: Bar.X./*FIND ALL REFS*/[|Y|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnresolvedSymbols3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnresolvedSymbols3.baseline.jsonc deleted file mode 100644 index 68a4f7d54e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsUnresolvedSymbols3.baseline.jsonc +++ /dev/null @@ -1,155 +0,0 @@ -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// import * as /*FIND ALL REFS*/[|Bar|] from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// import * as [|Bar|] from "does-not-exist"; -// -// let a: /*FIND ALL REFS*/[|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// import * as [|Bar|] from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: /*FIND ALL REFS*/[|Bar|]; -// let c: [|Bar|]; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// import * as [|Bar|] from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: /*FIND ALL REFS*/[|Bar|]; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// import * as [|Bar|] from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: /*FIND ALL REFS*/[|Bar|].X; -// let e: [|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// import * as [|Bar|] from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: [|Bar|].X; -// let e: /*FIND ALL REFS*/[|Bar|].X; -// let f: [|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// import * as [|Bar|] from "does-not-exist"; -// -// let a: [|Bar|]; -// let b: [|Bar|]; -// let c: [|Bar|]; -// let d: [|Bar|].X; -// let e: [|Bar|].X; -// let f: /*FIND ALL REFS*/[|Bar|].X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// import * as Bar from "does-not-exist"; -// -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: Bar./*FIND ALL REFS*/[|X|]; -// let e: Bar.[|X|]; -// let f: Bar.X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// import * as Bar from "does-not-exist"; -// -// let a: Bar; -// let b: Bar; -// let c: Bar; -// let d: Bar.[|X|]; -// let e: Bar./*FIND ALL REFS*/[|X|]; -// let f: Bar.X.Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// --- (line: 4) skipped --- -// let c: Bar; -// let d: Bar.X; -// let e: Bar.X; -// let f: Bar./*FIND ALL REFS*/[|X|].Y; - - - - -// === findAllReferences === -// === /findAllRefsUnresolvedSymbols3.ts === - -// --- (line: 4) skipped --- -// let c: Bar; -// let d: Bar.X; -// let e: Bar.X; -// let f: Bar.X./*FIND ALL REFS*/[|Y|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames1.baseline.jsonc deleted file mode 100644 index ba02337a95..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames1.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames1.ts === - -// class Foo { -// /*FIND ALL REFS*/public _bar() { return 0; } -// } -// -// var x: Foo; -// x._bar; - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames1.ts === - -// class Foo { -// public /*FIND ALL REFS*/[|_bar|]() { return 0; } -// } -// -// var x: Foo; -// x.[|_bar|]; - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames1.ts === - -// class Foo { -// public [|_bar|]() { return 0; } -// } -// -// var x: Foo; -// x./*FIND ALL REFS*/[|_bar|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames2.baseline.jsonc deleted file mode 100644 index b31db41b2f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames2.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames2.ts === - -// class Foo { -// /*FIND ALL REFS*/public __bar() { return 0; } -// } -// -// var x: Foo; -// x.__bar; - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames2.ts === - -// class Foo { -// public /*FIND ALL REFS*/[|__bar|]() { return 0; } -// } -// -// var x: Foo; -// x.[|__bar|]; - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames2.ts === - -// class Foo { -// public [|__bar|]() { return 0; } -// } -// -// var x: Foo; -// x./*FIND ALL REFS*/[|__bar|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames3.baseline.jsonc deleted file mode 100644 index 0562f71fd3..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames3.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames3.ts === - -// class Foo { -// /*FIND ALL REFS*/public ___bar() { return 0; } -// } -// -// var x: Foo; -// x.___bar; - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames3.ts === - -// class Foo { -// public /*FIND ALL REFS*/[|___bar|]() { return 0; } -// } -// -// var x: Foo; -// x.[|___bar|]; - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames3.ts === - -// class Foo { -// public [|___bar|]() { return 0; } -// } -// -// var x: Foo; -// x./*FIND ALL REFS*/[|___bar|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames4.baseline.jsonc deleted file mode 100644 index 9c84a00083..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames4.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames4.ts === - -// class Foo { -// /*FIND ALL REFS*/public ____bar() { return 0; } -// } -// -// var x: Foo; -// x.____bar; - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames4.ts === - -// class Foo { -// public /*FIND ALL REFS*/[|____bar|]() { return 0; } -// } -// -// var x: Foo; -// x.[|____bar|]; - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames4.ts === - -// class Foo { -// public [|____bar|]() { return 0; } -// } -// -// var x: Foo; -// x./*FIND ALL REFS*/[|____bar|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames5.baseline.jsonc deleted file mode 100644 index cfa0dcde5e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames5.baseline.jsonc +++ /dev/null @@ -1,49 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames5.ts === - -// class Foo { -// public _bar; -// public __bar; -// /*FIND ALL REFS*/public ___bar; -// public ____bar; -// } -// -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames5.ts === - -// class Foo { -// public _bar; -// public __bar; -// public /*FIND ALL REFS*/[|___bar|]; -// public ____bar; -// } -// -// var x: Foo; -// x._bar; -// x.__bar; -// x.[|___bar|]; -// x.____bar; - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames5.ts === - -// class Foo { -// public _bar; -// public __bar; -// public [|___bar|]; -// public ____bar; -// } -// -// var x: Foo; -// x._bar; -// x.__bar; -// x./*FIND ALL REFS*/[|___bar|]; -// x.____bar; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames6.baseline.jsonc deleted file mode 100644 index f74c6d36dc..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames6.baseline.jsonc +++ /dev/null @@ -1,48 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames6.ts === - -// class Foo { -// public _bar; -// /*FIND ALL REFS*/public __bar; -// public ___bar; -// public ____bar; -// } -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames6.ts === - -// class Foo { -// public _bar; -// public /*FIND ALL REFS*/[|__bar|]; -// public ___bar; -// public ____bar; -// } -// -// var x: Foo; -// x._bar; -// x.[|__bar|]; -// x.___bar; -// x.____bar; - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames6.ts === - -// class Foo { -// public _bar; -// public [|__bar|]; -// public ___bar; -// public ____bar; -// } -// -// var x: Foo; -// x._bar; -// x./*FIND ALL REFS*/[|__bar|]; -// x.___bar; -// x.____bar; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames7.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames7.baseline.jsonc deleted file mode 100644 index cb0a555584..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames7.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames7.ts === - -// /*FIND ALL REFS*/function __foo() { -// __foo(); -// } - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames7.ts === - -// function /*FIND ALL REFS*/[|__foo|]() { -// [|__foo|](); -// } - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames7.ts === - -// function [|__foo|]() { -// /*FIND ALL REFS*/[|__foo|](); -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames8.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames8.baseline.jsonc deleted file mode 100644 index 71af0eec08..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames8.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames8.ts === - -// (/*FIND ALL REFS*/function __foo() { -// __foo(); -// }) - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames8.ts === - -// (function /*FIND ALL REFS*/__foo() { -// [|__foo|](); -// }) - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames8.ts === - -// (function __foo() { -// /*FIND ALL REFS*/[|__foo|](); -// }) diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames9.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames9.baseline.jsonc deleted file mode 100644 index 91680e3b4f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithLeadingUnderscoreNames9.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames9.ts === - -// (/*FIND ALL REFS*/function ___foo() { -// ___foo(); -// }) - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames9.ts === - -// (function /*FIND ALL REFS*/___foo() { -// [|___foo|](); -// }) - - - - -// === findAllReferences === -// === /findAllRefsWithLeadingUnderscoreNames9.ts === - -// (function ___foo() { -// /*FIND ALL REFS*/[|___foo|](); -// }) diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithShorthandPropertyAssignment.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithShorthandPropertyAssignment.baseline.jsonc deleted file mode 100644 index 77400fcc7d..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithShorthandPropertyAssignment.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithShorthandPropertyAssignment.ts === - -// var /*FIND ALL REFS*/[|name|] = "Foo"; -// -// var obj = { name }; -// var obj1 = { name: name }; -// obj.name; - - - - -// === findAllReferences === -// === /findAllRefsWithShorthandPropertyAssignment.ts === - -// var name = "Foo"; -// -// var obj = { [|name|] }; -// var obj1 = { name: /*FIND ALL REFS*/[|name|] }; -// obj.name; - - - - -// === findAllReferences === -// === /findAllRefsWithShorthandPropertyAssignment.ts === - -// var name = "Foo"; -// -// var obj = { /*FIND ALL REFS*/[|name|] }; -// var obj1 = { name: [|name|] }; -// obj.[|name|]; - - - - -// === findAllReferences === -// === /findAllRefsWithShorthandPropertyAssignment.ts === - -// var name = "Foo"; -// -// var obj = { name }; -// var obj1 = { /*FIND ALL REFS*/[|name|]: name }; -// obj.name; - - - - -// === findAllReferences === -// === /findAllRefsWithShorthandPropertyAssignment.ts === - -// var name = "Foo"; -// -// var obj = { [|name|] }; -// var obj1 = { name: name }; -// obj./*FIND ALL REFS*/[|name|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithShorthandPropertyAssignment2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithShorthandPropertyAssignment2.baseline.jsonc deleted file mode 100644 index 4120f135f2..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWithShorthandPropertyAssignment2.baseline.jsonc +++ /dev/null @@ -1,53 +0,0 @@ -// === findAllReferences === -// === /findAllRefsWithShorthandPropertyAssignment2.ts === - -// var /*FIND ALL REFS*/[|dx|] = "Foo"; -// -// module M { export var dx; } -// module M { -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /findAllRefsWithShorthandPropertyAssignment2.ts === - -// var dx = "Foo"; -// -// module M { export var /*FIND ALL REFS*/[|dx|]; } -// module M { -// var z = 100; -// export var y = { [|dx|], z }; -// } -// M.y.dx; - - - - -// === findAllReferences === -// === /findAllRefsWithShorthandPropertyAssignment2.ts === - -// var dx = "Foo"; -// -// module M { export var [|dx|]; } -// module M { -// var z = 100; -// export var y = { /*FIND ALL REFS*/[|dx|], z }; -// } -// M.y.[|dx|]; - - - - -// === findAllReferences === -// === /findAllRefsWithShorthandPropertyAssignment2.ts === - -// var dx = "Foo"; -// -// module M { export var dx; } -// module M { -// var z = 100; -// export var y = { [|dx|], z }; -// } -// M.y./*FIND ALL REFS*/[|dx|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWriteAccess.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWriteAccess.baseline.jsonc deleted file mode 100644 index 300d3ee7c6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsWriteAccess.baseline.jsonc +++ /dev/null @@ -1,20 +0,0 @@ -// === findAllReferences === -// === /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|]`]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_importType_js4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_importType_js4.baseline.jsonc deleted file mode 100644 index 682b1894ec..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_importType_js4.baseline.jsonc +++ /dev/null @@ -1,14 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// /** -// * @callback /*FIND ALL REFS*/[|A|] -// * @param {unknown} response -// */ -// -// module.exports = {}; - - -// === /b.js === - -// /** @typedef {import("./a").[|A|]} A */ diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_importType_meaningAtLocation.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_importType_meaningAtLocation.baseline.jsonc deleted file mode 100644 index f325d43d5b..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_importType_meaningAtLocation.baseline.jsonc +++ /dev/null @@ -1,74 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// /*FIND ALL REFS*/export type T = 0; -// export const T = 0; - - - - -// === findAllReferences === -// === /a.ts === - -// export type /*FIND ALL REFS*/[|T|] = 0; -// export const T = 0; - - -// === /b.ts === - -// const x: import("./a").[|T|] = 0; -// const x: typeof import("./a").T = 0; - - - - -// === findAllReferences === -// === /a.ts === - -// export type T = 0; -// /*FIND ALL REFS*/export const T = 0; - - - - -// === findAllReferences === -// === /a.ts === - -// export type T = 0; -// export const /*FIND ALL REFS*/[|T|] = 0; - - -// === /b.ts === - -// const x: import("./a").T = 0; -// const x: typeof import("./a").[|T|] = 0; - - - - -// === findAllReferences === -// === /a.ts === - -// export type [|T|] = 0; -// export const T = 0; - - -// === /b.ts === - -// const x: import("./a")./*FIND ALL REFS*/[|T|] = 0; -// const x: typeof import("./a").T = 0; - - - - -// === findAllReferences === -// === /a.ts === - -// export type T = 0; -// export const [|T|] = 0; - - -// === /b.ts === - -// const x: import("./a").T = 0; -// const x: typeof import("./a")./*FIND ALL REFS*/[|T|] = 0; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_importType_named.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_importType_named.baseline.jsonc deleted file mode 100644 index 7c6dd58ef0..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_importType_named.baseline.jsonc +++ /dev/null @@ -1,74 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// /*FIND ALL REFS*/export type T = number; -// export type U = string; - - - - -// === findAllReferences === -// === /a.ts === - -// export type /*FIND ALL REFS*/[|T|] = number; -// export type U = string; - - -// === /b.ts === - -// const x: import("./a").[|T|] = 0; -// const x: import("./a").U = 0; - - - - -// === findAllReferences === -// === /a.ts === - -// export type T = number; -// /*FIND ALL REFS*/export type U = string; - - - - -// === findAllReferences === -// === /a.ts === - -// export type T = number; -// export type /*FIND ALL REFS*/[|U|] = string; - - -// === /b.ts === - -// const x: import("./a").T = 0; -// const x: import("./a").[|U|] = 0; - - - - -// === findAllReferences === -// === /a.ts === - -// export type [|T|] = number; -// export type U = string; - - -// === /b.ts === - -// const x: import("./a")./*FIND ALL REFS*/[|T|] = 0; -// const x: import("./a").U = 0; - - - - -// === findAllReferences === -// === /a.ts === - -// export type T = number; -// export type [|U|] = string; - - -// === /b.ts === - -// const x: import("./a").T = 0; -// const x: import("./a")./*FIND ALL REFS*/[|U|] = 0; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_jsEnum.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_jsEnum.baseline.jsonc deleted file mode 100644 index cfa4b6cff1..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefs_jsEnum.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// /** @enum {string} */ -// /*FIND ALL REFS*/const E = { A: "" }; -// E["A"]; -// /** @type {E} */ -// const e = E.A; - - - - -// === findAllReferences === -// === /a.js === - -// /** @enum {string} */ -// const /*FIND ALL REFS*/[|E|] = { A: "" }; -// [|E|]["A"]; -// /** @type {E} */ -// const e = [|E|].A; - - - - -// === findAllReferences === -// === /a.js === - -// /** @enum {string} */ -// const [|E|] = { A: "" }; -// /*FIND ALL REFS*/[|E|]["A"]; -// /** @type {E} */ -// const e = [|E|].A; - - - - -// === findAllReferences === -// === /a.js === - -// /** @enum {string} */ -// const E = { A: "" }; -// E["A"]; -// /** @type {/*FIND ALL REFS*/[|E|]} */ -// const e = E.A; - - - - -// === findAllReferences === -// === /a.js === - -// /** @enum {string} */ -// const [|E|] = { A: "" }; -// [|E|]["A"]; -// /** @type {E} */ -// const e = /*FIND ALL REFS*/[|E|].A; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesAcrossMultipleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindReferencesAcrossMultipleProjects.baseline.jsonc deleted file mode 100644 index 9a4915ae42..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesAcrossMultipleProjects.baseline.jsonc +++ /dev/null @@ -1,64 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// /*FIND ALL REFS*/var x: number; - - - - -// === findAllReferences === -// === /a.ts === - -// var /*FIND ALL REFS*/[|x|]: number; - - -// === /b.ts === - -// /// -// [|x|]++; - - -// === /c.ts === - -// /// -// [|x|]++; - - - - -// === findAllReferences === -// === /a.ts === - -// var [|x|]: number; - - -// === /b.ts === - -// /// -// /*FIND ALL REFS*/[|x|]++; - - -// === /c.ts === - -// /// -// [|x|]++; - - - - -// === findAllReferences === -// === /a.ts === - -// var [|x|]: number; - - -// === /b.ts === - -// /// -// [|x|]++; - - -// === /c.ts === - -// /// -// /*FIND ALL REFS*/[|x|]++; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesDefinitionDisplayParts.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindReferencesDefinitionDisplayParts.baseline.jsonc deleted file mode 100644 index 172064d933..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesDefinitionDisplayParts.baseline.jsonc +++ /dev/null @@ -1,50 +0,0 @@ -// === findAllReferences === -// === /findReferencesDefinitionDisplayParts.ts === - -// class [|Gre/*FIND ALL REFS*/eter|] { -// someFunction() { this; } -// } -// -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /findReferencesDefinitionDisplayParts.ts === - -// class Greeter { -// someFunction() { [|th/*FIND ALL REFS*/is|]; } -// } -// -// type Options = "option 1" | "option 2"; -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /findReferencesDefinitionDisplayParts.ts === - -// class Greeter { -// someFunction() { this; } -// } -// -// type Options = "opt/*FIND ALL REFS*/ion 1" | "option 2"; -// let myOption: Options = "option 1"; -// -// someLabel: -// break someLabel; - - - - -// === findAllReferences === -// === /findReferencesDefinitionDisplayParts.ts === - -// --- (line: 4) skipped --- -// type Options = "option 1" | "option 2"; -// let myOption: Options = "option 1"; -// -// [|some/*FIND ALL REFS*/Label|]: -// break [|someLabel|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesJSXTagName.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindReferencesJSXTagName.baseline.jsonc deleted file mode 100644 index 7f54fb06bd..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesJSXTagName.baseline.jsonc +++ /dev/null @@ -1,32 +0,0 @@ -// === findAllReferences === -// === /RedditSubmission.ts === - -// export const [|SubmissionComp|] = (submission: SubmissionProps) => -//
; - - -// === /index.tsx === - -// import { /*FIND ALL REFS*/[|SubmissionComp|] } from "./RedditSubmission" -// function displaySubreddit(subreddit: string) { -// let components = submissions -// .map((value, index) => <[|SubmissionComp|] key={ index } elementPosition= { index } {...value.data} />); -// } - - - - -// === findAllReferences === -// === /RedditSubmission.ts === - -// export const /*FIND ALL REFS*/[|SubmissionComp|] = (submission: SubmissionProps) => -//
; - - -// === /index.tsx === - -// import { [|SubmissionComp|] } from "./RedditSubmission" -// function displaySubreddit(subreddit: string) { -// let components = submissions -// .map((value, index) => <[|SubmissionComp|] key={ index } elementPosition= { index } {...value.data} />); -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesJSXTagName2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindReferencesJSXTagName2.baseline.jsonc deleted file mode 100644 index 947ecdadfa..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesJSXTagName2.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === findAllReferences === -// === /index.tsx === - -// /*FIND ALL REFS*/const obj = {Component: () =>
}; -// const element = ; - - - - -// === findAllReferences === -// === /index.tsx === - -// const /*FIND ALL REFS*/[|obj|] = {Component: () =>
}; -// const element = <[|obj|].Component/>; - - - - -// === findAllReferences === -// === /index.tsx === - -// const [|obj|] = {Component: () =>
}; -// const element = ; diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesSeeTagInTs.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindReferencesSeeTagInTs.baseline.jsonc deleted file mode 100644 index ed5dda1692..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesSeeTagInTs.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === findAllReferences === -// === /findReferencesSeeTagInTs.ts === - -// function [|doStuffWithStuff|]/*FIND ALL REFS*/(stuff: { quantity: number }) {} -// -// declare const stuff: { quantity: number }; -// /** @see {[|doStuffWithStuff|]} */ -// if (stuff.quantity) {} diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfArrowFunction.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfArrowFunction.baseline.jsonc deleted file mode 100644 index c2196d70e8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfArrowFunction.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfArrowFunction.ts === - -// /*FIND ALL REFS*/var f = x => x + 1; -// f(12); - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfArrowFunction.ts === - -// var /*FIND ALL REFS*/[|f|] = x => x + 1; -// [|f|](12); - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfArrowFunction.ts === - -// var [|f|] = x => x + 1; -// /*FIND ALL REFS*/[|f|](12); diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfBindingPattern.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfBindingPattern.baseline.jsonc deleted file mode 100644 index c7b8e2bd4f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfBindingPattern.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfBindingPattern.ts === - -// const { /*FIND ALL REFS*/[|x|], y } = { [|x|]: 1, y: 2 }; -// const z = [|x|]; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfBindingPattern.ts === - -// const { [|x|], y } = { /*FIND ALL REFS*/[|x|]: 1, y: 2 }; -// const z = x; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfBindingPattern.ts === - -// const { [|x|], y } = { x: 1, y: 2 }; -// const z = /*FIND ALL REFS*/[|x|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfClass.baseline.jsonc deleted file mode 100644 index 83e511eeb7..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfClass.baseline.jsonc +++ /dev/null @@ -1,36 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfClass.ts === - -// /*FIND ALL REFS*/class C { -// n: number; -// constructor() { -// this.n = 12; -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfClass.ts === - -// class /*FIND ALL REFS*/[|C|] { -// n: number; -// constructor() { -// this.n = 12; -// } -// } -// let c = new [|C|](); - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfClass.ts === - -// class [|C|] { -// n: number; -// constructor() { -// this.n = 12; -// } -// } -// let c = new /*FIND ALL REFS*/[|C|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfComputedProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfComputedProperty.baseline.jsonc deleted file mode 100644 index 9d3da828f6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfComputedProperty.baseline.jsonc +++ /dev/null @@ -1,36 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfComputedProperty.ts === - -// let o = { /*FIND ALL REFS*/["foo"]: 12 }; -// let y = o.foo; -// let z = o['foo']; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfComputedProperty.ts === - -// let o = { ["/*FIND ALL REFS*/[|foo|]"]: 12 }; -// let y = o.[|foo|]; -// let z = o['[|foo|]']; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfComputedProperty.ts === - -// let o = { ["[|foo|]"]: 12 }; -// let y = o./*FIND ALL REFS*/[|foo|]; -// let z = o['[|foo|]']; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfComputedProperty.ts === - -// let o = { ["[|foo|]"]: 12 }; -// let y = o.[|foo|]; -// let z = o['/*FIND ALL REFS*/[|foo|]']; diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfEnum.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfEnum.baseline.jsonc deleted file mode 100644 index 5baafb9571..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfEnum.baseline.jsonc +++ /dev/null @@ -1,32 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfEnum.ts === - -// /*FIND ALL REFS*/enum E { -// First, -// Second -// } -// let first = E.First; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfEnum.ts === - -// enum /*FIND ALL REFS*/[|E|] { -// First, -// Second -// } -// let first = [|E|].First; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfEnum.ts === - -// enum [|E|] { -// First, -// Second -// } -// let first = /*FIND ALL REFS*/[|E|].First; diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfExport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfExport.baseline.jsonc deleted file mode 100644 index cd5e4c32f9..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfExport.baseline.jsonc +++ /dev/null @@ -1,24 +0,0 @@ -// === findAllReferences === -// === /m.ts === - -// export var /*FIND ALL REFS*/[|x|] = 12; - - -// === /main.ts === - -// import { [|x|] } from "./m"; -// const y = [|x|]; - - - - -// === findAllReferences === -// === /m.ts === - -// export var [|x|] = 12; - - -// === /main.ts === - -// import { /*FIND ALL REFS*/[|x|] } from "./m"; -// const y = [|x|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfFunction.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfFunction.baseline.jsonc deleted file mode 100644 index ac9673eefd..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfFunction.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfFunction.ts === - -// /*FIND ALL REFS*/function func(x: number) { -// } -// func(x) - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfFunction.ts === - -// function /*FIND ALL REFS*/[|func|](x: number) { -// } -// [|func|](x) - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfFunction.ts === - -// function [|func|](x: number) { -// } -// /*FIND ALL REFS*/[|func|](x) diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfInterface.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfInterface.baseline.jsonc deleted file mode 100644 index c16b6adc4a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfInterface.baseline.jsonc +++ /dev/null @@ -1,29 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterface.ts === - -// /*FIND ALL REFS*/interface I { -// p: number; -// } -// let i: I = { p: 12 }; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterface.ts === - -// interface /*FIND ALL REFS*/[|I|] { -// p: number; -// } -// let i: [|I|] = { p: 12 }; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterface.ts === - -// interface [|I|] { -// p: number; -// } -// let i: /*FIND ALL REFS*/[|I|] = { p: 12 }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfInterfaceClassMerge.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfInterfaceClassMerge.baseline.jsonc deleted file mode 100644 index a71eb71d6e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfInterfaceClassMerge.baseline.jsonc +++ /dev/null @@ -1,139 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === - -// /*FIND ALL REFS*/interface Numbers { -// p: number; -// } -// interface Numbers { -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === - -// interface /*FIND ALL REFS*/[|Numbers|] { -// p: number; -// } -// interface [|Numbers|] { -// m: number; -// } -// class [|Numbers|] { -// f(n: number) { -// return this.p + this.m + n; -// } -// } -// let i: [|Numbers|] = new [|Numbers|](); -// let x = i.f(i.p + i.m); - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === - -// interface Numbers { -// p: number; -// } -// /*FIND ALL REFS*/interface Numbers { -// m: number; -// } -// class Numbers { -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === - -// interface [|Numbers|] { -// p: number; -// } -// interface /*FIND ALL REFS*/[|Numbers|] { -// m: number; -// } -// class [|Numbers|] { -// f(n: number) { -// return this.p + this.m + n; -// } -// } -// let i: [|Numbers|] = new [|Numbers|](); -// let x = i.f(i.p + i.m); - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === - -// --- (line: 3) skipped --- -// interface Numbers { -// m: number; -// } -// /*FIND ALL REFS*/class Numbers { -// f(n: number) { -// return this.p + this.m + n; -// } -// // --- (line: 11) skipped --- - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === - -// interface [|Numbers|] { -// p: number; -// } -// interface [|Numbers|] { -// m: number; -// } -// class /*FIND ALL REFS*/[|Numbers|] { -// f(n: number) { -// return this.p + this.m + n; -// } -// } -// let i: [|Numbers|] = new [|Numbers|](); -// let x = i.f(i.p + i.m); - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === - -// interface [|Numbers|] { -// p: number; -// } -// interface [|Numbers|] { -// m: number; -// } -// class [|Numbers|] { -// f(n: number) { -// return this.p + this.m + n; -// } -// } -// let i: /*FIND ALL REFS*/[|Numbers|] = new [|Numbers|](); -// let x = i.f(i.p + i.m); - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === - -// interface [|Numbers|] { -// p: number; -// } -// interface [|Numbers|] { -// m: number; -// } -// class [|Numbers|] { -// f(n: number) { -// return this.p + this.m + n; -// } -// } -// let i: [|Numbers|] = new /*FIND ALL REFS*/[|Numbers|](); -// let x = i.f(i.p + i.m); diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfNamespace.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfNamespace.baseline.jsonc deleted file mode 100644 index 57cd264bec..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfNamespace.baseline.jsonc +++ /dev/null @@ -1,29 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfNamespace.ts === - -// /*FIND ALL REFS*/namespace Numbers { -// export var n = 12; -// } -// let x = Numbers.n + 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfNamespace.ts === - -// namespace /*FIND ALL REFS*/[|Numbers|] { -// export var n = 12; -// } -// let x = [|Numbers|].n + 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfNamespace.ts === - -// namespace [|Numbers|] { -// export var n = 12; -// } -// let x = /*FIND ALL REFS*/[|Numbers|].n + 1; diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfNumberNamedProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfNumberNamedProperty.baseline.jsonc deleted file mode 100644 index a0531f2db8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfNumberNamedProperty.baseline.jsonc +++ /dev/null @@ -1,14 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfNumberNamedProperty.ts === - -// let o = { /*FIND ALL REFS*/[|1|]: 12 }; -// let y = o[[|1|]]; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfNumberNamedProperty.ts === - -// let o = { [|1|]: 12 }; -// let y = o[/*FIND ALL REFS*/[|1|]]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfParameter.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfParameter.baseline.jsonc deleted file mode 100644 index 151e123cc8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfParameter.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfParameter.ts === - -// function f(/*FIND ALL REFS*/[|x|]: number) { -// return [|x|] + 1 -// } - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfParameter.ts === - -// function f([|x|]: number) { -// return /*FIND ALL REFS*/[|x|] + 1 -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfStringNamedProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfStringNamedProperty.baseline.jsonc deleted file mode 100644 index 3cfbe8fd34..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfStringNamedProperty.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfStringNamedProperty.ts === - -// let o = { /*FIND ALL REFS*/"[|x|]": 12 }; -// let y = o.[|x|]; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfStringNamedProperty.ts === - -// let o = { "/*FIND ALL REFS*/[|x|]": 12 }; -// let y = o.[|x|]; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfStringNamedProperty.ts === - -// let o = { "[|x|]": 12 }; -// let y = o./*FIND ALL REFS*/[|x|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfTypeAlias.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfTypeAlias.baseline.jsonc deleted file mode 100644 index de35e8d0ed..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfTypeAlias.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfTypeAlias.ts === - -// /*FIND ALL REFS*/type Alias= number; -// let n: Alias = 12; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfTypeAlias.ts === - -// type /*FIND ALL REFS*/[|Alias|]= number; -// let n: [|Alias|] = 12; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfTypeAlias.ts === - -// type [|Alias|]= number; -// let n: /*FIND ALL REFS*/[|Alias|] = 12; diff --git a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfVariable.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfVariable.baseline.jsonc deleted file mode 100644 index 35e18bfa6b..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/GetOccurrencesIsDefinitionOfVariable.baseline.jsonc +++ /dev/null @@ -1,368 +0,0 @@ -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// /*FIND ALL REFS*/var x = 0; -// var assignmentRightHandSide = x; -// var assignmentRightHandSide2 = 1 + x; -// -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var /*FIND ALL REFS*/[|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = /*FIND ALL REFS*/[|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + /*FIND ALL REFS*/[|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// /*FIND ALL REFS*/[|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// /*FIND ALL REFS*/[|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = /*FIND ALL REFS*/[|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + /*FIND ALL REFS*/[|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// /*FIND ALL REFS*/[|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// /*FIND ALL REFS*/[|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++/*FIND ALL REFS*/[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = /*FIND ALL REFS*/[|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --/*FIND ALL REFS*/[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = /*FIND ALL REFS*/[|x|]--; -// -// [|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// /*FIND ALL REFS*/[|x|] += 1; -// [|x|] <<= 1; - - - - -// === findAllReferences === -// === /getOccurrencesIsDefinitionOfVariable.ts === - -// var [|x|] = 0; -// var assignmentRightHandSide = [|x|]; -// var assignmentRightHandSide2 = 1 + [|x|]; -// -// [|x|] = 1; -// [|x|] = [|x|] + [|x|]; -// -// [|x|] == 1; -// [|x|] <= 1; -// -// var preIncrement = ++[|x|]; -// var postIncrement = [|x|]++; -// var preDecrement = --[|x|]; -// var postDecrement = [|x|]--; -// -// [|x|] += 1; -// /*FIND ALL REFS*/[|x|] <<= 1; diff --git a/testdata/baselines/reference/fourslash/findAllRef/IndirectJsRequireRename.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/IndirectJsRequireRename.baseline.jsonc deleted file mode 100644 index 86fb5ab3c9..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/IndirectJsRequireRename.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === findAllReferences === -// === /lib/classes/Error.js === - -// module.exports.[|logWarning|] = message => { }; - - -// === /bin/serverless.js === - -// require('../lib/classes/Error').log/*FIND ALL REFS*/Warning(`CLI triage crashed with: ${error.stack}`); diff --git a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionAcrossGlobalProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionAcrossGlobalProjects.baseline.jsonc deleted file mode 100644 index 932acf04e3..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionAcrossGlobalProjects.baseline.jsonc +++ /dev/null @@ -1,138 +0,0 @@ -// === findAllReferences === -// === /home/src/workspaces/project/a/index.ts === - -// namespace NS { -// export function /*FIND ALL REFS*/[|FA|]() { -// FB(); -// } -// } -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /home/src/workspaces/project/a/index.ts === - -// --- (line: 3) skipped --- -// } -// } -// -// interface /*FIND ALL REFS*/[|I|] { -// FA(); -// } -// -// const ia: [|I|] = { -// FA() { }, -// FB() { }, -// FC() { }, -// }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/a/index.ts === - -// --- (line: 4) skipped --- -// } -// -// interface I { -// /*FIND ALL REFS*/[|FA|](); -// } -// -// const ia: I = { -// [|FA|]() { }, -// FB() { }, -// FC() { }, -// }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/b/index.ts === - -// namespace NS { -// export function /*FIND ALL REFS*/[|FB|]() {} -// } -// -// interface I { -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /home/src/workspaces/project/b/index.ts === - -// namespace NS { -// export function FB() {} -// } -// -// interface /*FIND ALL REFS*/[|I|] { -// FB(); -// } -// -// const ib: [|I|] = { FB() {} }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/b/index.ts === - -// namespace NS { -// export function FB() {} -// } -// -// interface I { -// /*FIND ALL REFS*/[|FB|](); -// } -// -// const ib: I = { [|FB|]() {} }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/c/index.ts === - -// namespace NS { -// export function /*FIND ALL REFS*/[|FC|]() {} -// } -// -// interface I { -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /home/src/workspaces/project/c/index.ts === - -// namespace NS { -// export function FC() {} -// } -// -// interface /*FIND ALL REFS*/[|I|] { -// FC(); -// } -// -// const ic: [|I|] = { FC() {} }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/c/index.ts === - -// namespace NS { -// export function FC() {} -// } -// -// interface I { -// /*FIND ALL REFS*/[|FC|](); -// } -// -// const ic: I = { [|FC|]() {} }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionAcrossModuleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionAcrossModuleProjects.baseline.jsonc deleted file mode 100644 index 33e9870ae2..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionAcrossModuleProjects.baseline.jsonc +++ /dev/null @@ -1,254 +0,0 @@ -// === findAllReferences === -// === /home/src/workspaces/project/a/index.ts === - -// import { NS } from "../b"; -// import { I } from "../c"; -// -// declare module "../b" { -// export namespace NS { -// export function /*FIND ALL REFS*/[|FA|](); -// } -// } -// -// // --- (line: 10) skipped --- - - -// --- (line: 13) skipped --- -// } -// -// const ia: I = { -// FA: NS.[|FA|], -// FC() { }, -// }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/a/index.ts === - -// import { NS } from "../b"; -// import { [|I|] } from "../c"; -// -// declare module "../b" { -// export namespace NS { -// export function FA(); -// } -// } -// -// declare module "../c" { -// export interface /*FIND ALL REFS*/[|I|] { -// FA(); -// } -// } -// -// const ia: [|I|] = { -// FA: NS.FA, -// FC() { }, -// }; - - -// === /home/src/workspaces/project/c/index.ts === - -// export namespace NS { -// export function FC() {} -// } -// -// export interface [|I|] { -// FC(); -// } -// -// const ic: [|I|] = { FC() {} }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/a/index.ts === - -// --- (line: 8) skipped --- -// -// declare module "../c" { -// export interface I { -// /*FIND ALL REFS*/[|FA|](); -// } -// } -// -// const ia: I = { -// [|FA|]: NS.FA, -// FC() { }, -// }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/a2/index.ts === - -// import { NS } from "../b"; -// import { I } from "../c"; -// -// declare module "../b" { -// export namespace NS { -// export function /*FIND ALL REFS*/[|FA|](); -// } -// } -// -// // --- (line: 10) skipped --- - - -// --- (line: 13) skipped --- -// } -// -// const ia: I = { -// FA: NS.[|FA|], -// FC() { }, -// }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/a2/index.ts === - -// import { NS } from "../b"; -// import { [|I|] } from "../c"; -// -// declare module "../b" { -// export namespace NS { -// export function FA(); -// } -// } -// -// declare module "../c" { -// export interface /*FIND ALL REFS*/[|I|] { -// FA(); -// } -// } -// -// const ia: [|I|] = { -// FA: NS.FA, -// FC() { }, -// }; - - -// === /home/src/workspaces/project/c/index.ts === - -// export namespace NS { -// export function FC() {} -// } -// -// export interface [|I|] { -// FC(); -// } -// -// const ic: [|I|] = { FC() {} }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/a2/index.ts === - -// --- (line: 8) skipped --- -// -// declare module "../c" { -// export interface I { -// /*FIND ALL REFS*/[|FA|](); -// } -// } -// -// const ia: I = { -// [|FA|]: NS.FA, -// FC() { }, -// }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/b/index.ts === - -// export namespace NS { -// export function /*FIND ALL REFS*/[|FB|]() {} -// } -// -// export interface I { -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /home/src/workspaces/project/b/index.ts === - -// export namespace NS { -// export function FB() {} -// } -// -// export interface /*FIND ALL REFS*/[|I|] { -// FB(); -// } -// -// const ib: [|I|] = { FB() {} }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/b/index.ts === - -// export namespace NS { -// export function FB() {} -// } -// -// export interface I { -// /*FIND ALL REFS*/[|FB|](); -// } -// -// const ib: I = { [|FB|]() {} }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/c/index.ts === - -// export namespace NS { -// export function /*FIND ALL REFS*/[|FC|]() {} -// } -// -// export interface I { -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /home/src/workspaces/project/c/index.ts === - -// export namespace NS { -// export function FC() {} -// } -// -// export interface /*FIND ALL REFS*/[|I|] { -// FC(); -// } -// -// const ic: [|I|] = { FC() {} }; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/c/index.ts === - -// export namespace NS { -// export function FC() {} -// } -// -// export interface I { -// /*FIND ALL REFS*/[|FC|](); -// } -// -// const ic: I = { [|FC|]() {} }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionInterfaceImplementation.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionInterfaceImplementation.baseline.jsonc deleted file mode 100644 index 697d149847..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionInterfaceImplementation.baseline.jsonc +++ /dev/null @@ -1,30 +0,0 @@ -// === findAllReferences === -// === /isDefinitionInterfaceImplementation.ts === - -// interface I { -// /*FIND ALL REFS*/[|M|](): void; -// } -// -// class C implements I { -// [|M|]() { } -// } -// -// ({} as I).[|M|](); -// ({} as C).[|M|](); - - - - -// === findAllReferences === -// === /isDefinitionInterfaceImplementation.ts === - -// interface I { -// [|M|](): void; -// } -// -// class C implements I { -// /*FIND ALL REFS*/[|M|]() { } -// } -// -// ({} as I).[|M|](); -// ({} as C).[|M|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionOverloads.baseline.jsonc deleted file mode 100644 index b603465539..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionOverloads.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /isDefinitionOverloads.ts === - -// function /*FIND ALL REFS*/[|f|](x: number): void; -// function [|f|](x: string): void; -// function [|f|](x: number | string) { } -// -// [|f|](1); -// [|f|]("a"); - - - - -// === findAllReferences === -// === /isDefinitionOverloads.ts === - -// function [|f|](x: number): void; -// function /*FIND ALL REFS*/[|f|](x: string): void; -// function [|f|](x: number | string) { } -// -// [|f|](1); -// [|f|]("a"); - - - - -// === findAllReferences === -// === /isDefinitionOverloads.ts === - -// function [|f|](x: number): void; -// function [|f|](x: string): void; -// function /*FIND ALL REFS*/[|f|](x: number | string) { } -// -// [|f|](1); -// [|f|]("a"); diff --git a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionShorthandProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionShorthandProperty.baseline.jsonc deleted file mode 100644 index 6569db3419..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionShorthandProperty.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === findAllReferences === -// === /isDefinitionShorthandProperty.ts === - -// const /*FIND ALL REFS*/[|x|] = 1; -// const y: { x: number } = { [|x|] }; - - - - -// === findAllReferences === -// === /isDefinitionShorthandProperty.ts === - -// const x = 1; -// const y: { /*FIND ALL REFS*/[|x|]: number } = { [|x|] }; - - - - -// === findAllReferences === -// === /isDefinitionShorthandProperty.ts === - -// const [|x|] = 1; -// const y: { [|x|]: number } = { /*FIND ALL REFS*/[|x|] }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionSingleImport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionSingleImport.baseline.jsonc deleted file mode 100644 index 878b9e0df8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionSingleImport.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// export function /*FIND ALL REFS*/[|f|]() {} - - -// === /b.ts === - -// import { [|f|] } from "./a"; - - - - -// === findAllReferences === -// === /a.ts === - -// export function [|f|]() {} - - -// === /b.ts === - -// import { /*FIND ALL REFS*/[|f|] } from "./a"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionSingleReference.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionSingleReference.baseline.jsonc deleted file mode 100644 index a455d9410f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/IsDefinitionSingleReference.baseline.jsonc +++ /dev/null @@ -1,14 +0,0 @@ -// === findAllReferences === -// === /isDefinitionSingleReference.ts === - -// function /*FIND ALL REFS*/[|f|]() {} -// [|f|](); - - - - -// === findAllReferences === -// === /isDefinitionSingleReference.ts === - -// function [|f|]() {} -// /*FIND ALL REFS*/[|f|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/JsdocSatisfiesTagFindAllReferences.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/JsdocSatisfiesTagFindAllReferences.baseline.jsonc deleted file mode 100644 index 61bb95342c..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/JsdocSatisfiesTagFindAllReferences.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// /** -// * @typedef {Object} [|T|] -// * @property {number} a -// */ -// -// /** @satisfies {/*FIND ALL REFS*/[|T|]} comment */ -// const foo = { a: 1 }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/JsdocThrowsTag_findAllReferences.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/JsdocThrowsTag_findAllReferences.baseline.jsonc deleted file mode 100644 index c24f93ca06..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/JsdocThrowsTag_findAllReferences.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === findAllReferences === -// === /jsdocThrowsTag_findAllReferences.ts === - -// class /*FIND ALL REFS*/[|E|] extends Error {} -// /** -// * @throws {E} -// */ -// function f() {} diff --git a/testdata/baselines/reference/fourslash/findAllRef/JsdocTypedefTagSemanticMeaning0.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/JsdocTypedefTagSemanticMeaning0.baseline.jsonc deleted file mode 100644 index d632e331be..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/JsdocTypedefTagSemanticMeaning0.baseline.jsonc +++ /dev/null @@ -1,62 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// /** /*FIND ALL REFS*/@typedef {number} T */ -// const T = 1; -// /** @type {T} */ -// const n = T; - - - - -// === findAllReferences === -// === /a.js === - -// /** @typedef {number} /*FIND ALL REFS*/[|T|] */ -// const T = 1; -// /** @type {[|T|]} */ -// const n = T; - - - - -// === findAllReferences === -// === /a.js === - -// /** @typedef {number} T */ -// /*FIND ALL REFS*/const T = 1; -// /** @type {T} */ -// const n = T; - - - - -// === findAllReferences === -// === /a.js === - -// /** @typedef {number} T */ -// const /*FIND ALL REFS*/[|T|] = 1; -// /** @type {T} */ -// const n = [|T|]; - - - - -// === findAllReferences === -// === /a.js === - -// /** @typedef {number} [|T|] */ -// const T = 1; -// /** @type {/*FIND ALL REFS*/[|T|]} */ -// const n = T; - - - - -// === findAllReferences === -// === /a.js === - -// /** @typedef {number} T */ -// const [|T|] = 1; -// /** @type {T} */ -// const n = /*FIND ALL REFS*/[|T|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/JsdocTypedefTagSemanticMeaning1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/JsdocTypedefTagSemanticMeaning1.baseline.jsonc deleted file mode 100644 index 89a5c2918a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/JsdocTypedefTagSemanticMeaning1.baseline.jsonc +++ /dev/null @@ -1,40 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// /** @typedef {number} */ -// /*FIND ALL REFS*/const T = 1; -// /** @type {T} */ -// const n = T; - - - - -// === findAllReferences === -// === /a.js === - -// /** @typedef {number} */ -// const /*FIND ALL REFS*/[|T|] = 1; -// /** @type {T} */ -// const n = [|T|]; - - - - -// === findAllReferences === -// === /a.js === - -// /** @typedef {number} */ -// const T = 1; -// /** @type {/*FIND ALL REFS*/[|T|]} */ -// const n = T; - - - - -// === findAllReferences === -// === /a.js === - -// /** @typedef {number} */ -// const [|T|] = 1; -// /** @type {T} */ -// const n = /*FIND ALL REFS*/[|T|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferenceInParameterPropertyDeclaration.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferenceInParameterPropertyDeclaration.baseline.jsonc deleted file mode 100644 index 8733deae92..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferenceInParameterPropertyDeclaration.baseline.jsonc +++ /dev/null @@ -1,58 +0,0 @@ -// === findAllReferences === -// === /file1.ts === - -// class Foo { -// constructor(private /*FIND ALL REFS*/[|privateParam|]: number, -// public publicParam: string, -// protected protectedParam: boolean) { -// -// let localPrivate = [|privateParam|]; -// this.[|privateParam|] += 10; -// -// let localPublic = publicParam; -// this.publicParam += " Hello!"; -// // --- (line: 11) skipped --- - - - - -// === findAllReferences === -// === /file1.ts === - -// class Foo { -// constructor(private privateParam: number, -// public /*FIND ALL REFS*/[|publicParam|]: string, -// protected protectedParam: boolean) { -// -// let localPrivate = privateParam; -// this.privateParam += 10; -// -// let localPublic = [|publicParam|]; -// this.[|publicParam|] += " Hello!"; -// -// let localProtected = protectedParam; -// this.protectedParam = false; -// } -// } - - - - -// === findAllReferences === -// === /file1.ts === - -// class Foo { -// constructor(private privateParam: number, -// public publicParam: string, -// protected /*FIND ALL REFS*/[|protectedParam|]: boolean) { -// -// let localPrivate = privateParam; -// this.privateParam += 10; -// -// let localPublic = publicParam; -// this.publicParam += " Hello!"; -// -// let localProtected = [|protectedParam|]; -// this.[|protectedParam|] = false; -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferenceToClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferenceToClass.baseline.jsonc deleted file mode 100644 index f6bf983e78..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferenceToClass.baseline.jsonc +++ /dev/null @@ -1,146 +0,0 @@ -// === findAllReferences === -// === /referenceToClass_1.ts === - -// class /*FIND ALL REFS*/[|foo|] { -// public n: [|foo|]; -// public foo: number; -// } -// -// class bar { -// public n: [|foo|]; -// public k = new [|foo|](); -// } -// -// module mod { -// var k: [|foo|] = null; -// } - - -// === /referenceToClass_2.ts === - -// var k: [|foo|]; - - - - -// === findAllReferences === -// === /referenceToClass_1.ts === - -// class [|foo|] { -// public n: /*FIND ALL REFS*/[|foo|]; -// public foo: number; -// } -// -// class bar { -// public n: [|foo|]; -// public k = new [|foo|](); -// } -// -// module mod { -// var k: [|foo|] = null; -// } - - -// === /referenceToClass_2.ts === - -// var k: [|foo|]; - - - - -// === findAllReferences === -// === /referenceToClass_1.ts === - -// class [|foo|] { -// public n: [|foo|]; -// public foo: number; -// } -// -// class bar { -// public n: /*FIND ALL REFS*/[|foo|]; -// public k = new [|foo|](); -// } -// -// module mod { -// var k: [|foo|] = null; -// } - - -// === /referenceToClass_2.ts === - -// var k: [|foo|]; - - - - -// === findAllReferences === -// === /referenceToClass_1.ts === - -// class [|foo|] { -// public n: [|foo|]; -// public foo: number; -// } -// -// class bar { -// public n: [|foo|]; -// public k = new /*FIND ALL REFS*/[|foo|](); -// } -// -// module mod { -// var k: [|foo|] = null; -// } - - -// === /referenceToClass_2.ts === - -// var k: [|foo|]; - - - - -// === findAllReferences === -// === /referenceToClass_1.ts === - -// class [|foo|] { -// public n: [|foo|]; -// public foo: number; -// } -// -// class bar { -// public n: [|foo|]; -// public k = new [|foo|](); -// } -// -// module mod { -// var k: /*FIND ALL REFS*/[|foo|] = null; -// } - - -// === /referenceToClass_2.ts === - -// var k: [|foo|]; - - - - -// === findAllReferences === -// === /referenceToClass_1.ts === - -// class [|foo|] { -// public n: [|foo|]; -// public foo: number; -// } -// -// class bar { -// public n: [|foo|]; -// public k = new [|foo|](); -// } -// -// module mod { -// var k: [|foo|] = null; -// } - - -// === /referenceToClass_2.ts === - -// var k: /*FIND ALL REFS*/[|foo|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferenceToEmptyObject.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferenceToEmptyObject.baseline.jsonc deleted file mode 100644 index 11e1f74b3f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferenceToEmptyObject.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === findAllReferences === -// === /referenceToEmptyObject.ts === - -// const obj = {}/*FIND ALL REFS*/; diff --git a/testdata/baselines/reference/fourslash/findAllRef/References01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/References01.baseline.jsonc deleted file mode 100644 index ce7a705518..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/References01.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /home/src/workspaces/project/referencesForGlobals_1.ts === - -// class [|globalClass|] { -// public f() { } -// } - - -// === /home/src/workspaces/project/referencesForGlobals_2.ts === - -// /// -// var c = /*FIND ALL REFS*/[|globalClass|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesBloomFilters.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesBloomFilters.baseline.jsonc deleted file mode 100644 index b373099f0a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesBloomFilters.baseline.jsonc +++ /dev/null @@ -1,19 +0,0 @@ -// === findAllReferences === -// === /declaration.ts === - -// var container = { /*FIND ALL REFS*/[|searchProp|] : 1 }; - - -// === /expression.ts === - -// function blah() { return (1 + 2 + container.[|searchProp|]()) === 2; }; - - -// === /redeclaration.ts === - -// container = { "[|searchProp|]" : 18 }; - - -// === /stringIndexer.ts === - -// function blah2() { container["[|searchProp|]"] }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesBloomFilters2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesBloomFilters2.baseline.jsonc deleted file mode 100644 index 294e4ea57c..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesBloomFilters2.baseline.jsonc +++ /dev/null @@ -1,19 +0,0 @@ -// === findAllReferences === -// === /declaration.ts === - -// var container = { /*FIND ALL REFS*/[|42|]: 1 }; - - -// === /expression.ts === - -// function blah() { return (container[[|42|]]) === 2; }; - - -// === /redeclaration.ts === - -// container = { "[|42|]" : 18 }; - - -// === /stringIndexer.ts === - -// function blah2() { container["[|42|]"] }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesBloomFilters3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesBloomFilters3.baseline.jsonc deleted file mode 100644 index c92550b6fb..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesBloomFilters3.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /declaration.ts === - -// enum Test { /*FIND ALL REFS*/"[|42|]" = 1 }; - - -// === /expression.ts === - -// (Test[[|42|]]); - - - - -// === findAllReferences === -// === /declaration.ts === - -// enum Test { "/*FIND ALL REFS*/[|42|]" = 1 }; - - -// === /expression.ts === - -// (Test[[|42|]]); - - - - -// === findAllReferences === -// === /declaration.ts === - -// enum Test { "[|42|]" = 1 }; - - -// === /expression.ts === - -// (Test[/*FIND ALL REFS*/[|42|]]); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForAmbients.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForAmbients.baseline.jsonc deleted file mode 100644 index 5753a79cb1..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForAmbients.baseline.jsonc +++ /dev/null @@ -1,238 +0,0 @@ -// === findAllReferences === -// === /referencesForAmbients.ts === - -// /*FIND ALL REFS*/declare module "foo" { -// var f: number; -// } -// -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "/*FIND ALL REFS*/[|foo|]" { -// var f: number; -// } -// -// declare module "bar" { -// export import foo = require("[|foo|]"); -// var f2: typeof foo.f; -// } -// -// // --- (line: 10) skipped --- - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "foo" { -// /*FIND ALL REFS*/var f: number; -// } -// -// declare module "bar" { -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "foo" { -// var /*FIND ALL REFS*/[|f|]: number; -// } -// -// declare module "bar" { -// export import foo = require("foo"); -// var f2: typeof foo.[|f|]; -// } -// -// declare module "baz" { -// // --- (line: 11) skipped --- - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "foo" { -// var f: number; -// } -// -// /*FIND ALL REFS*/declare module "bar" { -// export import foo = require("foo"); -// var f2: typeof foo.f; -// } -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "foo" { -// var f: number; -// } -// -// declare module "/*FIND ALL REFS*/[|bar|]" { -// export import foo = require("foo"); -// var f2: typeof foo.f; -// } -// -// declare module "baz" { -// import bar = require("[|bar|]"); -// var f2: typeof bar.foo; -// } - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "foo" { -// var f: number; -// } -// -// declare module "bar" { -// /*FIND ALL REFS*/export import foo = require("foo"); -// var f2: typeof foo.f; -// } -// -// // --- (line: 10) skipped --- - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "foo" { -// var f: number; -// } -// -// declare module "bar" { -// export import /*FIND ALL REFS*/[|foo|] = require("foo"); -// var f2: typeof [|foo|].f; -// } -// -// declare module "baz" { -// import bar = require("bar"); -// var f2: typeof bar.[|foo|]; -// } - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "[|foo|]" { -// var f: number; -// } -// -// declare module "bar" { -// export import foo = require("/*FIND ALL REFS*/[|foo|]"); -// var f2: typeof foo.f; -// } -// -// // --- (line: 10) skipped --- - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "foo" { -// var f: number; -// } -// -// declare module "bar" { -// export import [|foo|] = require("foo"); -// var f2: typeof /*FIND ALL REFS*/[|foo|].f; -// } -// -// declare module "baz" { -// import bar = require("bar"); -// var f2: typeof bar.[|foo|]; -// } - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "foo" { -// var [|f|]: number; -// } -// -// declare module "bar" { -// export import foo = require("foo"); -// var f2: typeof foo./*FIND ALL REFS*/[|f|]; -// } -// -// declare module "baz" { -// // --- (line: 11) skipped --- - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// --- (line: 7) skipped --- -// } -// -// declare module "baz" { -// /*FIND ALL REFS*/import bar = require("bar"); -// var f2: typeof bar.foo; -// } - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "foo" { -// var f: number; -// } -// -// declare module "[|bar|]" { -// export import foo = require("foo"); -// var f2: typeof foo.f; -// } -// -// declare module "baz" { -// import bar = require("/*FIND ALL REFS*/[|bar|]"); -// var f2: typeof bar.foo; -// } - - - - -// === findAllReferences === -// === /referencesForAmbients.ts === - -// declare module "foo" { -// var f: number; -// } -// -// declare module "bar" { -// export import [|foo|] = require("foo"); -// var f2: typeof [|foo|].f; -// } -// -// declare module "baz" { -// import bar = require("bar"); -// var f2: typeof bar./*FIND ALL REFS*/[|foo|]; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassLocal.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassLocal.baseline.jsonc deleted file mode 100644 index 075c9aa995..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassLocal.baseline.jsonc +++ /dev/null @@ -1,77 +0,0 @@ -// === findAllReferences === -// === /referencesForClassLocal.ts === - -// var n = 14; -// -// class foo { -// /*FIND ALL REFS*/private n = 0; -// -// public bar() { -// this.n = 9; -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /referencesForClassLocal.ts === - -// var n = 14; -// -// class foo { -// private /*FIND ALL REFS*/[|n|] = 0; -// -// public bar() { -// this.[|n|] = 9; -// } -// -// constructor() { -// this.[|n|] = 4; -// } -// -// public bar2() { -// // --- (line: 15) skipped --- - - - - -// === findAllReferences === -// === /referencesForClassLocal.ts === - -// var n = 14; -// -// class foo { -// private [|n|] = 0; -// -// public bar() { -// this./*FIND ALL REFS*/[|n|] = 9; -// } -// -// constructor() { -// this.[|n|] = 4; -// } -// -// public bar2() { -// // --- (line: 15) skipped --- - - - - -// === findAllReferences === -// === /referencesForClassLocal.ts === - -// var n = 14; -// -// class foo { -// private [|n|] = 0; -// -// public bar() { -// this.[|n|] = 9; -// } -// -// constructor() { -// this./*FIND ALL REFS*/[|n|] = 4; -// } -// -// public bar2() { -// // --- (line: 15) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassMembers.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassMembers.baseline.jsonc deleted file mode 100644 index f340314796..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassMembers.baseline.jsonc +++ /dev/null @@ -1,110 +0,0 @@ -// === findAllReferences === -// === /referencesForClassMembers.ts === - -// class Base { -// /*FIND ALL REFS*/[|a|]: number; -// method(): void { } -// } -// class MyClass extends Base { -// [|a|]; -// method() { } -// } -// -// var c: MyClass; -// c.[|a|]; -// c.method(); - - - - -// === findAllReferences === -// === /referencesForClassMembers.ts === - -// class Base { -// [|a|]: number; -// method(): void { } -// } -// class MyClass extends Base { -// /*FIND ALL REFS*/[|a|]; -// method() { } -// } -// -// var c: MyClass; -// c.[|a|]; -// c.method(); - - - - -// === findAllReferences === -// === /referencesForClassMembers.ts === - -// class Base { -// [|a|]: number; -// method(): void { } -// } -// class MyClass extends Base { -// [|a|]; -// method() { } -// } -// -// var c: MyClass; -// c./*FIND ALL REFS*/[|a|]; -// c.method(); - - - - -// === findAllReferences === -// === /referencesForClassMembers.ts === - -// class Base { -// a: number; -// /*FIND ALL REFS*/[|method|](): void { } -// } -// class MyClass extends Base { -// a; -// [|method|]() { } -// } -// -// var c: MyClass; -// c.a; -// c.[|method|](); - - - - -// === findAllReferences === -// === /referencesForClassMembers.ts === - -// class Base { -// a: number; -// [|method|](): void { } -// } -// class MyClass extends Base { -// a; -// /*FIND ALL REFS*/[|method|]() { } -// } -// -// var c: MyClass; -// c.a; -// c.[|method|](); - - - - -// === findAllReferences === -// === /referencesForClassMembers.ts === - -// class Base { -// a: number; -// [|method|](): void { } -// } -// class MyClass extends Base { -// a; -// [|method|]() { } -// } -// -// var c: MyClass; -// c.a; -// c./*FIND ALL REFS*/[|method|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassMembersExtendingAbstractClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassMembersExtendingAbstractClass.baseline.jsonc deleted file mode 100644 index 429d39ba03..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassMembersExtendingAbstractClass.baseline.jsonc +++ /dev/null @@ -1,110 +0,0 @@ -// === findAllReferences === -// === /referencesForClassMembersExtendingAbstractClass.ts === - -// abstract class Base { -// abstract /*FIND ALL REFS*/[|a|]: number; -// abstract method(): void; -// } -// class MyClass extends Base { -// [|a|]; -// method() { } -// } -// -// var c: MyClass; -// c.[|a|]; -// c.method(); - - - - -// === findAllReferences === -// === /referencesForClassMembersExtendingAbstractClass.ts === - -// abstract class Base { -// abstract [|a|]: number; -// abstract method(): void; -// } -// class MyClass extends Base { -// /*FIND ALL REFS*/[|a|]; -// method() { } -// } -// -// var c: MyClass; -// c.[|a|]; -// c.method(); - - - - -// === findAllReferences === -// === /referencesForClassMembersExtendingAbstractClass.ts === - -// abstract class Base { -// abstract [|a|]: number; -// abstract method(): void; -// } -// class MyClass extends Base { -// [|a|]; -// method() { } -// } -// -// var c: MyClass; -// c./*FIND ALL REFS*/[|a|]; -// c.method(); - - - - -// === findAllReferences === -// === /referencesForClassMembersExtendingAbstractClass.ts === - -// abstract class Base { -// abstract a: number; -// abstract /*FIND ALL REFS*/[|method|](): void; -// } -// class MyClass extends Base { -// a; -// [|method|]() { } -// } -// -// var c: MyClass; -// c.a; -// c.[|method|](); - - - - -// === findAllReferences === -// === /referencesForClassMembersExtendingAbstractClass.ts === - -// abstract class Base { -// abstract a: number; -// abstract [|method|](): void; -// } -// class MyClass extends Base { -// a; -// /*FIND ALL REFS*/[|method|]() { } -// } -// -// var c: MyClass; -// c.a; -// c.[|method|](); - - - - -// === findAllReferences === -// === /referencesForClassMembersExtendingAbstractClass.ts === - -// abstract class Base { -// abstract a: number; -// abstract [|method|](): void; -// } -// class MyClass extends Base { -// a; -// [|method|]() { } -// } -// -// var c: MyClass; -// c.a; -// c./*FIND ALL REFS*/[|method|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassMembersExtendingGenericClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassMembersExtendingGenericClass.baseline.jsonc deleted file mode 100644 index 79cdb2e1dc..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassMembersExtendingGenericClass.baseline.jsonc +++ /dev/null @@ -1,110 +0,0 @@ -// === findAllReferences === -// === /referencesForClassMembersExtendingGenericClass.ts === - -// class Base { -// /*FIND ALL REFS*/[|a|]: this; -// method(a?:T, b?:U): this { } -// } -// class MyClass extends Base { -// [|a|]; -// method() { } -// } -// -// var c: MyClass; -// c.[|a|]; -// c.method(); - - - - -// === findAllReferences === -// === /referencesForClassMembersExtendingGenericClass.ts === - -// class Base { -// [|a|]: this; -// method(a?:T, b?:U): this { } -// } -// class MyClass extends Base { -// /*FIND ALL REFS*/[|a|]; -// method() { } -// } -// -// var c: MyClass; -// c.[|a|]; -// c.method(); - - - - -// === findAllReferences === -// === /referencesForClassMembersExtendingGenericClass.ts === - -// class Base { -// [|a|]: this; -// method(a?:T, b?:U): this { } -// } -// class MyClass extends Base { -// [|a|]; -// method() { } -// } -// -// var c: MyClass; -// c./*FIND ALL REFS*/[|a|]; -// c.method(); - - - - -// === findAllReferences === -// === /referencesForClassMembersExtendingGenericClass.ts === - -// class Base { -// a: this; -// /*FIND ALL REFS*/[|method|](a?:T, b?:U): this { } -// } -// class MyClass extends Base { -// a; -// [|method|]() { } -// } -// -// var c: MyClass; -// c.a; -// c.[|method|](); - - - - -// === findAllReferences === -// === /referencesForClassMembersExtendingGenericClass.ts === - -// class Base { -// a: this; -// [|method|](a?:T, b?:U): this { } -// } -// class MyClass extends Base { -// a; -// /*FIND ALL REFS*/[|method|]() { } -// } -// -// var c: MyClass; -// c.a; -// c.[|method|](); - - - - -// === findAllReferences === -// === /referencesForClassMembersExtendingGenericClass.ts === - -// class Base { -// a: this; -// [|method|](a?:T, b?:U): this { } -// } -// class MyClass extends Base { -// a; -// [|method|]() { } -// } -// -// var c: MyClass; -// c.a; -// c./*FIND ALL REFS*/[|method|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassParameter.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassParameter.baseline.jsonc deleted file mode 100644 index 87848b4dc2..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForClassParameter.baseline.jsonc +++ /dev/null @@ -1,82 +0,0 @@ -// === findAllReferences === -// === /referencesForClassParameter.ts === - -// var p = 2; -// -// class p { } -// -// class foo { -// constructor (/*FIND ALL REFS*/public p: any) { -// } -// -// public f(p) { -// // --- (line: 10) skipped --- - - - - -// === findAllReferences === -// === /referencesForClassParameter.ts === - -// var p = 2; -// -// class p { } -// -// class foo { -// constructor (public /*FIND ALL REFS*/[|p|]: any) { -// } -// -// public f(p) { -// this.[|p|] = p; -// } -// -// } -// -// var n = new foo(undefined); -// n.[|p|] = null; - - - - -// === findAllReferences === -// === /referencesForClassParameter.ts === - -// var p = 2; -// -// class p { } -// -// class foo { -// constructor (public [|p|]: any) { -// } -// -// public f(p) { -// this./*FIND ALL REFS*/[|p|] = p; -// } -// -// } -// -// var n = new foo(undefined); -// n.[|p|] = null; - - - - -// === findAllReferences === -// === /referencesForClassParameter.ts === - -// var p = 2; -// -// class p { } -// -// class foo { -// constructor (public [|p|]: any) { -// } -// -// public f(p) { -// this.[|p|] = p; -// } -// -// } -// -// var n = new foo(undefined); -// n./*FIND ALL REFS*/[|p|] = null; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForContextuallyTypedObjectLiteralProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForContextuallyTypedObjectLiteralProperties.baseline.jsonc deleted file mode 100644 index e9ec25e6c9..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForContextuallyTypedObjectLiteralProperties.baseline.jsonc +++ /dev/null @@ -1,27 +0,0 @@ -// === findAllReferences === -// === /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 }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForContextuallyTypedUnionProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForContextuallyTypedUnionProperties.baseline.jsonc deleted file mode 100644 index 00561940b6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForContextuallyTypedUnionProperties.baseline.jsonc +++ /dev/null @@ -1,393 +0,0 @@ -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties.ts === - -// interface A { -// a: number; -// /*FIND ALL REFS*/[|common|]: string; -// } -// -// interface B { -// 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 = { a:0, [|common|]: undefined }; -// -// // Untped -- should not be included -// var u1 = { a: 0, b: 0, common: "" }; -// var u2 = { b: 0, common: 0 }; - - - - -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties.ts === - -// --- (line: 4) skipped --- -// -// interface B { -// b: number; -// /*FIND ALL REFS*/[|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 = { a:0, [|common|]: undefined }; -// -// // Untped -- should not be included -// var u1 = { a: 0, b: 0, common: "" }; -// var u2 = { b: 0, common: 0 }; - - - - -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties.ts === - -// interface A { -// a: number; -// [|common|]: string; -// } -// -// interface B { -// b: number; -// [|common|]: number; -// } -// -// // Assignment -// var v1: A | B = { a: 0, /*FIND ALL REFS*/[|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 = { a:0, [|common|]: undefined }; -// -// // Untped -- should not be included -// var u1 = { a: 0, b: 0, common: "" }; -// var u2 = { b: 0, common: 0 }; - - - - -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties.ts === - -// interface A { -// a: number; -// [|common|]: string; -// } -// -// interface B { -// b: number; -// [|common|]: number; -// } -// -// // Assignment -// var v1: A | B = { a: 0, [|common|]: "" }; -// var v2: A | B = { b: 0, /*FIND ALL REFS*/[|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 = { a:0, [|common|]: undefined }; -// -// // Untped -- should not be included -// var u1 = { a: 0, b: 0, common: "" }; -// var u2 = { b: 0, common: 0 }; - - - - -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties.ts === - -// interface A { -// a: number; -// [|common|]: string; -// } -// -// interface B { -// 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, /*FIND ALL REFS*/[|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 = { a:0, [|common|]: undefined }; -// -// // Untped -- should not be included -// var u1 = { a: 0, b: 0, common: "" }; -// var u2 = { b: 0, common: 0 }; - - - - -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties.ts === - -// interface A { -// a: number; -// [|common|]: string; -// } -// -// interface B { -// 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 = { /*FIND ALL REFS*/[|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 = { a:0, [|common|]: undefined }; -// -// // Untped -- should not be included -// var u1 = { a: 0, b: 0, common: "" }; -// var u2 = { b: 0, common: 0 }; - - - - -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties.ts === - -// interface A { -// a: number; -// [|common|]: string; -// } -// -// interface B { -// 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, /*FIND ALL REFS*/[|common|]: "" }, { b: 0, [|common|]: 0 }]; -// -// // Nested object literal -// var ob: { aorb: A|B } = { aorb: { b: 0, [|common|]: 0 } }; -// -// // Widened type -// var w: A|B = { a:0, [|common|]: undefined }; -// -// // Untped -- should not be included -// var u1 = { a: 0, b: 0, common: "" }; -// var u2 = { b: 0, common: 0 }; - - - - -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties.ts === - -// interface A { -// a: number; -// [|common|]: string; -// } -// -// interface B { -// 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, /*FIND ALL REFS*/[|common|]: 0 }]; -// -// // Nested object literal -// var ob: { aorb: A|B } = { aorb: { b: 0, [|common|]: 0 } }; -// -// // Widened type -// var w: A|B = { a:0, [|common|]: undefined }; -// -// // Untped -- should not be included -// var u1 = { a: 0, b: 0, common: "" }; -// var u2 = { b: 0, common: 0 }; - - - - -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties.ts === - -// interface A { -// a: number; -// [|common|]: string; -// } -// -// interface B { -// 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, /*FIND ALL REFS*/[|common|]: 0 } }; -// -// // Widened type -// var w: A|B = { a:0, [|common|]: undefined }; -// -// // Untped -- should not be included -// var u1 = { a: 0, b: 0, common: "" }; -// var u2 = { b: 0, common: 0 }; - - - - -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties.ts === - -// interface A { -// a: number; -// [|common|]: string; -// } -// -// interface B { -// 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 = { a:0, /*FIND ALL REFS*/[|common|]: undefined }; -// -// // Untped -- should not be included -// var u1 = { a: 0, b: 0, common: "" }; -// var u2 = { b: 0, common: 0 }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForContextuallyTypedUnionProperties2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForContextuallyTypedUnionProperties2.baseline.jsonc deleted file mode 100644 index fcf8502a8a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForContextuallyTypedUnionProperties2.baseline.jsonc +++ /dev/null @@ -1,34 +0,0 @@ -// === findAllReferences === -// === /referencesForContextuallyTypedUnionProperties2.ts === - -// --- (line: 3) skipped --- -// } -// -// 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 }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForDeclarationKeywords.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForDeclarationKeywords.baseline.jsonc deleted file mode 100644 index 2db33149e6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForDeclarationKeywords.baseline.jsonc +++ /dev/null @@ -1,255 +0,0 @@ -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// class Base {} -// interface Implemented1 {} -// /*FIND ALL REFS*/class C1 extends Base implements Implemented1 { -// get e() { return 1; } -// set e(v) {} -// } -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// class Base {} -// interface Implemented1 {} -// class C1 /*FIND ALL REFS*/extends Base implements Implemented1 { -// get e() { return 1; } -// set e(v) {} -// } -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// class Base {} -// interface Implemented1 {} -// class C1 extends Base /*FIND ALL REFS*/implements Implemented1 { -// get e() { return 1; } -// set e(v) {} -// } -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 14) skipped --- -// const z = 1; -// interface Implemented2 {} -// interface Implemented3 {} -// class C2 /*FIND ALL REFS*/implements Implemented2, Implemented3 {} -// interface I2 extends Implemented2, Implemented3 {} - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// class Base {} -// interface Implemented1 {} -// class C1 extends Base implements Implemented1 { -// /*FIND ALL REFS*/get e() { return 1; } -// set e(v) {} -// } -// interface I1 extends Base { } -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// class Base {} -// interface Implemented1 {} -// class C1 extends Base implements Implemented1 { -// get e() { return 1; } -// /*FIND ALL REFS*/set e(v) {} -// } -// interface I1 extends Base { } -// type T = { } -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 3) skipped --- -// get e() { return 1; } -// set e(v) {} -// } -// /*FIND ALL REFS*/interface I1 extends Base { } -// type T = { } -// enum E { } -// namespace N { } -// // --- (line: 11) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 3) skipped --- -// get e() { return 1; } -// set e(v) {} -// } -// interface I1 /*FIND ALL REFS*/extends Base { } -// type T = { } -// enum E { } -// namespace N { } -// // --- (line: 11) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 15) skipped --- -// interface Implemented2 {} -// interface Implemented3 {} -// class C2 implements Implemented2, Implemented3 {} -// interface I2 /*FIND ALL REFS*/extends Implemented2, Implemented3 {} - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 4) skipped --- -// set e(v) {} -// } -// interface I1 extends Base { } -// /*FIND ALL REFS*/type T = { } -// enum E { } -// namespace N { } -// module M { } -// // --- (line: 12) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 5) skipped --- -// } -// interface I1 extends Base { } -// type T = { } -// /*FIND ALL REFS*/enum E { } -// namespace N { } -// module M { } -// function fn() {} -// // --- (line: 13) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 6) skipped --- -// interface I1 extends Base { } -// type T = { } -// enum E { } -// /*FIND ALL REFS*/namespace N { } -// module M { } -// function fn() {} -// var x; -// // --- (line: 14) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 7) skipped --- -// type T = { } -// enum E { } -// namespace N { } -// /*FIND ALL REFS*/module M { } -// function fn() {} -// var x; -// let y; -// // --- (line: 15) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 8) skipped --- -// enum E { } -// namespace N { } -// module M { } -// /*FIND ALL REFS*/function fn() {} -// var x; -// let y; -// const z = 1; -// // --- (line: 16) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 9) skipped --- -// namespace N { } -// module M { } -// function fn() {} -// /*FIND ALL REFS*/var x; -// let y; -// const z = 1; -// interface Implemented2 {} -// // --- (line: 17) skipped --- - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 10) skipped --- -// module M { } -// function fn() {} -// var x; -// /*FIND ALL REFS*/let y; -// const z = 1; -// interface Implemented2 {} -// interface Implemented3 {} -// class C2 implements Implemented2, Implemented3 {} -// interface I2 extends Implemented2, Implemented3 {} - - - - -// === findAllReferences === -// === /referencesForDeclarationKeywords.ts === - -// --- (line: 11) skipped --- -// function fn() {} -// var x; -// let y; -// /*FIND ALL REFS*/const z = 1; -// interface Implemented2 {} -// interface Implemented3 {} -// class C2 implements Implemented2, Implemented3 {} -// interface I2 extends Implemented2, Implemented3 {} diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForEnums.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForEnums.baseline.jsonc deleted file mode 100644 index 029ee16b94..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForEnums.baseline.jsonc +++ /dev/null @@ -1,149 +0,0 @@ -// === findAllReferences === -// === /referencesForEnums.ts === - -// enum E { -// /*FIND ALL REFS*/[|value1|] = 1, -// "value2" = [|value1|], -// 111 = 11 -// } -// -// E.[|value1|]; -// E["value2"]; -// E.value2; -// E[111]; - - - - -// === findAllReferences === -// === /referencesForEnums.ts === - -// enum E { -// value1 = 1, -// /*FIND ALL REFS*/"[|value2|]" = value1, -// 111 = 11 -// } -// -// E.value1; -// E["[|value2|]"]; -// E.[|value2|]; -// E[111]; - - - - -// === findAllReferences === -// === /referencesForEnums.ts === - -// enum E { -// value1 = 1, -// "/*FIND ALL REFS*/[|value2|]" = value1, -// 111 = 11 -// } -// -// E.value1; -// E["[|value2|]"]; -// E.[|value2|]; -// E[111]; - - - - -// === findAllReferences === -// === /referencesForEnums.ts === - -// enum E { -// [|value1|] = 1, -// "value2" = /*FIND ALL REFS*/[|value1|], -// 111 = 11 -// } -// -// E.[|value1|]; -// E["value2"]; -// E.value2; -// E[111]; - - - - -// === findAllReferences === -// === /referencesForEnums.ts === - -// enum E { -// value1 = 1, -// "value2" = value1, -// /*FIND ALL REFS*/[|111|] = 11 -// } -// -// E.value1; -// E["value2"]; -// E.value2; -// E[[|111|]]; - - - - -// === findAllReferences === -// === /referencesForEnums.ts === - -// enum E { -// [|value1|] = 1, -// "value2" = [|value1|], -// 111 = 11 -// } -// -// E./*FIND ALL REFS*/[|value1|]; -// E["value2"]; -// E.value2; -// E[111]; - - - - -// === findAllReferences === -// === /referencesForEnums.ts === - -// enum E { -// value1 = 1, -// "[|value2|]" = value1, -// 111 = 11 -// } -// -// E.value1; -// E["/*FIND ALL REFS*/[|value2|]"]; -// E.[|value2|]; -// E[111]; - - - - -// === findAllReferences === -// === /referencesForEnums.ts === - -// enum E { -// value1 = 1, -// "[|value2|]" = value1, -// 111 = 11 -// } -// -// E.value1; -// E["[|value2|]"]; -// E./*FIND ALL REFS*/[|value2|]; -// E[111]; - - - - -// === findAllReferences === -// === /referencesForEnums.ts === - -// enum E { -// value1 = 1, -// "value2" = value1, -// [|111|] = 11 -// } -// -// E.value1; -// E["value2"]; -// E.value2; -// E[/*FIND ALL REFS*/[|111|]]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForExpressionKeywords.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForExpressionKeywords.baseline.jsonc deleted file mode 100644 index ff7dbdb0e1..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForExpressionKeywords.baseline.jsonc +++ /dev/null @@ -1,140 +0,0 @@ -// === findAllReferences === -// === /referencesForExpressionKeywords.ts === - -// class C { -// static x = 1; -// } -// /*FIND ALL REFS*/new C(); -// void C; -// typeof C; -// delete C.x; -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /referencesForExpressionKeywords.ts === - -// class C { -// static x = 1; -// } -// new C(); -// /*FIND ALL REFS*/void C; -// typeof C; -// delete C.x; -// async function* f() { -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /referencesForExpressionKeywords.ts === - -// class C { -// static x = 1; -// } -// new C(); -// void C; -// /*FIND ALL REFS*/[|typeof|] C; -// delete C.x; -// async function* f() { -// yield C; -// // --- (line: 10) skipped --- - - - - -// === findAllReferences === -// === /referencesForExpressionKeywords.ts === - -// --- (line: 5) skipped --- -// typeof C; -// delete C.x; -// async function* f() { -// /*FIND ALL REFS*/yield C; -// await C; -// } -// "x" in C; -// undefined instanceof C; -// undefined as C; - - - - -// === findAllReferences === -// === /referencesForExpressionKeywords.ts === - -// --- (line: 6) skipped --- -// delete C.x; -// async function* f() { -// yield C; -// /*FIND ALL REFS*/await C; -// } -// "x" in C; -// undefined instanceof C; -// undefined as C; - - - - -// === findAllReferences === -// === /referencesForExpressionKeywords.ts === - -// --- (line: 8) skipped --- -// yield C; -// await C; -// } -// "x" /*FIND ALL REFS*/in C; -// undefined instanceof C; -// undefined as C; - - - - -// === findAllReferences === -// === /referencesForExpressionKeywords.ts === - -// class [|C|] { -// static x = 1; -// } -// new [|C|](); -// void [|C|]; -// typeof [|C|]; -// delete [|C|].x; -// async function* f() { -// yield [|C|]; -// await [|C|]; -// } -// "x" in [|C|]; -// undefined /*FIND ALL REFS*/instanceof [|C|]; -// undefined as [|C|]; - - - - -// === findAllReferences === -// === /referencesForExpressionKeywords.ts === - -// --- (line: 10) skipped --- -// } -// "x" in C; -// undefined instanceof C; -// undefined /*FIND ALL REFS*/as C; - - - - -// === findAllReferences === -// === /referencesForExpressionKeywords.ts === - -// --- (line: 3) skipped --- -// new C(); -// void C; -// typeof C; -// /*FIND ALL REFS*/delete C.x; -// async function* f() { -// yield C; -// await C; -// // --- (line: 11) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForExternalModuleNames.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForExternalModuleNames.baseline.jsonc deleted file mode 100644 index 0a8b6fda57..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForExternalModuleNames.baseline.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// /*FIND ALL REFS*/declare module "foo" { -// var f: number; -// } - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// declare module "/*FIND ALL REFS*/[|foo|]" { -// var f: number; -// } - - -// === /referencesForGlobals_2.ts === - -// import f = require("[|foo|]"); - - - - -// === findAllReferences === -// === /referencesForGlobals_2.ts === - -// /*FIND ALL REFS*/import f = require("foo"); - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// declare module "[|foo|]" { -// var f: number; -// } - - -// === /referencesForGlobals_2.ts === - -// import f = require("/*FIND ALL REFS*/[|foo|]"); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForFunctionOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForFunctionOverloads.baseline.jsonc deleted file mode 100644 index 22e9952724..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForFunctionOverloads.baseline.jsonc +++ /dev/null @@ -1,51 +0,0 @@ -// === findAllReferences === -// === /referencesForFunctionOverloads.ts === - -// /*FIND ALL REFS*/function foo(x: string); -// function foo(x: string, y: number) { -// foo('', 43); -// } - - - - -// === findAllReferences === -// === /referencesForFunctionOverloads.ts === - -// function /*FIND ALL REFS*/[|foo|](x: string); -// function [|foo|](x: string, y: number) { -// [|foo|]('', 43); -// } - - - - -// === findAllReferences === -// === /referencesForFunctionOverloads.ts === - -// function foo(x: string); -// /*FIND ALL REFS*/function foo(x: string, y: number) { -// foo('', 43); -// } - - - - -// === findAllReferences === -// === /referencesForFunctionOverloads.ts === - -// function [|foo|](x: string); -// function /*FIND ALL REFS*/[|foo|](x: string, y: number) { -// [|foo|]('', 43); -// } - - - - -// === findAllReferences === -// === /referencesForFunctionOverloads.ts === - -// function [|foo|](x: string); -// function [|foo|](x: string, y: number) { -// /*FIND ALL REFS*/[|foo|]('', 43); -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForFunctionParameter.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForFunctionParameter.baseline.jsonc deleted file mode 100644 index 2f6301cdb3..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForFunctionParameter.baseline.jsonc +++ /dev/null @@ -1,38 +0,0 @@ -// === findAllReferences === -// === /referencesForFunctionParameter.ts === - -// var x; -// var n; -// -// function n(x: number, /*FIND ALL REFS*/[|n|]: number) { -// [|n|] = 32; -// x = [|n|]; -// } - - - - -// === findAllReferences === -// === /referencesForFunctionParameter.ts === - -// var x; -// var n; -// -// function n(x: number, [|n|]: number) { -// /*FIND ALL REFS*/[|n|] = 32; -// x = [|n|]; -// } - - - - -// === findAllReferences === -// === /referencesForFunctionParameter.ts === - -// var x; -// var n; -// -// function n(x: number, [|n|]: number) { -// [|n|] = 32; -// x = /*FIND ALL REFS*/[|n|]; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals.baseline.jsonc deleted file mode 100644 index 06d99f49ea..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals.baseline.jsonc +++ /dev/null @@ -1,128 +0,0 @@ -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// /*FIND ALL REFS*/var global = 2; -// -// class foo { -// constructor (public global) { } -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// var /*FIND ALL REFS*/[|global|] = 2; -// -// class foo { -// constructor (public global) { } -// public f(global) { } -// public f2(global) { } -// } -// -// class bar { -// constructor () { -// var n = [|global|]; -// -// var f = new foo(''); -// f.global = ''; -// } -// } -// -// var k = [|global|]; - - -// === /referencesForGlobals_2.ts === - -// var m = [|global|]; - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// var [|global|] = 2; -// -// class foo { -// constructor (public global) { } -// public f(global) { } -// public f2(global) { } -// } -// -// class bar { -// constructor () { -// var n = /*FIND ALL REFS*/[|global|]; -// -// var f = new foo(''); -// f.global = ''; -// } -// } -// -// var k = [|global|]; - - -// === /referencesForGlobals_2.ts === - -// var m = [|global|]; - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// var [|global|] = 2; -// -// class foo { -// constructor (public global) { } -// public f(global) { } -// public f2(global) { } -// } -// -// class bar { -// constructor () { -// var n = [|global|]; -// -// var f = new foo(''); -// f.global = ''; -// } -// } -// -// var k = /*FIND ALL REFS*/[|global|]; - - -// === /referencesForGlobals_2.ts === - -// var m = [|global|]; - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// var [|global|] = 2; -// -// class foo { -// constructor (public global) { } -// public f(global) { } -// public f2(global) { } -// } -// -// class bar { -// constructor () { -// var n = [|global|]; -// -// var f = new foo(''); -// f.global = ''; -// } -// } -// -// var k = [|global|]; - - -// === /referencesForGlobals_2.ts === - -// var m = /*FIND ALL REFS*/[|global|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals2.baseline.jsonc deleted file mode 100644 index 4a73d867a2..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals2.baseline.jsonc +++ /dev/null @@ -1,36 +0,0 @@ -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// /*FIND ALL REFS*/class globalClass { -// public f() { } -// } - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// class /*FIND ALL REFS*/[|globalClass|] { -// public f() { } -// } - - -// === /referencesForGlobals_2.ts === - -// var c = [|globalClass|](); - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// class [|globalClass|] { -// public f() { } -// } - - -// === /referencesForGlobals_2.ts === - -// var c = /*FIND ALL REFS*/[|globalClass|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals3.baseline.jsonc deleted file mode 100644 index 9947d0964d..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals3.baseline.jsonc +++ /dev/null @@ -1,36 +0,0 @@ -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// /*FIND ALL REFS*/interface globalInterface { -// f(); -// } - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// interface /*FIND ALL REFS*/[|globalInterface|] { -// f(); -// } - - -// === /referencesForGlobals_2.ts === - -// var i: [|globalInterface|]; - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// interface [|globalInterface|] { -// f(); -// } - - -// === /referencesForGlobals_2.ts === - -// var i: /*FIND ALL REFS*/[|globalInterface|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals4.baseline.jsonc deleted file mode 100644 index 2a781957a8..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals4.baseline.jsonc +++ /dev/null @@ -1,36 +0,0 @@ -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// /*FIND ALL REFS*/module globalModule { -// export f() { }; -// } - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// module /*FIND ALL REFS*/[|globalModule|] { -// export f() { }; -// } - - -// === /referencesForGlobals_2.ts === - -// var m = [|globalModule|]; - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// module [|globalModule|] { -// export f() { }; -// } - - -// === /referencesForGlobals_2.ts === - -// var m = /*FIND ALL REFS*/[|globalModule|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals5.baseline.jsonc deleted file mode 100644 index b101632f3e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobals5.baseline.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// module globalModule { -// export var x; -// } -// -// /*FIND ALL REFS*/import globalAlias = globalModule; - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// module globalModule { -// export var x; -// } -// -// import /*FIND ALL REFS*/[|globalAlias|] = globalModule; - - -// === /referencesForGlobals_2.ts === - -// var m = [|globalAlias|]; - - - - -// === findAllReferences === -// === /referencesForGlobals_1.ts === - -// module globalModule { -// export var x; -// } -// -// import [|globalAlias|] = globalModule; - - -// === /referencesForGlobals_2.ts === - -// var m = /*FIND ALL REFS*/[|globalAlias|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobalsInExternalModule.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobalsInExternalModule.baseline.jsonc deleted file mode 100644 index 4b4a084e07..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForGlobalsInExternalModule.baseline.jsonc +++ /dev/null @@ -1,182 +0,0 @@ -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// /*FIND ALL REFS*/var topLevelVar = 2; -// var topLevelVar2 = topLevelVar; -// -// class topLevelClass { } -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// var /*FIND ALL REFS*/[|topLevelVar|] = 2; -// var topLevelVar2 = [|topLevelVar|]; -// -// class topLevelClass { } -// var c = new topLevelClass(); -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// var [|topLevelVar|] = 2; -// var topLevelVar2 = /*FIND ALL REFS*/[|topLevelVar|]; -// -// class topLevelClass { } -// var c = new topLevelClass(); -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// var topLevelVar = 2; -// var topLevelVar2 = topLevelVar; -// -// /*FIND ALL REFS*/class topLevelClass { } -// var c = new topLevelClass(); -// -// interface topLevelInterface { } -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// var topLevelVar = 2; -// var topLevelVar2 = topLevelVar; -// -// class /*FIND ALL REFS*/[|topLevelClass|] { } -// var c = new [|topLevelClass|](); -// -// interface topLevelInterface { } -// var i: topLevelInterface; -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// var topLevelVar = 2; -// var topLevelVar2 = topLevelVar; -// -// class [|topLevelClass|] { } -// var c = new /*FIND ALL REFS*/[|topLevelClass|](); -// -// interface topLevelInterface { } -// var i: topLevelInterface; -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// --- (line: 3) skipped --- -// class topLevelClass { } -// var c = new topLevelClass(); -// -// /*FIND ALL REFS*/interface topLevelInterface { } -// var i: topLevelInterface; -// -// module topLevelModule { -// // --- (line: 11) skipped --- - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// --- (line: 3) skipped --- -// class topLevelClass { } -// var c = new topLevelClass(); -// -// interface /*FIND ALL REFS*/[|topLevelInterface|] { } -// var i: [|topLevelInterface|]; -// -// module topLevelModule { -// export var x; -// // --- (line: 12) skipped --- - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// --- (line: 3) skipped --- -// class topLevelClass { } -// var c = new topLevelClass(); -// -// interface [|topLevelInterface|] { } -// var i: /*FIND ALL REFS*/[|topLevelInterface|]; -// -// module topLevelModule { -// export var x; -// // --- (line: 12) skipped --- - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// --- (line: 6) skipped --- -// interface topLevelInterface { } -// var i: topLevelInterface; -// -// /*FIND ALL REFS*/module topLevelModule { -// export var x; -// } -// var x = topLevelModule.x; -// -// export = x; - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// --- (line: 6) skipped --- -// interface topLevelInterface { } -// var i: topLevelInterface; -// -// module /*FIND ALL REFS*/[|topLevelModule|] { -// export var x; -// } -// var x = [|topLevelModule|].x; -// -// export = x; - - - - -// === findAllReferences === -// === /referencesForGlobalsInExternalModule.ts === - -// --- (line: 6) skipped --- -// interface topLevelInterface { } -// var i: topLevelInterface; -// -// module [|topLevelModule|] { -// export var x; -// } -// var x = /*FIND ALL REFS*/[|topLevelModule|].x; -// -// export = x; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIllegalAssignment.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIllegalAssignment.baseline.jsonc deleted file mode 100644 index bc2eb98e5c..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIllegalAssignment.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === findAllReferences === -// === /referencesForIllegalAssignment.ts === - -// f/*FIND ALL REFS*/oo = foo; -// var bar = function () { }; -// bar = bar + 1; - - - - -// === findAllReferences === -// === /referencesForIllegalAssignment.ts === - -// foo = fo/*FIND ALL REFS*/o; -// var bar = function () { }; -// bar = bar + 1; - - - - -// === findAllReferences === -// === /referencesForIllegalAssignment.ts === - -// foo = foo; -// var /*FIND ALL REFS*/[|bar|] = function () { }; -// [|bar|] = [|bar|] + 1; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForImports.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForImports.baseline.jsonc deleted file mode 100644 index 7733371e72..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForImports.baseline.jsonc +++ /dev/null @@ -1,62 +0,0 @@ -// === findAllReferences === -// === /referencesForImports.ts === - -// declare module "jquery" { -// function $(s: string): any; -// export = $; -// } -// /*FIND ALL REFS*/import $ = require("jquery"); -// $("a"); -// import $ = require("jquery"); - - - - -// === findAllReferences === -// === /referencesForImports.ts === - -// declare module "jquery" { -// function $(s: string): any; -// export = $; -// } -// import /*FIND ALL REFS*/[|$|] = require("jquery"); -// [|$|]("a"); -// import $ = require("jquery"); - - - - -// === findAllReferences === -// === /referencesForImports.ts === - -// declare module "jquery" { -// function $(s: string): any; -// export = $; -// } -// import [|$|] = require("jquery"); -// /*FIND ALL REFS*/[|$|]("a"); -// import $ = require("jquery"); - - - - -// === findAllReferences === -// === /referencesForImports.ts === - -// --- (line: 3) skipped --- -// } -// import $ = require("jquery"); -// $("a"); -// /*FIND ALL REFS*/import $ = require("jquery"); - - - - -// === findAllReferences === -// === /referencesForImports.ts === - -// --- (line: 3) skipped --- -// } -// import $ = require("jquery"); -// $("a"); -// import /*FIND ALL REFS*/[|$|] = require("jquery"); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIndexProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIndexProperty.baseline.jsonc deleted file mode 100644 index 9e6d538aff..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIndexProperty.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === findAllReferences === -// === /referencesForIndexProperty.ts === - -// class Foo { -// /*FIND ALL REFS*/[|property|]: number; -// method(): void { } -// } -// -// var f: Foo; -// f["[|property|]"]; -// f["method"]; - - - - -// === findAllReferences === -// === /referencesForIndexProperty.ts === - -// class Foo { -// property: number; -// /*FIND ALL REFS*/[|method|](): void { } -// } -// -// var f: Foo; -// f["property"]; -// f["[|method|]"]; - - - - -// === findAllReferences === -// === /referencesForIndexProperty.ts === - -// class Foo { -// [|property|]: number; -// method(): void { } -// } -// -// var f: Foo; -// f["/*FIND ALL REFS*/[|property|]"]; -// f["method"]; - - - - -// === findAllReferences === -// === /referencesForIndexProperty.ts === - -// class Foo { -// property: number; -// [|method|](): void { } -// } -// -// var f: Foo; -// f["property"]; -// f["/*FIND ALL REFS*/[|method|]"]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIndexProperty2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIndexProperty2.baseline.jsonc deleted file mode 100644 index 0699715589..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIndexProperty2.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === findAllReferences === -// === /referencesForIndexProperty2.ts === - -// var a; -// a["/*FIND ALL REFS*/blah"]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIndexProperty3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIndexProperty3.baseline.jsonc deleted file mode 100644 index b7952955f1..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForIndexProperty3.baseline.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// === findAllReferences === -// === /referencesForIndexProperty3.ts === - -// interface Object { -// /*FIND ALL REFS*/[|toMyString|](); -// } -// -// var y: Object; -// y.[|toMyString|](); -// -// var x = {}; -// x["[|toMyString|]"](); - - - - -// === findAllReferences === -// === /referencesForIndexProperty3.ts === - -// interface Object { -// [|toMyString|](); -// } -// -// var y: Object; -// y./*FIND ALL REFS*/[|toMyString|](); -// -// var x = {}; -// x["[|toMyString|]"](); - - - - -// === findAllReferences === -// === /referencesForIndexProperty3.ts === - -// interface Object { -// [|toMyString|](); -// } -// -// var y: Object; -// y.[|toMyString|](); -// -// var x = {}; -// x["/*FIND ALL REFS*/[|toMyString|]"](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties.baseline.jsonc deleted file mode 100644 index 8f54db59c2..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties.baseline.jsonc +++ /dev/null @@ -1,104 +0,0 @@ -// === findAllReferences === -// === /referencesForInheritedProperties.ts === - -// interface interface1 { -// /*FIND ALL REFS*/[|doStuff|](): void; -// } -// -// interface interface2 extends interface1{ -// [|doStuff|](): void; -// } -// -// class class1 implements interface2 { -// [|doStuff|]() { -// -// } -// } -// -// class class2 extends class1 { -// -// } -// -// var v: class2; -// v.[|doStuff|](); - - - - -// === findAllReferences === -// === /referencesForInheritedProperties.ts === - -// interface interface1 { -// [|doStuff|](): void; -// } -// -// interface interface2 extends interface1{ -// /*FIND ALL REFS*/[|doStuff|](): void; -// } -// -// class class1 implements interface2 { -// [|doStuff|]() { -// -// } -// } -// -// class class2 extends class1 { -// -// } -// -// var v: class2; -// v.[|doStuff|](); - - - - -// === findAllReferences === -// === /referencesForInheritedProperties.ts === - -// interface interface1 { -// [|doStuff|](): void; -// } -// -// interface interface2 extends interface1{ -// [|doStuff|](): void; -// } -// -// class class1 implements interface2 { -// /*FIND ALL REFS*/[|doStuff|]() { -// -// } -// } -// -// class class2 extends class1 { -// -// } -// -// var v: class2; -// v.[|doStuff|](); - - - - -// === findAllReferences === -// === /referencesForInheritedProperties.ts === - -// interface interface1 { -// [|doStuff|](): void; -// } -// -// interface interface2 extends interface1{ -// [|doStuff|](): void; -// } -// -// class class1 implements interface2 { -// [|doStuff|]() { -// -// } -// } -// -// class class2 extends class1 { -// -// } -// -// var v: class2; -// v./*FIND ALL REFS*/[|doStuff|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties2.baseline.jsonc deleted file mode 100644 index 7a4f317ec3..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties2.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === findAllReferences === -// === /referencesForInheritedProperties2.ts === - -// interface interface1 { -// /*FIND ALL REFS*/[|doStuff|](): void; -// } -// -// interface interface2 { -// [|doStuff|](): void; -// } -// -// interface interface2 extends interface1 { -// } -// -// class class1 implements interface2 { -// [|doStuff|]() { -// -// } -// } -// -// class class2 extends class1 { -// -// } -// -// var v: class2; -// v.[|doStuff|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties3.baseline.jsonc deleted file mode 100644 index a5eeb3faaf..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties3.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === findAllReferences === -// === /referencesForInheritedProperties3.ts === - -// interface interface1 extends interface1 { -// /*FIND ALL REFS*/[|doStuff|](): void; -// propName: string; -// } -// -// var v: interface1; -// v.propName; -// v.[|doStuff|](); - - - - -// === findAllReferences === -// === /referencesForInheritedProperties3.ts === - -// interface interface1 extends interface1 { -// doStuff(): void; -// /*FIND ALL REFS*/[|propName|]: string; -// } -// -// var v: interface1; -// v.[|propName|]; -// v.doStuff(); - - - - -// === findAllReferences === -// === /referencesForInheritedProperties3.ts === - -// interface interface1 extends interface1 { -// doStuff(): void; -// [|propName|]: string; -// } -// -// var v: interface1; -// v./*FIND ALL REFS*/[|propName|]; -// v.doStuff(); - - - - -// === findAllReferences === -// === /referencesForInheritedProperties3.ts === - -// interface interface1 extends interface1 { -// [|doStuff|](): void; -// propName: string; -// } -// -// var v: interface1; -// v.propName; -// v./*FIND ALL REFS*/[|doStuff|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties4.baseline.jsonc deleted file mode 100644 index ad772764e1..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties4.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === findAllReferences === -// === /referencesForInheritedProperties4.ts === - -// class class1 extends class1 { -// /*FIND ALL REFS*/[|doStuff|]() { } -// propName: string; -// } -// -// var c: class1; -// c.[|doStuff|](); -// c.propName; - - - - -// === findAllReferences === -// === /referencesForInheritedProperties4.ts === - -// class class1 extends class1 { -// doStuff() { } -// /*FIND ALL REFS*/[|propName|]: string; -// } -// -// var c: class1; -// c.doStuff(); -// c.[|propName|]; - - - - -// === findAllReferences === -// === /referencesForInheritedProperties4.ts === - -// class class1 extends class1 { -// [|doStuff|]() { } -// propName: string; -// } -// -// var c: class1; -// c./*FIND ALL REFS*/[|doStuff|](); -// c.propName; - - - - -// === findAllReferences === -// === /referencesForInheritedProperties4.ts === - -// class class1 extends class1 { -// doStuff() { } -// [|propName|]: string; -// } -// -// var c: class1; -// c.doStuff(); -// c./*FIND ALL REFS*/[|propName|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties5.baseline.jsonc deleted file mode 100644 index 6b6dabb357..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties5.baseline.jsonc +++ /dev/null @@ -1,34 +0,0 @@ -// === findAllReferences === -// === /referencesForInheritedProperties5.ts === - -// interface interface1 extends interface1 { -// /*FIND ALL REFS*/[|doStuff|](): void; -// propName: string; -// } -// interface interface2 extends interface1 { -// [|doStuff|](): void; -// propName: string; -// } -// -// var v: interface1; -// v.propName; -// v.[|doStuff|](); - - - - -// === findAllReferences === -// === /referencesForInheritedProperties5.ts === - -// interface interface1 extends interface1 { -// doStuff(): void; -// /*FIND ALL REFS*/[|propName|]: string; -// } -// interface interface2 extends interface1 { -// doStuff(): void; -// [|propName|]: string; -// } -// -// var v: interface1; -// v.[|propName|]; -// v.doStuff(); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties6.baseline.jsonc deleted file mode 100644 index 09108f9593..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties6.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /referencesForInheritedProperties6.ts === - -// class class1 extends class1 { -// /*FIND ALL REFS*/[|doStuff|]() { } -// } -// class class2 extends class1 { -// [|doStuff|]() { } -// } -// -// var v: class2; -// v.[|doStuff|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties7.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties7.baseline.jsonc deleted file mode 100644 index c2b2b65e94..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties7.baseline.jsonc +++ /dev/null @@ -1,132 +0,0 @@ -// === findAllReferences === -// === /referencesForInheritedProperties7.ts === - -// class class1 extends class1 { -// /*FIND ALL REFS*/[|doStuff|]() { } -// propName: string; -// } -// interface interface1 extends interface1 { -// doStuff(): void; -// propName: string; -// } -// class class2 extends class1 implements interface1 { -// [|doStuff|]() { } -// propName: string; -// } -// -// var v: class2; -// v.[|doStuff|](); -// v.propName; - - - - -// === findAllReferences === -// === /referencesForInheritedProperties7.ts === - -// class class1 extends class1 { -// doStuff() { } -// /*FIND ALL REFS*/[|propName|]: string; -// } -// interface interface1 extends interface1 { -// doStuff(): void; -// propName: string; -// } -// class class2 extends class1 implements interface1 { -// doStuff() { } -// [|propName|]: string; -// } -// -// var v: class2; -// v.doStuff(); -// v.[|propName|]; - - - - -// === findAllReferences === -// === /referencesForInheritedProperties7.ts === - -// class class1 extends class1 { -// doStuff() { } -// propName: string; -// } -// interface interface1 extends interface1 { -// /*FIND ALL REFS*/[|doStuff|](): void; -// propName: string; -// } -// class class2 extends class1 implements interface1 { -// [|doStuff|]() { } -// propName: string; -// } -// -// var v: class2; -// v.[|doStuff|](); -// v.propName; - - - - -// === findAllReferences === -// === /referencesForInheritedProperties7.ts === - -// --- (line: 3) skipped --- -// } -// interface interface1 extends interface1 { -// doStuff(): void; -// /*FIND ALL REFS*/[|propName|]: string; -// } -// class class2 extends class1 implements interface1 { -// doStuff() { } -// [|propName|]: string; -// } -// -// var v: class2; -// v.doStuff(); -// v.[|propName|]; - - - - -// === findAllReferences === -// === /referencesForInheritedProperties7.ts === - -// class class1 extends class1 { -// [|doStuff|]() { } -// propName: string; -// } -// interface interface1 extends interface1 { -// [|doStuff|](): void; -// propName: string; -// } -// class class2 extends class1 implements interface1 { -// /*FIND ALL REFS*/[|doStuff|]() { } -// propName: string; -// } -// -// var v: class2; -// v.[|doStuff|](); -// v.propName; - - - - -// === findAllReferences === -// === /referencesForInheritedProperties7.ts === - -// class class1 extends class1 { -// doStuff() { } -// [|propName|]: string; -// } -// interface interface1 extends interface1 { -// doStuff(): void; -// [|propName|]: string; -// } -// class class2 extends class1 implements interface1 { -// doStuff() { } -// /*FIND ALL REFS*/[|propName|]: string; -// } -// -// var v: class2; -// v.doStuff(); -// v.[|propName|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties8.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties8.baseline.jsonc deleted file mode 100644 index e3ed80d606..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties8.baseline.jsonc +++ /dev/null @@ -1,30 +0,0 @@ -// === findAllReferences === -// === /referencesForInheritedProperties8.ts === - -// interface C extends D { -// /*FIND ALL REFS*/[|propD|]: number; -// } -// interface D extends C { -// [|propD|]: string; -// propC: number; -// } -// var d: D; -// d.[|propD|]; -// d.propC; - - - - -// === findAllReferences === -// === /referencesForInheritedProperties8.ts === - -// interface C extends D { -// propD: number; -// } -// interface D extends C { -// propD: string; -// /*FIND ALL REFS*/[|propC|]: number; -// } -// var d: D; -// d.propD; -// d.[|propC|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties9.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties9.baseline.jsonc deleted file mode 100644 index bf0a442911..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForInheritedProperties9.baseline.jsonc +++ /dev/null @@ -1,43 +0,0 @@ -// === findAllReferences === -// === /referencesForInheritedProperties9.ts === - -// class D extends C { -// /*FIND ALL REFS*/[|prop1|]: string; -// } -// -// class C extends D { -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /referencesForInheritedProperties9.ts === - -// class D extends C { -// prop1: string; -// } -// -// class C extends D { -// /*FIND ALL REFS*/[|prop1|]: string; -// } -// -// var c: C; -// c.[|prop1|]; - - - - -// === findAllReferences === -// === /referencesForInheritedProperties9.ts === - -// class D extends C { -// prop1: string; -// } -// -// class C extends D { -// [|prop1|]: string; -// } -// -// var c: C; -// c./*FIND ALL REFS*/[|prop1|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel.baseline.jsonc deleted file mode 100644 index 6ddd5eb65e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel.baseline.jsonc +++ /dev/null @@ -1,80 +0,0 @@ -// === findAllReferences === -// === /referencesForLabel.ts === - -// /*FIND ALL REFS*/[|label|]: while (true) { -// if (false) break [|label|]; -// if (true) continue [|label|]; -// } -// -// label: while (false) { } -// var label = "label"; - - - - -// === findAllReferences === -// === /referencesForLabel.ts === - -// label: while (true) { -// if (false) /*FIND ALL REFS*/break label; -// if (true) continue label; -// } -// -// label: while (false) { } -// var label = "label"; - - - - -// === findAllReferences === -// === /referencesForLabel.ts === - -// [|label|]: while (true) { -// if (false) break /*FIND ALL REFS*/[|label|]; -// if (true) continue [|label|]; -// } -// -// label: while (false) { } -// var label = "label"; - - - - -// === findAllReferences === -// === /referencesForLabel.ts === - -// label: while (true) { -// if (false) break label; -// if (true) /*FIND ALL REFS*/continue label; -// } -// -// label: while (false) { } -// var label = "label"; - - - - -// === findAllReferences === -// === /referencesForLabel.ts === - -// [|label|]: while (true) { -// if (false) break [|label|]; -// if (true) continue /*FIND ALL REFS*/[|label|]; -// } -// -// label: while (false) { } -// var label = "label"; - - - - -// === findAllReferences === -// === /referencesForLabel.ts === - -// label: while (true) { -// if (false) break label; -// if (true) continue label; -// } -// -// /*FIND ALL REFS*/[|label|]: while (false) { } -// var label = "label"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel2.baseline.jsonc deleted file mode 100644 index f102fc70dc..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel2.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === findAllReferences === -// === /referencesForLabel2.ts === - -// var label = "label"; -// while (true) { -// if (false) break /*FIND ALL REFS*/label; -// if (true) continue label; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel3.baseline.jsonc deleted file mode 100644 index 6679b7164c..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel3.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === findAllReferences === -// === /referencesForLabel3.ts === - -// /*FIND ALL REFS*/[|label|]: while (true) { -// var label = "label"; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel4.baseline.jsonc deleted file mode 100644 index b2622029e5..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel4.baseline.jsonc +++ /dev/null @@ -1,32 +0,0 @@ -// === findAllReferences === -// === /referencesForLabel4.ts === - -// /*FIND ALL REFS*/[|label|]: function foo(label) { -// while (true) { -// break [|label|]; -// } -// } - - - - -// === findAllReferences === -// === /referencesForLabel4.ts === - -// label: function foo(label) { -// while (true) { -// /*FIND ALL REFS*/break label; -// } -// } - - - - -// === findAllReferences === -// === /referencesForLabel4.ts === - -// [|label|]: function foo(label) { -// while (true) { -// break /*FIND ALL REFS*/[|label|]; -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel5.baseline.jsonc deleted file mode 100644 index 1de7e3936e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel5.baseline.jsonc +++ /dev/null @@ -1,118 +0,0 @@ -// === findAllReferences === -// === /referencesForLabel5.ts === - -// /*FIND ALL REFS*/[|label|]: while (true) { -// if (false) break [|label|]; -// function blah() { -// label: while (true) { -// if (false) break label; -// } -// } -// if (false) break [|label|]; -// } - - - - -// === findAllReferences === -// === /referencesForLabel5.ts === - -// label: while (true) { -// if (false) /*FIND ALL REFS*/break label; -// function blah() { -// label: while (true) { -// if (false) break label; -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /referencesForLabel5.ts === - -// [|label|]: while (true) { -// if (false) break /*FIND ALL REFS*/[|label|]; -// function blah() { -// label: while (true) { -// if (false) break label; -// } -// } -// if (false) break [|label|]; -// } - - - - -// === findAllReferences === -// === /referencesForLabel5.ts === - -// label: while (true) { -// if (false) break label; -// function blah() { -// /*FIND ALL REFS*/[|label|]: while (true) { -// if (false) break [|label|]; -// } -// } -// if (false) break label; -// } - - - - -// === findAllReferences === -// === /referencesForLabel5.ts === - -// label: while (true) { -// if (false) break label; -// function blah() { -// label: while (true) { -// if (false) /*FIND ALL REFS*/break label; -// } -// } -// if (false) break label; -// } - - - - -// === findAllReferences === -// === /referencesForLabel5.ts === - -// label: while (true) { -// if (false) break label; -// function blah() { -// [|label|]: while (true) { -// if (false) break /*FIND ALL REFS*/[|label|]; -// } -// } -// if (false) break label; -// } - - - - -// === findAllReferences === -// === /referencesForLabel5.ts === - -// --- (line: 4) skipped --- -// if (false) break label; -// } -// } -// if (false) /*FIND ALL REFS*/break label; -// } - - - - -// === findAllReferences === -// === /referencesForLabel5.ts === - -// [|label|]: while (true) { -// if (false) break [|label|]; -// function blah() { -// label: while (true) { -// if (false) break label; -// } -// } -// if (false) break /*FIND ALL REFS*/[|label|]; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel6.baseline.jsonc deleted file mode 100644 index 5b42b3469d..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForLabel6.baseline.jsonc +++ /dev/null @@ -1,40 +0,0 @@ -// === findAllReferences === -// === /referencesForLabel6.ts === - -// /*FIND ALL REFS*/[|labela|]: while (true) { -// labelb: while (false) { break labelb; } -// break labelc; -// } - - - - -// === findAllReferences === -// === /referencesForLabel6.ts === - -// labela: while (true) { -// /*FIND ALL REFS*/[|labelb|]: while (false) { break [|labelb|]; } -// break labelc; -// } - - - - -// === findAllReferences === -// === /referencesForLabel6.ts === - -// labela: while (true) { -// labelb: while (false) { /*FIND ALL REFS*/break labelb; } -// break labelc; -// } - - - - -// === findAllReferences === -// === /referencesForLabel6.ts === - -// labela: while (true) { -// [|labelb|]: while (false) { break /*FIND ALL REFS*/[|labelb|]; } -// break labelc; -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations.baseline.jsonc deleted file mode 100644 index 0b741b7e9f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations.baseline.jsonc +++ /dev/null @@ -1,154 +0,0 @@ -// === findAllReferences === -// === /referencesForMergedDeclarations.ts === - -// /*FIND ALL REFS*/interface Foo { -// } -// -// module Foo { -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations.ts === - -// interface /*FIND ALL REFS*/[|Foo|] { -// } -// -// module Foo { -// // --- (line: 5) skipped --- - - -// --- (line: 8) skipped --- -// } -// -// var f1: Foo.Bar; -// var f2: [|Foo|]; -// Foo.bind(this); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations.ts === - -// interface Foo { -// } -// -// /*FIND ALL REFS*/module Foo { -// export interface Bar { } -// } -// -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations.ts === - -// interface Foo { -// } -// -// module /*FIND ALL REFS*/[|Foo|] { -// export interface Bar { } -// } -// -// function Foo(): void { -// } -// -// var f1: [|Foo|].Bar; -// var f2: Foo; -// Foo.bind(this); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations.ts === - -// --- (line: 4) skipped --- -// export interface Bar { } -// } -// -// /*FIND ALL REFS*/function Foo(): void { -// } -// -// var f1: Foo.Bar; -// var f2: Foo; -// Foo.bind(this); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations.ts === - -// --- (line: 4) skipped --- -// export interface Bar { } -// } -// -// function /*FIND ALL REFS*/[|Foo|](): void { -// } -// -// var f1: Foo.Bar; -// var f2: Foo; -// [|Foo|].bind(this); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations.ts === - -// interface Foo { -// } -// -// module [|Foo|] { -// export interface Bar { } -// } -// -// function Foo(): void { -// } -// -// var f1: /*FIND ALL REFS*/[|Foo|].Bar; -// var f2: Foo; -// Foo.bind(this); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations.ts === - -// interface [|Foo|] { -// } -// -// module Foo { -// // --- (line: 5) skipped --- - - -// --- (line: 8) skipped --- -// } -// -// var f1: Foo.Bar; -// var f2: /*FIND ALL REFS*/[|Foo|]; -// Foo.bind(this); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations.ts === - -// --- (line: 4) skipped --- -// export interface Bar { } -// } -// -// function [|Foo|](): void { -// } -// -// var f1: Foo.Bar; -// var f2: Foo; -// /*FIND ALL REFS*/[|Foo|].bind(this); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations2.baseline.jsonc deleted file mode 100644 index 2cf2e1cd97..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations2.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === findAllReferences === -// === /referencesForMergedDeclarations2.ts === - -// --- (line: 3) skipped --- -// -// function ATest() { } -// -// /*FIND ALL REFS*/import alias = ATest; // definition -// -// var a: alias.Bar; // namespace -// alias.call(this); // value - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations2.ts === - -// --- (line: 3) skipped --- -// -// function ATest() { } -// -// import /*FIND ALL REFS*/[|alias|] = ATest; // definition -// -// var a: [|alias|].Bar; // namespace -// [|alias|].call(this); // value - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations2.ts === - -// --- (line: 3) skipped --- -// -// function ATest() { } -// -// import [|alias|] = ATest; // definition -// -// var a: /*FIND ALL REFS*/[|alias|].Bar; // namespace -// [|alias|].call(this); // value - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations2.ts === - -// --- (line: 3) skipped --- -// -// function ATest() { } -// -// import [|alias|] = ATest; // definition -// -// var a: [|alias|].Bar; // namespace -// /*FIND ALL REFS*/[|alias|].call(this); // value diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations3.baseline.jsonc deleted file mode 100644 index 34f1c62143..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations3.baseline.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// === findAllReferences === -// === /referencesForMergedDeclarations3.ts === - -// class testClass { -// static staticMethod() { } -// method() { } -// } -// -// module /*FIND ALL REFS*/[|testClass|] { -// export interface Bar { -// -// } -// } -// -// var c1: testClass; -// var c2: [|testClass|].Bar; -// testClass.staticMethod(); -// testClass.prototype.method(); -// testClass.bind(this); -// new testClass(); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations3.ts === - -// class /*FIND ALL REFS*/[|testClass|] { -// static staticMethod() { } -// method() { } -// } -// // --- (line: 5) skipped --- - - -// --- (line: 8) skipped --- -// } -// } -// -// var c1: [|testClass|]; -// var c2: testClass.Bar; -// [|testClass|].staticMethod(); -// [|testClass|].prototype.method(); -// [|testClass|].bind(this); -// new [|testClass|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations4.baseline.jsonc deleted file mode 100644 index 549b9b5a28..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations4.baseline.jsonc +++ /dev/null @@ -1,259 +0,0 @@ -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// /*FIND ALL REFS*/class testClass { -// static staticMethod() { } -// method() { } -// } -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// class /*FIND ALL REFS*/[|testClass|] { -// static staticMethod() { } -// method() { } -// } -// -// module [|testClass|] { -// export interface Bar { -// -// } -// export var s = 0; -// } -// -// var c1: [|testClass|]; -// var c2: [|testClass|].Bar; -// [|testClass|].staticMethod(); -// [|testClass|].prototype.method(); -// [|testClass|].bind(this); -// [|testClass|].s; -// new [|testClass|](); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// class testClass { -// static staticMethod() { } -// method() { } -// } -// -// /*FIND ALL REFS*/module testClass { -// export interface Bar { -// -// } -// // --- (line: 10) skipped --- - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// class [|testClass|] { -// static staticMethod() { } -// method() { } -// } -// -// module /*FIND ALL REFS*/[|testClass|] { -// export interface Bar { -// -// } -// export var s = 0; -// } -// -// var c1: [|testClass|]; -// var c2: [|testClass|].Bar; -// [|testClass|].staticMethod(); -// [|testClass|].prototype.method(); -// [|testClass|].bind(this); -// [|testClass|].s; -// new [|testClass|](); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// class [|testClass|] { -// static staticMethod() { } -// method() { } -// } -// -// module [|testClass|] { -// export interface Bar { -// -// } -// export var s = 0; -// } -// -// var c1: /*FIND ALL REFS*/[|testClass|]; -// var c2: [|testClass|].Bar; -// [|testClass|].staticMethod(); -// [|testClass|].prototype.method(); -// [|testClass|].bind(this); -// [|testClass|].s; -// new [|testClass|](); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// class [|testClass|] { -// static staticMethod() { } -// method() { } -// } -// -// module [|testClass|] { -// export interface Bar { -// -// } -// export var s = 0; -// } -// -// var c1: [|testClass|]; -// var c2: /*FIND ALL REFS*/[|testClass|].Bar; -// [|testClass|].staticMethod(); -// [|testClass|].prototype.method(); -// [|testClass|].bind(this); -// [|testClass|].s; -// new [|testClass|](); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// class [|testClass|] { -// static staticMethod() { } -// method() { } -// } -// -// module [|testClass|] { -// export interface Bar { -// -// } -// export var s = 0; -// } -// -// var c1: [|testClass|]; -// var c2: [|testClass|].Bar; -// /*FIND ALL REFS*/[|testClass|].staticMethod(); -// [|testClass|].prototype.method(); -// [|testClass|].bind(this); -// [|testClass|].s; -// new [|testClass|](); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// class [|testClass|] { -// static staticMethod() { } -// method() { } -// } -// -// module [|testClass|] { -// export interface Bar { -// -// } -// export var s = 0; -// } -// -// var c1: [|testClass|]; -// var c2: [|testClass|].Bar; -// [|testClass|].staticMethod(); -// /*FIND ALL REFS*/[|testClass|].prototype.method(); -// [|testClass|].bind(this); -// [|testClass|].s; -// new [|testClass|](); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// class [|testClass|] { -// static staticMethod() { } -// method() { } -// } -// -// module [|testClass|] { -// export interface Bar { -// -// } -// export var s = 0; -// } -// -// var c1: [|testClass|]; -// var c2: [|testClass|].Bar; -// [|testClass|].staticMethod(); -// [|testClass|].prototype.method(); -// /*FIND ALL REFS*/[|testClass|].bind(this); -// [|testClass|].s; -// new [|testClass|](); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// class [|testClass|] { -// static staticMethod() { } -// method() { } -// } -// -// module [|testClass|] { -// export interface Bar { -// -// } -// export var s = 0; -// } -// -// var c1: [|testClass|]; -// var c2: [|testClass|].Bar; -// [|testClass|].staticMethod(); -// [|testClass|].prototype.method(); -// [|testClass|].bind(this); -// /*FIND ALL REFS*/[|testClass|].s; -// new [|testClass|](); - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations4.ts === - -// class [|testClass|] { -// static staticMethod() { } -// method() { } -// } -// -// module [|testClass|] { -// export interface Bar { -// -// } -// export var s = 0; -// } -// -// var c1: [|testClass|]; -// var c2: [|testClass|].Bar; -// [|testClass|].staticMethod(); -// [|testClass|].prototype.method(); -// [|testClass|].bind(this); -// [|testClass|].s; -// new /*FIND ALL REFS*/[|testClass|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations5.baseline.jsonc deleted file mode 100644 index 0fe019045e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations5.baseline.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// === findAllReferences === -// === /referencesForMergedDeclarations5.ts === - -// interface /*FIND ALL REFS*/[|Foo|] { } -// module Foo { export interface Bar { } } -// function Foo() { } -// -// export = Foo; - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations5.ts === - -// interface Foo { } -// module /*FIND ALL REFS*/[|Foo|] { export interface Bar { } } -// function Foo() { } -// -// export = Foo; - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations5.ts === - -// interface Foo { } -// module Foo { export interface Bar { } } -// function /*FIND ALL REFS*/[|Foo|]() { } -// -// export = [|Foo|]; - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations5.ts === - -// interface Foo { } -// module Foo { export interface Bar { } } -// function [|Foo|]() { } -// -// export = /*FIND ALL REFS*/[|Foo|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations6.baseline.jsonc deleted file mode 100644 index 39c098d007..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations6.baseline.jsonc +++ /dev/null @@ -1,41 +0,0 @@ -// === findAllReferences === -// === /referencesForMergedDeclarations6.ts === - -// interface Foo { } -// /*FIND ALL REFS*/module Foo { -// export interface Bar { } -// export module Bar { export interface Baz { } } -// export function Bar() { } -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations6.ts === - -// interface Foo { } -// module /*FIND ALL REFS*/[|Foo|] { -// export interface Bar { } -// export module Bar { export interface Baz { } } -// export function Bar() { } -// } -// -// // module -// import a1 = [|Foo|]; - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations6.ts === - -// interface Foo { } -// module [|Foo|] { -// export interface Bar { } -// export module Bar { export interface Baz { } } -// export function Bar() { } -// } -// -// // module -// import a1 = /*FIND ALL REFS*/[|Foo|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations7.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations7.baseline.jsonc deleted file mode 100644 index 65002364fe..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations7.baseline.jsonc +++ /dev/null @@ -1,58 +0,0 @@ -// === findAllReferences === -// === /referencesForMergedDeclarations7.ts === - -// interface Foo { } -// module Foo { -// export interface /*FIND ALL REFS*/[|Bar|] { } -// export module Bar { export interface Baz { } } -// export function Bar() { } -// } -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations7.ts === - -// interface Foo { } -// module Foo { -// export interface Bar { } -// export module /*FIND ALL REFS*/[|Bar|] { export interface Baz { } } -// export function Bar() { } -// } -// -// // module, value and type -// import a2 = Foo.[|Bar|]; - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations7.ts === - -// interface Foo { } -// module Foo { -// export interface Bar { } -// export module Bar { export interface Baz { } } -// export function /*FIND ALL REFS*/[|Bar|]() { } -// } -// -// // module, value and type -// import a2 = Foo.Bar; - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations7.ts === - -// interface Foo { } -// module Foo { -// export interface Bar { } -// export module [|Bar|] { export interface Baz { } } -// export function Bar() { } -// } -// -// // module, value and type -// import a2 = Foo./*FIND ALL REFS*/[|Bar|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations8.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations8.baseline.jsonc deleted file mode 100644 index c8286a452c..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForMergedDeclarations8.baseline.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// === findAllReferences === -// === /referencesForMergedDeclarations8.ts === - -// interface Foo { } -// module Foo { -// export interface Bar { } -// /*FIND ALL REFS*/export module Bar { export interface Baz { } } -// export function Bar() { } -// } -// -// // module -// import a3 = Foo.Bar.Baz; - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations8.ts === - -// interface Foo { } -// module Foo { -// export interface Bar { } -// export module /*FIND ALL REFS*/[|Bar|] { export interface Baz { } } -// export function Bar() { } -// } -// -// // module -// import a3 = Foo.[|Bar|].Baz; - - - - -// === findAllReferences === -// === /referencesForMergedDeclarations8.ts === - -// interface Foo { } -// module Foo { -// export interface [|Bar|] { } -// export module [|Bar|] { export interface Baz { } } -// export function [|Bar|]() { } -// } -// -// // module -// import a3 = Foo./*FIND ALL REFS*/[|Bar|].Baz; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForModifiers.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForModifiers.baseline.jsonc deleted file mode 100644 index c522e1120e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForModifiers.baseline.jsonc +++ /dev/null @@ -1,148 +0,0 @@ -// === findAllReferences === -// === /referencesForModifiers.ts === - -// /*FIND ALL REFS*/declare abstract class C1 { -// static a; -// readonly b; -// public c; -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /referencesForModifiers.ts === - -// declare /*FIND ALL REFS*/abstract class C1 { -// static a; -// readonly b; -// public c; -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /referencesForModifiers.ts === - -// declare abstract class C1 { -// /*FIND ALL REFS*/static a; -// readonly b; -// public c; -// protected d; -// // --- (line: 6) skipped --- - - - - -// === findAllReferences === -// === /referencesForModifiers.ts === - -// declare abstract class C1 { -// static a; -// /*FIND ALL REFS*/readonly b; -// public c; -// protected d; -// private e; -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /referencesForModifiers.ts === - -// declare abstract class C1 { -// static a; -// readonly b; -// /*FIND ALL REFS*/public c; -// protected d; -// private e; -// } -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /referencesForModifiers.ts === - -// declare abstract class C1 { -// static a; -// readonly b; -// public c; -// /*FIND ALL REFS*/protected d; -// private e; -// } -// const enum E { -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /referencesForModifiers.ts === - -// declare abstract class C1 { -// static a; -// readonly b; -// public c; -// protected d; -// /*FIND ALL REFS*/private e; -// } -// const enum E { -// } -// async function fn() {} -// export default class C2 {} - - - - -// === findAllReferences === -// === /referencesForModifiers.ts === - -// --- (line: 4) skipped --- -// protected d; -// private e; -// } -// /*FIND ALL REFS*/const enum E { -// } -// async function fn() {} -// export default class C2 {} - - - - -// === findAllReferences === -// === /referencesForModifiers.ts === - -// --- (line: 6) skipped --- -// } -// const enum E { -// } -// /*FIND ALL REFS*/async function fn() {} -// export default class C2 {} - - - - -// === findAllReferences === -// === /referencesForModifiers.ts === - -// --- (line: 7) skipped --- -// const enum E { -// } -// async function fn() {} -// /*FIND ALL REFS*/export default class C2 {} - - - - -// === findAllReferences === -// === /referencesForModifiers.ts === - -// --- (line: 7) skipped --- -// const enum E { -// } -// async function fn() {} -// export /*FIND ALL REFS*/default class C2 {} diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForNoContext.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForNoContext.baseline.jsonc deleted file mode 100644 index 34961ef11d..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForNoContext.baseline.jsonc +++ /dev/null @@ -1,58 +0,0 @@ -// === findAllReferences === -// === /referencesForNoContext.ts === - -// module modTest { -// //Declare -// export var modVar:number; -// /*FIND ALL REFS*/ -// -// //Increments -// modVar++; -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /referencesForNoContext.ts === - -// --- (line: 6) skipped --- -// modVar++; -// -// class testCls{ -// /*FIND ALL REFS*/ -// } -// -// function testFn(){ -// // --- (line: 14) skipped --- - - - - -// === findAllReferences === -// === /referencesForNoContext.ts === - -// --- (line: 12) skipped --- -// function testFn(){ -// //Increments -// modVar++; -// } /*FIND ALL REFS*/ -// -// module testMod { -// } -// } - - - - -// === findAllReferences === -// === /referencesForNoContext.ts === - -// --- (line: 13) skipped --- -// //Increments -// modVar++; -// } -// /*FIND ALL REFS*/ -// module testMod { -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForNumericLiteralPropertyNames.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForNumericLiteralPropertyNames.baseline.jsonc deleted file mode 100644 index 0ecddc1b94..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForNumericLiteralPropertyNames.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === findAllReferences === -// === /referencesForNumericLiteralPropertyNames.ts === - -// class Foo { -// public /*FIND ALL REFS*/[|12|]: any; -// } -// -// var x: Foo; -// x[[|12|]]; -// x = { "[|12|]": 0 }; -// x = { [|12|]: 0 }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForObjectLiteralProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForObjectLiteralProperties.baseline.jsonc deleted file mode 100644 index c4b651e95e..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForObjectLiteralProperties.baseline.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// === findAllReferences === -// === /referencesForObjectLiteralProperties.ts === - -// var x = { /*FIND ALL REFS*/[|add|]: 0, b: "string" }; -// x["[|add|]"]; -// x.[|add|]; -// var y = x; -// y.[|add|]; - - - - -// === findAllReferences === -// === /referencesForObjectLiteralProperties.ts === - -// var x = { [|add|]: 0, b: "string" }; -// x["/*FIND ALL REFS*/[|add|]"]; -// x.[|add|]; -// var y = x; -// y.[|add|]; - - - - -// === findAllReferences === -// === /referencesForObjectLiteralProperties.ts === - -// var x = { [|add|]: 0, b: "string" }; -// x["[|add|]"]; -// x./*FIND ALL REFS*/[|add|]; -// var y = x; -// y.[|add|]; - - - - -// === findAllReferences === -// === /referencesForObjectLiteralProperties.ts === - -// var x = { [|add|]: 0, b: "string" }; -// x["[|add|]"]; -// x.[|add|]; -// var y = x; -// y./*FIND ALL REFS*/[|add|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForOverrides.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForOverrides.baseline.jsonc deleted file mode 100644 index f23de46f3f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForOverrides.baseline.jsonc +++ /dev/null @@ -1,175 +0,0 @@ -// === findAllReferences === -// === /referencesForOverrides.ts === - -// module FindRef3 { -// module SimpleClassTest { -// export class Foo { -// public /*FIND ALL REFS*/[|foo|](): void { -// } -// } -// export class Bar extends Foo { -// public [|foo|](): void { -// } -// } -// } -// // --- (line: 12) skipped --- - - -// --- (line: 58) skipped --- -// -// function test() { -// var x = new SimpleClassTest.Bar(); -// x.[|foo|](); -// -// var y: SimpleInterfaceTest.IBar = null; -// y.ifoo(); -// // --- (line: 66) skipped --- - - - - -// === findAllReferences === -// === /referencesForOverrides.ts === - -// --- (line: 11) skipped --- -// -// module SimpleInterfaceTest { -// export interface IFoo { -// /*FIND ALL REFS*/[|ifoo|](): void; -// } -// export interface IBar extends IFoo { -// [|ifoo|](): void; -// } -// } -// -// // --- (line: 22) skipped --- - - -// --- (line: 61) skipped --- -// x.foo(); -// -// var y: SimpleInterfaceTest.IBar = null; -// y.[|ifoo|](); -// -// var w: SimpleClassInterfaceTest.Bar = null; -// w.icfoo(); -// // --- (line: 69) skipped --- - - - - -// === findAllReferences === -// === /referencesForOverrides.ts === - -// --- (line: 20) skipped --- -// -// module SimpleClassInterfaceTest { -// export interface IFoo { -// /*FIND ALL REFS*/[|icfoo|](): void; -// } -// export class Bar implements IFoo { -// public [|icfoo|](): void { -// } -// } -// } -// // --- (line: 31) skipped --- - - -// --- (line: 64) skipped --- -// y.ifoo(); -// -// var w: SimpleClassInterfaceTest.Bar = null; -// w.[|icfoo|](); -// -// var z = new Test.BarBlah(); -// z.field = ""; -// // --- (line: 72) skipped --- - - - - -// === findAllReferences === -// === /referencesForOverrides.ts === - -// --- (line: 30) skipped --- -// -// module Test { -// export interface IBase { -// /*FIND ALL REFS*/[|field|]: string; -// method(): void; -// } -// -// export interface IBlah extends IBase { -// [|field|]: string; -// } -// -// export interface IBlah2 extends IBlah { -// [|field|]: string; -// } -// -// export interface IDerived extends IBlah2 { -// method(): void; -// } -// -// export class Bar implements IDerived { -// public [|field|]: string; -// public method(): void { } -// } -// -// export class BarBlah extends Bar { -// public [|field|]: string; -// } -// } -// -// // --- (line: 60) skipped --- - - -// --- (line: 67) skipped --- -// w.icfoo(); -// -// var z = new Test.BarBlah(); -// z.[|field|] = ""; -// z.method(); -// } -// } - - - - -// === findAllReferences === -// === /referencesForOverrides.ts === - -// --- (line: 31) skipped --- -// module Test { -// export interface IBase { -// field: string; -// /*FIND ALL REFS*/[|method|](): void; -// } -// -// export interface IBlah extends IBase { -// // --- (line: 39) skipped --- - - -// --- (line: 43) skipped --- -// } -// -// export interface IDerived extends IBlah2 { -// [|method|](): void; -// } -// -// export class Bar implements IDerived { -// public field: string; -// public [|method|](): void { } -// } -// -// export class BarBlah extends Bar { -// // --- (line: 56) skipped --- - - -// --- (line: 68) skipped --- -// -// var z = new Test.BarBlah(); -// z.field = ""; -// z.[|method|](); -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForPropertiesOfGenericType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForPropertiesOfGenericType.baseline.jsonc deleted file mode 100644 index f6074b0c5a..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForPropertiesOfGenericType.baseline.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// === findAllReferences === -// === /referencesForPropertiesOfGenericType.ts === - -// interface IFoo { -// /*FIND ALL REFS*/[|doSomething|](v: T): T; -// } -// -// var x: IFoo; -// x.[|doSomething|]("ss"); -// -// var y: IFoo; -// y.[|doSomething|](12); - - - - -// === findAllReferences === -// === /referencesForPropertiesOfGenericType.ts === - -// interface IFoo { -// [|doSomething|](v: T): T; -// } -// -// var x: IFoo; -// x./*FIND ALL REFS*/[|doSomething|]("ss"); -// -// var y: IFoo; -// y.[|doSomething|](12); - - - - -// === findAllReferences === -// === /referencesForPropertiesOfGenericType.ts === - -// interface IFoo { -// [|doSomething|](v: T): T; -// } -// -// var x: IFoo; -// x.[|doSomething|]("ss"); -// -// var y: IFoo; -// y./*FIND ALL REFS*/[|doSomething|](12); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStatic.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStatic.baseline.jsonc deleted file mode 100644 index 311ea18043..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStatic.baseline.jsonc +++ /dev/null @@ -1,291 +0,0 @@ -// === findAllReferences === -// === /referencesOnStatic_1.ts === - -// var n = 43; -// -// class foo { -// /*FIND ALL REFS*/static n = ''; -// -// public bar() { -// foo.n = "'"; -// // --- (line: 8) skipped --- - - - - -// === findAllReferences === -// === /referencesOnStatic_1.ts === - -// var n = 43; -// -// class foo { -// static /*FIND ALL REFS*/[|n|] = ''; -// -// public bar() { -// foo.[|n|] = "'"; -// if(foo.[|n|]) { -// var x = foo.[|n|]; -// } -// } -// } -// -// class foo2 { -// private x = foo.[|n|]; -// constructor() { -// foo.[|n|] = x; -// } -// -// function b(n) { -// n = foo.[|n|]; -// } -// } - - -// === /referencesOnStatic_2.ts === - -// var q = foo.[|n|]; - - - - -// === findAllReferences === -// === /referencesOnStatic_1.ts === - -// var n = 43; -// -// class foo { -// static [|n|] = ''; -// -// public bar() { -// foo./*FIND ALL REFS*/[|n|] = "'"; -// if(foo.[|n|]) { -// var x = foo.[|n|]; -// } -// } -// } -// -// class foo2 { -// private x = foo.[|n|]; -// constructor() { -// foo.[|n|] = x; -// } -// -// function b(n) { -// n = foo.[|n|]; -// } -// } - - -// === /referencesOnStatic_2.ts === - -// var q = foo.[|n|]; - - - - -// === findAllReferences === -// === /referencesOnStatic_1.ts === - -// var n = 43; -// -// class foo { -// static [|n|] = ''; -// -// public bar() { -// foo.[|n|] = "'"; -// if(foo./*FIND ALL REFS*/[|n|]) { -// var x = foo.[|n|]; -// } -// } -// } -// -// class foo2 { -// private x = foo.[|n|]; -// constructor() { -// foo.[|n|] = x; -// } -// -// function b(n) { -// n = foo.[|n|]; -// } -// } - - -// === /referencesOnStatic_2.ts === - -// var q = foo.[|n|]; - - - - -// === findAllReferences === -// === /referencesOnStatic_1.ts === - -// var n = 43; -// -// class foo { -// static [|n|] = ''; -// -// public bar() { -// foo.[|n|] = "'"; -// if(foo.[|n|]) { -// var x = foo./*FIND ALL REFS*/[|n|]; -// } -// } -// } -// -// class foo2 { -// private x = foo.[|n|]; -// constructor() { -// foo.[|n|] = x; -// } -// -// function b(n) { -// n = foo.[|n|]; -// } -// } - - -// === /referencesOnStatic_2.ts === - -// var q = foo.[|n|]; - - - - -// === findAllReferences === -// === /referencesOnStatic_1.ts === - -// var n = 43; -// -// class foo { -// static [|n|] = ''; -// -// public bar() { -// foo.[|n|] = "'"; -// if(foo.[|n|]) { -// var x = foo.[|n|]; -// } -// } -// } -// -// class foo2 { -// private x = foo./*FIND ALL REFS*/[|n|]; -// constructor() { -// foo.[|n|] = x; -// } -// -// function b(n) { -// n = foo.[|n|]; -// } -// } - - -// === /referencesOnStatic_2.ts === - -// var q = foo.[|n|]; - - - - -// === findAllReferences === -// === /referencesOnStatic_1.ts === - -// var n = 43; -// -// class foo { -// static [|n|] = ''; -// -// public bar() { -// foo.[|n|] = "'"; -// if(foo.[|n|]) { -// var x = foo.[|n|]; -// } -// } -// } -// -// class foo2 { -// private x = foo.[|n|]; -// constructor() { -// foo./*FIND ALL REFS*/[|n|] = x; -// } -// -// function b(n) { -// n = foo.[|n|]; -// } -// } - - -// === /referencesOnStatic_2.ts === - -// var q = foo.[|n|]; - - - - -// === findAllReferences === -// === /referencesOnStatic_1.ts === - -// var n = 43; -// -// class foo { -// static [|n|] = ''; -// -// public bar() { -// foo.[|n|] = "'"; -// if(foo.[|n|]) { -// var x = foo.[|n|]; -// } -// } -// } -// -// class foo2 { -// private x = foo.[|n|]; -// constructor() { -// foo.[|n|] = x; -// } -// -// function b(n) { -// n = foo./*FIND ALL REFS*/[|n|]; -// } -// } - - -// === /referencesOnStatic_2.ts === - -// var q = foo.[|n|]; - - - - -// === findAllReferences === -// === /referencesOnStatic_1.ts === - -// var n = 43; -// -// class foo { -// static [|n|] = ''; -// -// public bar() { -// foo.[|n|] = "'"; -// if(foo.[|n|]) { -// var x = foo.[|n|]; -// } -// } -// } -// -// class foo2 { -// private x = foo.[|n|]; -// constructor() { -// foo.[|n|] = x; -// } -// -// function b(n) { -// n = foo.[|n|]; -// } -// } - - -// === /referencesOnStatic_2.ts === - -// var q = foo./*FIND ALL REFS*/[|n|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStaticsAndMembersWithSameNames.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStaticsAndMembersWithSameNames.baseline.jsonc deleted file mode 100644 index b4cdf5a0e6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStaticsAndMembersWithSameNames.baseline.jsonc +++ /dev/null @@ -1,250 +0,0 @@ -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// module FindRef4 { -// module MixedStaticsClassTest { -// export class Foo { -// /*FIND ALL REFS*/[|bar|]: Foo; -// static bar: Foo; -// -// public foo(): void { -// // --- (line: 8) skipped --- - - -// --- (line: 14) skipped --- -// // instance function -// var x = new MixedStaticsClassTest.Foo(); -// x.foo(); -// x.[|bar|]; -// -// // static function -// MixedStaticsClassTest.Foo.foo(); -// // --- (line: 22) skipped --- - - - - -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// module FindRef4 { -// module MixedStaticsClassTest { -// export class Foo { -// bar: Foo; -// /*FIND ALL REFS*/static bar: Foo; -// -// public foo(): void { -// } -// // --- (line: 9) skipped --- - - - - -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// module FindRef4 { -// module MixedStaticsClassTest { -// export class Foo { -// bar: Foo; -// static /*FIND ALL REFS*/[|bar|]: Foo; -// -// public foo(): void { -// } -// // --- (line: 9) skipped --- - - -// --- (line: 18) skipped --- -// -// // static function -// MixedStaticsClassTest.Foo.foo(); -// MixedStaticsClassTest.Foo.[|bar|]; -// } -// } - - - - -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// --- (line: 3) skipped --- -// bar: Foo; -// static bar: Foo; -// -// /*FIND ALL REFS*/public foo(): void { -// } -// public static foo(): void { -// } -// // --- (line: 11) skipped --- - - - - -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// --- (line: 3) skipped --- -// bar: Foo; -// static bar: Foo; -// -// public /*FIND ALL REFS*/[|foo|](): void { -// } -// public static foo(): void { -// } -// } -// } -// -// function test() { -// // instance function -// var x = new MixedStaticsClassTest.Foo(); -// x.[|foo|](); -// x.bar; -// -// // static function -// // --- (line: 21) skipped --- - - - - -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// --- (line: 5) skipped --- -// -// public foo(): void { -// } -// /*FIND ALL REFS*/public static foo(): void { -// } -// } -// } -// // --- (line: 13) skipped --- - - - - -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// --- (line: 5) skipped --- -// -// public foo(): void { -// } -// public static /*FIND ALL REFS*/[|foo|](): void { -// } -// } -// } -// // --- (line: 13) skipped --- - - -// --- (line: 17) skipped --- -// x.bar; -// -// // static function -// MixedStaticsClassTest.Foo.[|foo|](); -// MixedStaticsClassTest.Foo.bar; -// } -// } - - - - -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// --- (line: 3) skipped --- -// bar: Foo; -// static bar: Foo; -// -// public [|foo|](): void { -// } -// public static foo(): void { -// } -// } -// } -// -// function test() { -// // instance function -// var x = new MixedStaticsClassTest.Foo(); -// x./*FIND ALL REFS*/[|foo|](); -// x.bar; -// -// // static function -// // --- (line: 21) skipped --- - - - - -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// module FindRef4 { -// module MixedStaticsClassTest { -// export class Foo { -// [|bar|]: Foo; -// static bar: Foo; -// -// public foo(): void { -// // --- (line: 8) skipped --- - - -// --- (line: 14) skipped --- -// // instance function -// var x = new MixedStaticsClassTest.Foo(); -// x.foo(); -// x./*FIND ALL REFS*/[|bar|]; -// -// // static function -// MixedStaticsClassTest.Foo.foo(); -// // --- (line: 22) skipped --- - - - - -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// --- (line: 5) skipped --- -// -// public foo(): void { -// } -// public static [|foo|](): void { -// } -// } -// } -// // --- (line: 13) skipped --- - - -// --- (line: 17) skipped --- -// x.bar; -// -// // static function -// MixedStaticsClassTest.Foo./*FIND ALL REFS*/[|foo|](); -// MixedStaticsClassTest.Foo.bar; -// } -// } - - - - -// === findAllReferences === -// === /referencesForStaticsAndMembersWithSameNames.ts === - -// module FindRef4 { -// module MixedStaticsClassTest { -// export class Foo { -// bar: Foo; -// static [|bar|]: Foo; -// -// public foo(): void { -// } -// // --- (line: 9) skipped --- - - -// --- (line: 18) skipped --- -// -// // static function -// MixedStaticsClassTest.Foo.foo(); -// MixedStaticsClassTest.Foo./*FIND ALL REFS*/[|bar|]; -// } -// } diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames.baseline.jsonc deleted file mode 100644 index 20796674ce..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames.ts === - -// class Foo { -// public "/*FIND ALL REFS*/[|ss|]": any; -// } -// -// var x: Foo; -// x.[|ss|]; -// x["[|ss|]"]; -// x = { "[|ss|]": 0 }; -// x = { [|ss|]: 0 }; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames2.baseline.jsonc deleted file mode 100644 index 970e7d9bfc..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames2.baseline.jsonc +++ /dev/null @@ -1,35 +0,0 @@ -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames2.ts === - -// class Foo { -// /*FIND ALL REFS*/"[|blah|]"() { return 0; } -// } -// -// var x: Foo; -// x.[|blah|]; - - - - -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames2.ts === - -// class Foo { -// "/*FIND ALL REFS*/[|blah|]"() { return 0; } -// } -// -// var x: Foo; -// x.[|blah|]; - - - - -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames2.ts === - -// class Foo { -// "[|blah|]"() { return 0; } -// } -// -// var x: Foo; -// x./*FIND ALL REFS*/[|blah|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames3.baseline.jsonc deleted file mode 100644 index b6926bd12f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames3.baseline.jsonc +++ /dev/null @@ -1,66 +0,0 @@ -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames3.ts === - -// class Foo2 { -// /*FIND ALL REFS*/get "42"() { return 0; } -// set 42(n) { } -// } -// -// var y: Foo2; -// y[42]; - - - - -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames3.ts === - -// class Foo2 { -// get "/*FIND ALL REFS*/[|42|]"() { return 0; } -// set [|42|](n) { } -// } -// -// var y: Foo2; -// y[[|42|]]; - - - - -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames3.ts === - -// class Foo2 { -// get "42"() { return 0; } -// /*FIND ALL REFS*/set 42(n) { } -// } -// -// var y: Foo2; -// y[42]; - - - - -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames3.ts === - -// class Foo2 { -// get "[|42|]"() { return 0; } -// set /*FIND ALL REFS*/[|42|](n) { } -// } -// -// var y: Foo2; -// y[[|42|]]; - - - - -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames3.ts === - -// class Foo2 { -// get "[|42|]"() { return 0; } -// set [|42|](n) { } -// } -// -// var y: Foo2; -// y[/*FIND ALL REFS*/[|42|]]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames4.baseline.jsonc deleted file mode 100644 index 8cb9891027..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames4.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames4.ts === - -// var x = { "/*FIND ALL REFS*/[|someProperty|]": 0 } -// x["[|someProperty|]"] = 3; -// x.[|someProperty|] = 5; - - - - -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames4.ts === - -// var x = { "[|someProperty|]": 0 } -// x[/*FIND ALL REFS*/"[|someProperty|]"] = 3; -// x.[|someProperty|] = 5; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames5.baseline.jsonc deleted file mode 100644 index cb3b350388..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames5.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames5.ts === - -// var x = { "/*FIND ALL REFS*/[|someProperty|]": 0 } -// x["[|someProperty|]"] = 3; -// x.[|someProperty|] = 5; - - - - -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames5.ts === - -// var x = { "[|someProperty|]": 0 } -// x["/*FIND ALL REFS*/[|someProperty|]"] = 3; -// x.[|someProperty|] = 5; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames6.baseline.jsonc deleted file mode 100644 index 2a63bb7088..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames6.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames6.ts === - -// const x = function () { return 111111; } -// x./*FIND ALL REFS*/[|someProperty|] = 5; -// x["[|someProperty|]"] = 3; - - - - -// === findAllReferences === -// === /referencesForStringLiteralPropertyNames6.ts === - -// const x = function () { return 111111; } -// x.[|someProperty|] = 5; -// x["/*FIND ALL REFS*/[|someProperty|]"] = 3; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames7.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames7.baseline.jsonc deleted file mode 100644 index 5ec03d47fc..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForStringLiteralPropertyNames7.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === findAllReferences === -// === /foo.js === - -// var x = { "/*FIND ALL REFS*/[|someProperty|]": 0 } -// x["[|someProperty|]"] = 3; -// x.[|someProperty|] = 5; - - - - -// === findAllReferences === -// === /foo.js === - -// var x = { "[|someProperty|]": 0 } -// x["/*FIND ALL REFS*/[|someProperty|]"] = 3; -// x.[|someProperty|] = 5; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForTypeKeywords.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForTypeKeywords.baseline.jsonc deleted file mode 100644 index 92d4825460..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForTypeKeywords.baseline.jsonc +++ /dev/null @@ -1,78 +0,0 @@ -// === findAllReferences === -// === /referencesForTypeKeywords.ts === - -// interface I {} -// function f() {} -// type A1 = T extends U ? 1 : 0; -// type A2 = T extends infer U ? 1 : 0; -// type A3 = { [P in keyof T]: 1 }; -// type A4 = keyof T; -// type A5 = readonly T[]; - - - - -// === findAllReferences === -// === /referencesForTypeKeywords.ts === - -// interface I {} -// function f() {} -// type A1 = T /*FIND ALL REFS*/extends U ? 1 : 0; -// type A2 = T extends infer U ? 1 : 0; -// type A3 = { [P in keyof T]: 1 }; -// type A4 = keyof T; -// type A5 = readonly T[]; - - - - -// === findAllReferences === -// === /referencesForTypeKeywords.ts === - -// interface I {} -// function f() {} -// type A1 = T extends U ? 1 : 0; -// type A2 = T extends /*FIND ALL REFS*/[|infer|] U ? 1 : 0; -// type A3 = { [P in keyof T]: 1 }; -// type A4 = keyof T; -// type A5 = readonly T[]; - - - - -// === findAllReferences === -// === /referencesForTypeKeywords.ts === - -// interface I {} -// function f() {} -// type A1 = T extends U ? 1 : 0; -// type A2 = T extends infer U ? 1 : 0; -// type A3 = { [P /*FIND ALL REFS*/in keyof T]: 1 }; -// type A4 = keyof T; -// type A5 = readonly T[]; - - - - -// === findAllReferences === -// === /referencesForTypeKeywords.ts === - -// interface I {} -// function f() {} -// type A1 = T extends U ? 1 : 0; -// type A2 = T extends infer U ? 1 : 0; -// type A3 = { [P in [|keyof|] T]: 1 }; -// type A4 = /*FIND ALL REFS*/[|keyof|] T; -// type A5 = readonly T[]; - - - - -// === findAllReferences === -// === /referencesForTypeKeywords.ts === - -// --- (line: 3) skipped --- -// type A2 = T extends infer U ? 1 : 0; -// type A3 = { [P in keyof T]: 1 }; -// type A4 = keyof T; -// type A5 = /*FIND ALL REFS*/[|readonly|] T[]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForUnionProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesForUnionProperties.baseline.jsonc deleted file mode 100644 index 4db0a2d74d..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesForUnionProperties.baseline.jsonc +++ /dev/null @@ -1,72 +0,0 @@ -// === findAllReferences === -// === /referencesForUnionProperties.ts === - -// interface One { -// common: { /*FIND ALL REFS*/[|a|]: number; }; -// } -// -// interface Base { -// // --- (line: 6) skipped --- - - -// --- (line: 17) skipped --- -// -// var x : One | Two; -// -// x.common.[|a|]; - - - - -// === findAllReferences === -// === /referencesForUnionProperties.ts === - -// interface One { -// common: { a: number; }; -// } -// -// interface Base { -// /*FIND ALL REFS*/[|a|]: string; -// b: string; -// } -// -// interface HasAOrB extends Base { -// [|a|]: string; -// b: string; -// } -// -// interface Two { -// common: HasAOrB; -// } -// -// var x : One | Two; -// -// x.common.[|a|]; - - - - -// === findAllReferences === -// === /referencesForUnionProperties.ts === - -// interface One { -// common: { [|a|]: number; }; -// } -// -// interface Base { -// [|a|]: string; -// b: string; -// } -// -// interface HasAOrB extends Base { -// [|a|]: string; -// b: string; -// } -// -// interface Two { -// common: HasAOrB; -// } -// -// var x : One | Two; -// -// x.common./*FIND ALL REFS*/[|a|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesInConfiguredProject.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesInConfiguredProject.baseline.jsonc deleted file mode 100644 index 677e1bd466..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesInConfiguredProject.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === findAllReferences === -// === /home/src/workspaces/project/referencesForGlobals_1.ts === - -// class [|globalClass|] { -// public f() { } -// } - - -// === /home/src/workspaces/project/referencesForGlobals_2.ts === - -// var c = /*FIND ALL REFS*/[|globalClass|](); diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesInEmptyFileWithMultipleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesInEmptyFileWithMultipleProjects.baseline.jsonc deleted file mode 100644 index 4ed101013b..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesInEmptyFileWithMultipleProjects.baseline.jsonc +++ /dev/null @@ -1,13 +0,0 @@ -// === findAllReferences === -// === /home/src/workspaces/project/a/a.ts === - -// /// -// /*FIND ALL REFS*/; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/b/b.ts === - -// /*FIND ALL REFS*/; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesInStringLiteralValueWithMultipleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesInStringLiteralValueWithMultipleProjects.baseline.jsonc deleted file mode 100644 index a531446c31..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesInStringLiteralValueWithMultipleProjects.baseline.jsonc +++ /dev/null @@ -1,13 +0,0 @@ -// === findAllReferences === -// === /home/src/workspaces/project/a/a.ts === - -// /// -// const str: string = "hello/*FIND ALL REFS*/"; - - - - -// === findAllReferences === -// === /home/src/workspaces/project/b/b.ts === - -// const str2: string = "hello/*FIND ALL REFS*/"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesToNonPropertyNameStringLiteral.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesToNonPropertyNameStringLiteral.baseline.jsonc deleted file mode 100644 index b108a83ef1..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesToNonPropertyNameStringLiteral.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === findAllReferences === -// === /referencesToNonPropertyNameStringLiteral.ts === - -// const str: string = "hello/*FIND ALL REFS*/"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/ReferencesToStringLiteralValue.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/ReferencesToStringLiteralValue.baseline.jsonc deleted file mode 100644 index 71842e32eb..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/ReferencesToStringLiteralValue.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === findAllReferences === -// === /referencesToStringLiteralValue.ts === - -// const s: string = "some /*FIND ALL REFS*/ string"; diff --git a/testdata/baselines/reference/fourslash/findAllRef/RemoteGetReferences.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/RemoteGetReferences.baseline.jsonc deleted file mode 100644 index c8cc669747..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/RemoteGetReferences.baseline.jsonc +++ /dev/null @@ -1,1941 +0,0 @@ -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 82) skipped --- -// -// //Remotes -// //Type test -// var remoteclsTest: /*FIND ALL REFS*/[|remotefooCls|]; -// -// //Arguments -// remoteclsTest = new [|remotefooCls|](remoteglobalVar); -// remotefoo(remoteglobalVar); -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class [|remotefooCls|] { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// [|remotefooCls|].remoteclsSVar++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 82) skipped --- -// -// //Remotes -// //Type test -// var remoteclsTest: [|remotefooCls|]; -// -// //Arguments -// remoteclsTest = new /*FIND ALL REFS*/[|remotefooCls|](remoteglobalVar); -// remotefoo(remoteglobalVar); -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class [|remotefooCls|] { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// [|remotefooCls|].remoteclsSVar++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls(/*FIND ALL REFS*/[|remoteglobalVar|]); -// remotefoo([|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; -// -// //ETC - Other cases -// [|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var [|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// [|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// [|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls([|remoteglobalVar|]); -// remotefoo(/*FIND ALL REFS*/[|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; -// -// //ETC - Other cases -// [|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var [|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// [|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// [|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 82) skipped --- -// -// //Remotes -// //Type test -// var remoteclsTest: [|remotefooCls|]; -// -// //Arguments -// remoteclsTest = new [|remotefooCls|](remoteglobalVar); -// remotefoo(remoteglobalVar); -// -// //Increments -// /*FIND ALL REFS*/[|remotefooCls|].remoteclsSVar++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class [|remotefooCls|] { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// [|remotefooCls|].remoteclsSVar++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 89) skipped --- -// remotefoo(remoteglobalVar); -// -// //Increments -// remotefooCls./*FIND ALL REFS*/[|remoteclsSVar|]++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static [|remoteclsSVar|] = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// remotefooCls.[|remoteclsSVar|]++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// remotefooCls.[|remoteclsSVar|]++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls.[|remoteclsSVar|]++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls.[|remoteclsSVar|]++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls([|remoteglobalVar|]); -// remotefoo([|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// /*FIND ALL REFS*/[|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; -// -// //ETC - Other cases -// [|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var [|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// [|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// [|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls([|remoteglobalVar|]); -// remotefoo([|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// [|remoteglobalVar|] = /*FIND ALL REFS*/[|remoteglobalVar|] + [|remoteglobalVar|]; -// -// //ETC - Other cases -// [|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var [|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// [|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// [|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls([|remoteglobalVar|]); -// remotefoo([|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// [|remoteglobalVar|] = [|remoteglobalVar|] + /*FIND ALL REFS*/[|remoteglobalVar|]; -// -// //ETC - Other cases -// [|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var [|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// [|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// [|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls([|remoteglobalVar|]); -// remotefoo([|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; -// -// //ETC - Other cases -// /*FIND ALL REFS*/[|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var [|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// [|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// [|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_2.ts === - -// /*FIND ALL REFS*/var remoteglobalVar: number = 2; -// -// class remotefooCls { -// //Declare -// // --- (line: 5) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls([|remoteglobalVar|]); -// remotefoo([|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; -// -// //ETC - Other cases -// [|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var /*FIND ALL REFS*/[|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// [|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// [|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// /*FIND ALL REFS*/class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// // --- (line: 7) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 82) skipped --- -// -// //Remotes -// //Type test -// var remoteclsTest: [|remotefooCls|]; -// -// //Arguments -// remoteclsTest = new [|remotefooCls|](remoteglobalVar); -// remotefoo(remoteglobalVar); -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class /*FIND ALL REFS*/[|remotefooCls|] { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// [|remotefooCls|].remoteclsSVar++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class remotefooCls { -// //Declare -// /*FIND ALL REFS*/[|remoteclsVar|] = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.[|remoteclsVar|]++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// // --- (line: 15) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// /*FIND ALL REFS*/static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// // --- (line: 10) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 89) skipped --- -// remotefoo(remoteglobalVar); -// -// //Increments -// remotefooCls.[|remoteclsSVar|]++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static /*FIND ALL REFS*/[|remoteclsSVar|] = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// remotefooCls.[|remoteclsSVar|]++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// remotefooCls.[|remoteclsSVar|]++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls.[|remoteclsSVar|]++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls.[|remoteclsSVar|]++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls([|remoteglobalVar|]); -// remotefoo([|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; -// -// //ETC - Other cases -// [|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var [|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// /*FIND ALL REFS*/[|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// [|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class remotefooCls { -// //Declare -// [|remoteclsVar|] = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this./*FIND ALL REFS*/[|remoteclsVar|]++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// // --- (line: 15) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 82) skipped --- -// -// //Remotes -// //Type test -// var remoteclsTest: [|remotefooCls|]; -// -// //Arguments -// remoteclsTest = new [|remotefooCls|](remoteglobalVar); -// remotefoo(remoteglobalVar); -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class [|remotefooCls|] { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// /*FIND ALL REFS*/[|remotefooCls|].remoteclsSVar++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 89) skipped --- -// remotefoo(remoteglobalVar); -// -// //Increments -// remotefooCls.[|remoteclsSVar|]++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static [|remoteclsSVar|] = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// remotefooCls./*FIND ALL REFS*/[|remoteclsSVar|]++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// remotefooCls.[|remoteclsSVar|]++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls.[|remoteclsSVar|]++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls.[|remoteclsSVar|]++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 82) skipped --- -// -// //Remotes -// //Type test -// var remoteclsTest: [|remotefooCls|]; -// -// //Arguments -// remoteclsTest = new [|remotefooCls|](remoteglobalVar); -// remotefoo(remoteglobalVar); -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class [|remotefooCls|] { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// [|remotefooCls|].remoteclsSVar++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// /*FIND ALL REFS*/[|remotefooCls|].remoteclsSVar++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 89) skipped --- -// remotefoo(remoteglobalVar); -// -// //Increments -// remotefooCls.[|remoteclsSVar|]++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static [|remoteclsSVar|] = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// remotefooCls.[|remoteclsSVar|]++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// remotefooCls./*FIND ALL REFS*/[|remoteclsSVar|]++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls.[|remoteclsSVar|]++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls.[|remoteclsSVar|]++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls([|remoteglobalVar|]); -// remotefoo([|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; -// -// //ETC - Other cases -// [|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var [|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// [|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// /*FIND ALL REFS*/[|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls([|remoteglobalVar|]); -// remotefoo([|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; -// -// //ETC - Other cases -// [|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var [|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// [|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// [|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// /*FIND ALL REFS*/[|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 82) skipped --- -// -// //Remotes -// //Type test -// var remoteclsTest: [|remotefooCls|]; -// -// //Arguments -// remoteclsTest = new [|remotefooCls|](remoteglobalVar); -// remotefoo(remoteglobalVar); -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class [|remotefooCls|] { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// [|remotefooCls|].remoteclsSVar++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// /*FIND ALL REFS*/[|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 89) skipped --- -// remotefoo(remoteglobalVar); -// -// //Increments -// remotefooCls.[|remoteclsSVar|]++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static [|remoteclsSVar|] = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// remotefooCls.[|remoteclsSVar|]++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// remotefooCls.[|remoteclsSVar|]++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls./*FIND ALL REFS*/[|remoteclsSVar|]++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls.[|remoteclsSVar|]++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 85) skipped --- -// var remoteclsTest: remotefooCls; -// -// //Arguments -// remoteclsTest = new remotefooCls([|remoteglobalVar|]); -// remotefoo([|remoteglobalVar|]); -// -// //Increments -// remotefooCls.remoteclsSVar++; -// remotemodTest.remotemodVar++; -// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; -// -// //ETC - Other cases -// [|remoteglobalVar|] = 3; -// -// //Find References misses method param -// var -// // --- (line: 102) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var [|remoteglobalVar|]: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// [|remoteglobalVar|]++; -// this.remoteclsVar++; -// remotefooCls.remoteclsSVar++; -// this.remoteclsParam++; -// // --- (line: 14) skipped --- - - -// --- (line: 20) skipped --- -// -// //Increments -// remotefooCls.remoteclsSVar++; -// [|remoteglobalVar|]++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// -// // --- (line: 28) skipped --- - - -// --- (line: 33) skipped --- -// export var remotemodVar: number; -// -// //Increments -// [|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// -// // --- (line: 41) skipped --- - - -// --- (line: 45) skipped --- -// static remoteboo = remotefoo; -// -// //Increments -// /*FIND ALL REFS*/[|remoteglobalVar|]++; -// remotefooCls.remoteclsSVar++; -// remotemodVar++; -// } -// // --- (line: 53) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 82) skipped --- -// -// //Remotes -// //Type test -// var remoteclsTest: [|remotefooCls|]; -// -// //Arguments -// remoteclsTest = new [|remotefooCls|](remoteglobalVar); -// remotefoo(remoteglobalVar); -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class [|remotefooCls|] { -// //Declare -// remoteclsVar = 1; -// static remoteclsSVar = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// [|remotefooCls|].remoteclsSVar++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// [|remotefooCls|].remoteclsSVar++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// [|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// /*FIND ALL REFS*/[|remotefooCls|].remoteclsSVar++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- - - - - -// === findAllReferences === -// === /remoteGetReferences_1.ts === - -// --- (line: 89) skipped --- -// remotefoo(remoteglobalVar); -// -// //Increments -// remotefooCls.[|remoteclsSVar|]++; -// remotemodTest.remotemodVar++; -// remoteglobalVar = remoteglobalVar + remoteglobalVar; -// -// // --- (line: 97) skipped --- - - -// === /remoteGetReferences_2.ts === - -// var remoteglobalVar: number = 2; -// -// class remotefooCls { -// //Declare -// remoteclsVar = 1; -// static [|remoteclsSVar|] = 1; -// -// constructor(public remoteclsParam: number) { -// //Increments -// remoteglobalVar++; -// this.remoteclsVar++; -// remotefooCls.[|remoteclsSVar|]++; -// this.remoteclsParam++; -// remotemodTest.remotemodVar++; -// } -// // --- (line: 16) skipped --- - - -// --- (line: 19) skipped --- -// var remotefnVar = 1; -// -// //Increments -// remotefooCls.[|remoteclsSVar|]++; -// remoteglobalVar++; -// remotemodTest.remotemodVar++; -// remotefnVar++; -// // --- (line: 27) skipped --- - - -// --- (line: 34) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls.[|remoteclsSVar|]++; -// remotemodVar++; -// -// class remotetestCls { -// // --- (line: 42) skipped --- - - -// --- (line: 46) skipped --- -// -// //Increments -// remoteglobalVar++; -// remotefooCls./*FIND ALL REFS*/[|remoteclsSVar|]++; -// remotemodVar++; -// } -// -// // --- (line: 54) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/RenameJsExports02.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/RenameJsExports02.baseline.jsonc deleted file mode 100644 index acdb42aec6..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/RenameJsExports02.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// module.exports = class /*FIND ALL REFS*/[|A|] {} - - - - -// === findAllReferences === -// === /b.js === - -// const /*FIND ALL REFS*/[|A|] = require("./a"); diff --git a/testdata/baselines/reference/fourslash/findAllRef/RenameJsExports03.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/RenameJsExports03.baseline.jsonc deleted file mode 100644 index e0fd047e6b..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/RenameJsExports03.baseline.jsonc +++ /dev/null @@ -1,36 +0,0 @@ -// === findAllReferences === -// === /a.js === - -// class /*FIND ALL REFS*/[|A|] { -// constructor() { } -// } -// module.exports = [|A|]; - - - - -// === findAllReferences === -// === /a.js === - -// class [|A|] { -// /*FIND ALL REFS*/constructor() { } -// } -// module.exports = [|A|]; - - - - -// === findAllReferences === -// === /b.js === - -// const /*FIND ALL REFS*/[|A|] = require("./a"); -// new [|A|]; - - - - -// === findAllReferences === -// === /b.js === - -// const [|A|] = require("./a"); -// new /*FIND ALL REFS*/[|A|]; diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences1.baseline.jsonc deleted file mode 100644 index 01c418bc1b..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences1.baseline.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// declare module JSX { -// interface Element { } -// interface IntrinsicElements { -// /*FIND ALL REFS*/[|div|]: { -// name?: string; -// isOpen?: boolean; -// }; -// span: { n: string; }; -// } -// } -// var x = <[|div|] />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 7) skipped --- -// span: { n: string; }; -// } -// } -// var x = /*FIND ALL REFS*/
; - - - - -// === findAllReferences === -// === /file.tsx === - -// declare module JSX { -// interface Element { } -// interface IntrinsicElements { -// [|div|]: { -// name?: string; -// isOpen?: boolean; -// }; -// span: { n: string; }; -// } -// } -// var x = ; diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences10.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences10.baseline.jsonc deleted file mode 100644 index 0b6ea0c89d..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences10.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// className?: string; -// } -// interface ButtonProps extends ClickableProps { -// /*FIND ALL REFS*/[|onClick|](event?: React.MouseEvent): void; -// } -// interface LinkProps extends ClickableProps { -// goTo: string; -// // --- (line: 16) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences11.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences11.baseline.jsonc deleted file mode 100644 index 8e1dfbe19f..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences11.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// --- (line: 16) skipped --- -// declare function MainButton(buttonProps: ButtonProps): JSX.Element; -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences2.baseline.jsonc deleted file mode 100644 index 86ad70002b..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences2.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// declare module JSX { -// interface Element { } -// interface IntrinsicElements { -// div: { -// /*FIND ALL REFS*/[|name|]?: string; -// isOpen?: boolean; -// }; -// span: { n: string; }; -// // --- (line: 9) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences3.baseline.jsonc deleted file mode 100644 index 57c04e416b..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences3.baseline.jsonc +++ /dev/null @@ -1,13 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// --- (line: 5) skipped --- -// } -// class MyClass { -// props: { -// /*FIND ALL REFS*/[|name|]?: string; -// size?: number; -// } -// -// -// var x = ; diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences5.baseline.jsonc deleted file mode 100644 index d528f1bf15..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences5.baseline.jsonc +++ /dev/null @@ -1,185 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: string -// optional?: boolean -// } -// /*FIND ALL REFS*/declare function Opt(attributes: OptionPropBag): JSX.Element; -// let opt = ; -// let opt1 = ; -// let opt2 = ; -// let opt3 = ; -// let opt4 = ; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: string -// optional?: boolean -// } -// declare function /*FIND ALL REFS*/[|Opt|](attributes: OptionPropBag): JSX.Element; -// let opt = <[|Opt|] />; -// let opt1 = <[|Opt|] propx={100} propString />; -// let opt2 = <[|Opt|] propx={100} optional/>; -// let opt3 = <[|Opt|] wrong />; -// let opt4 = <[|Opt|] propx={100} propString="hi" />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 9) skipped --- -// optional?: boolean -// } -// declare function Opt(attributes: OptionPropBag): JSX.Element; -// let opt = /*FIND ALL REFS*/; -// let opt1 = ; -// let opt2 = ; -// let opt3 = ; -// let opt4 = ; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: string -// optional?: boolean -// } -// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; -// let opt = ; -// let opt1 = <[|Opt|] propx={100} propString />; -// let opt2 = <[|Opt|] propx={100} optional/>; -// let opt3 = <[|Opt|] wrong />; -// let opt4 = <[|Opt|] propx={100} propString="hi" />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 10) skipped --- -// } -// declare function Opt(attributes: OptionPropBag): JSX.Element; -// let opt = ; -// let opt1 = /*FIND ALL REFS*/; -// let opt2 = ; -// let opt3 = ; -// let opt4 = ; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: string -// optional?: boolean -// } -// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; -// let opt = <[|Opt|] />; -// let opt1 = ; -// let opt2 = <[|Opt|] propx={100} optional/>; -// let opt3 = <[|Opt|] wrong />; -// let opt4 = <[|Opt|] propx={100} propString="hi" />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 11) skipped --- -// declare function Opt(attributes: OptionPropBag): JSX.Element; -// let opt = ; -// let opt1 = ; -// let opt2 = /*FIND ALL REFS*/; -// let opt3 = ; -// let opt4 = ; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: string -// optional?: boolean -// } -// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; -// let opt = <[|Opt|] />; -// let opt1 = <[|Opt|] propx={100} propString />; -// let opt2 = ; -// let opt3 = <[|Opt|] wrong />; -// let opt4 = <[|Opt|] propx={100} propString="hi" />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 12) skipped --- -// let opt = ; -// let opt1 = ; -// let opt2 = ; -// let opt3 = /*FIND ALL REFS*/; -// let opt4 = ; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: string -// optional?: boolean -// } -// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; -// let opt = <[|Opt|] />; -// let opt1 = <[|Opt|] propx={100} propString />; -// let opt2 = <[|Opt|] propx={100} optional/>; -// let opt3 = ; -// let opt4 = <[|Opt|] propx={100} propString="hi" />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// let opt1 = ; -// let opt2 = ; -// let opt3 = ; -// let opt4 = /*FIND ALL REFS*/; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: string -// optional?: boolean -// } -// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; -// let opt = <[|Opt|] />; -// let opt1 = <[|Opt|] propx={100} propString />; -// let opt2 = <[|Opt|] propx={100} optional/>; -// let opt3 = <[|Opt|] wrong />; -// let opt4 = ; diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences6.baseline.jsonc deleted file mode 100644 index 3e0b7e2016..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences6.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// --- (line: 9) skipped --- -// optional?: boolean -// } -// declare function Opt(attributes: OptionPropBag): JSX.Element; -// let opt = ; diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences7.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences7.baseline.jsonc deleted file mode 100644 index 99ce269af9..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences7.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// --- (line: 4) skipped --- -// interface ElementAttributesProperty { props; } -// } -// interface OptionPropBag { -// /*FIND ALL REFS*/[|propx|]: number -// propString: string -// optional?: boolean -// } -// // --- (line: 12) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences8.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences8.baseline.jsonc deleted file mode 100644 index 44906820c0..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences8.baseline.jsonc +++ /dev/null @@ -1,311 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// /*FIND ALL REFS*/declare function MainButton(buttonProps: ButtonProps): JSX.Element; -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// // --- (line: 21) skipped --- - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function /*FIND ALL REFS*/[|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; -// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; -// let opt = <[|MainButton|] />; -// let opt = <[|MainButton|] children="chidlren" />; -// let opt = <[|MainButton|] onClick={()=>{}} />; -// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; -// let opt = <[|MainButton|] goTo="goTo" />; -// let opt = <[|MainButton|] wrong />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 14) skipped --- -// goTo: string; -// } -// declare function MainButton(buttonProps: ButtonProps): JSX.Element; -// /*FIND ALL REFS*/declare function MainButton(linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// let opt = ; -// // --- (line: 22) skipped --- - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function /*FIND ALL REFS*/[|MainButton|](linkProps: LinkProps): JSX.Element; -// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; -// let opt = <[|MainButton|] />; -// let opt = <[|MainButton|] children="chidlren" />; -// let opt = <[|MainButton|] onClick={()=>{}} />; -// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; -// let opt = <[|MainButton|] goTo="goTo" />; -// let opt = <[|MainButton|] wrong />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 15) skipped --- -// } -// declare function MainButton(buttonProps: ButtonProps): JSX.Element; -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// /*FIND ALL REFS*/declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// let opt = ; -// let opt = {}} />; -// // --- (line: 23) skipped --- - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; -// declare function /*FIND ALL REFS*/[|MainButton|](props: ButtonProps | LinkProps): JSX.Element; -// let opt = <[|MainButton|] />; -// let opt = <[|MainButton|] children="chidlren" />; -// let opt = <[|MainButton|] onClick={()=>{}} />; -// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; -// let opt = <[|MainButton|] goTo="goTo" />; -// let opt = <[|MainButton|] wrong />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 16) skipped --- -// declare function MainButton(buttonProps: ButtonProps): JSX.Element; -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = /*FIND ALL REFS*/; -// let opt = ; -// let opt = {}} />; -// let opt = {}} ignore-prop />; -// let opt = ; -// let opt = ; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; -// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// let opt = <[|MainButton|] children="chidlren" />; -// let opt = <[|MainButton|] onClick={()=>{}} />; -// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; -// let opt = <[|MainButton|] goTo="goTo" />; -// let opt = <[|MainButton|] wrong />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 17) skipped --- -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// let opt = /*FIND ALL REFS*/; -// let opt = {}} />; -// let opt = {}} ignore-prop />; -// let opt = ; -// let opt = ; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; -// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; -// let opt = <[|MainButton|] />; -// let opt = ; -// let opt = <[|MainButton|] onClick={()=>{}} />; -// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; -// let opt = <[|MainButton|] goTo="goTo" />; -// let opt = <[|MainButton|] wrong />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 18) skipped --- -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// let opt = ; -// let opt = /*FIND ALL REFS*/{}} />; -// let opt = {}} ignore-prop />; -// let opt = ; -// let opt = ; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; -// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; -// let opt = <[|MainButton|] />; -// let opt = <[|MainButton|] children="chidlren" />; -// let opt = {}} />; -// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; -// let opt = <[|MainButton|] goTo="goTo" />; -// let opt = <[|MainButton|] wrong />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 19) skipped --- -// let opt = ; -// let opt = ; -// let opt = {}} />; -// let opt = /*FIND ALL REFS*/{}} ignore-prop />; -// let opt = ; -// let opt = ; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; -// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; -// let opt = <[|MainButton|] />; -// let opt = <[|MainButton|] children="chidlren" />; -// let opt = <[|MainButton|] onClick={()=>{}} />; -// let opt = {}} ignore-prop />; -// let opt = <[|MainButton|] goTo="goTo" />; -// let opt = <[|MainButton|] wrong />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 20) skipped --- -// let opt = ; -// let opt = {}} />; -// let opt = {}} ignore-prop />; -// let opt = /*FIND ALL REFS*/; -// let opt = ; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; -// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; -// let opt = <[|MainButton|] />; -// let opt = <[|MainButton|] children="chidlren" />; -// let opt = <[|MainButton|] onClick={()=>{}} />; -// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; -// let opt = ; -// let opt = <[|MainButton|] wrong />; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 21) skipped --- -// let opt = {}} />; -// let opt = {}} ignore-prop />; -// let opt = ; -// let opt = /*FIND ALL REFS*/; - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; -// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; -// let opt = <[|MainButton|] />; -// let opt = <[|MainButton|] children="chidlren" />; -// let opt = <[|MainButton|] onClick={()=>{}} />; -// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; -// let opt = <[|MainButton|] goTo="goTo" />; -// let opt = ; diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences9.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences9.baseline.jsonc deleted file mode 100644 index 8d8013277b..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferences9.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// --- (line: 11) skipped --- -// onClick(event?: React.MouseEvent): void; -// } -// interface LinkProps extends ClickableProps { -// /*FIND ALL REFS*/[|goTo|]: string; -// } -// declare function MainButton(buttonProps: ButtonProps): JSX.Element; -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// // --- (line: 19) skipped --- diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferencesUnionElementType1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferencesUnionElementType1.baseline.jsonc deleted file mode 100644 index 8fe7b18660..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferencesUnionElementType1.baseline.jsonc +++ /dev/null @@ -1,47 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// --- (line: 9) skipped --- -// function SFC2(prop: { x: boolean }) { -// return

World

; -// } -// /*FIND ALL REFS*/var SFCComp = SFC1 || SFC2; -// - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 9) skipped --- -// function SFC2(prop: { x: boolean }) { -// return

World

; -// } -// var /*FIND ALL REFS*/[|SFCComp|] = SFC1 || SFC2; -// <[|SFCComp|] x={ "hi" } /> - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 10) skipped --- -// return

World

; -// } -// var SFCComp = SFC1 || SFC2; -// /*FIND ALL REFS*/ - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 9) skipped --- -// function SFC2(prop: { x: boolean }) { -// return

World

; -// } -// var [|SFCComp|] = SFC1 || SFC2; -// diff --git a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferencesUnionElementType2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferencesUnionElementType2.baseline.jsonc deleted file mode 100644 index fc1df9cfc5..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/TsxFindAllReferencesUnionElementType2.baseline.jsonc +++ /dev/null @@ -1,47 +0,0 @@ -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// } -// private method() { } -// } -// /*FIND ALL REFS*/var RCComp = RC1 || RC2; -// - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// } -// private method() { } -// } -// var /*FIND ALL REFS*/[|RCComp|] = RC1 || RC2; -// <[|RCComp|] /> - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 9) skipped --- -// private method() { } -// } -// var RCComp = RC1 || RC2; -// /*FIND ALL REFS*/ - - - - -// === findAllReferences === -// === /file.tsx === - -// --- (line: 8) skipped --- -// } -// private method() { } -// } -// var [|RCComp|] = RC1 || RC2; -// diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesTripleSlash.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/FindAllReferencesTripleSlash.baseline.jsonc similarity index 79% rename from testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesTripleSlash.baseline.jsonc rename to testdata/baselines/reference/fourslash/findAllReferences/FindAllReferencesTripleSlash.baseline.jsonc index ff21e68ef0..952ecb8e3b 100644 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllReferencesTripleSlash.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/FindAllReferencesTripleSlash.baseline.jsonc @@ -1,14 +1,11 @@ // === findAllReferences === // === /a.ts === - // /// // /// - // === findAllReferences === // === /a.ts === - // /// -// /// +// /// \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsReExport_broken.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/FindAllRefsReExport_broken.baseline.jsonc similarity index 77% rename from testdata/baselines/reference/fourslash/findAllRef/FindAllRefsReExport_broken.baseline.jsonc rename to testdata/baselines/reference/fourslash/findAllReferences/FindAllRefsReExport_broken.baseline.jsonc index 3f5ad70a2c..68ba7882f2 100644 --- a/testdata/baselines/reference/fourslash/findAllRef/FindAllRefsReExport_broken.baseline.jsonc +++ b/testdata/baselines/reference/fourslash/findAllReferences/FindAllRefsReExport_broken.baseline.jsonc @@ -1,12 +1,9 @@ // === findAllReferences === // === /a.ts === - // /*FIND ALL REFS*/export { x }; - // === findAllReferences === // === /a.ts === - -// export { /*FIND ALL REFS*/x }; +// export { /*FIND ALL REFS*/x }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/ambientShorthandFindAllRefs.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/ambientShorthandFindAllRefs.baseline.jsonc new file mode 100644 index 0000000000..41dd664993 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/ambientShorthandFindAllRefs.baseline.jsonc @@ -0,0 +1,9 @@ +// === findAllReferences === +// === /user.ts === +// import {/*FIND ALL REFS*/[|x|]} from "jquery"; + + + +// === findAllReferences === +// === /user2.ts === +// import {/*FIND ALL REFS*/[|x|]} from "jquery"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/autoImportProvider_referencesCrash.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/autoImportProvider_referencesCrash.baseline.jsonc new file mode 100644 index 0000000000..a1f16deccb --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/autoImportProvider_referencesCrash.baseline.jsonc @@ -0,0 +1,9 @@ +// === findAllReferences === +// === /home/src/workspaces/project/a/index.d.ts === +// declare class [|A|] { +// } +// //# sourceMappingURL=index.d.ts.map + +// === /home/src/workspaces/project/b/b.ts === +// /// +// new [|A|]/*FIND ALL REFS*/(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences1.baseline.jsonc new file mode 100644 index 0000000000..360000f99d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences1.baseline.jsonc @@ -0,0 +1,8 @@ +// === findAllReferences === +// === /constructorFindAllReferences1.ts === +// export class C { +// /*FIND ALL REFS*/public constructor() { } +// public foo() { } +// } +// +// new C().foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences2.baseline.jsonc new file mode 100644 index 0000000000..ebe82fac1e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences2.baseline.jsonc @@ -0,0 +1,8 @@ +// === findAllReferences === +// === /constructorFindAllReferences2.ts === +// export class C { +// /*FIND ALL REFS*/private constructor() { } +// public foo() { } +// } +// +// new C().foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences3.baseline.jsonc new file mode 100644 index 0000000000..9876967d32 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences3.baseline.jsonc @@ -0,0 +1,8 @@ +// === findAllReferences === +// === /constructorFindAllReferences3.ts === +// export class [|C|] { +// /*FIND ALL REFS*/constructor() { } +// public foo() { } +// } +// +// new [|C|]().foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences4.baseline.jsonc new file mode 100644 index 0000000000..a9c98eaea2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/constructorFindAllReferences4.baseline.jsonc @@ -0,0 +1,8 @@ +// === findAllReferences === +// === /constructorFindAllReferences4.ts === +// export class C { +// /*FIND ALL REFS*/protected constructor() { } +// public foo() { } +// } +// +// new C().foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/esModuleInteropFindAllReferences.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/esModuleInteropFindAllReferences.baseline.jsonc new file mode 100644 index 0000000000..4d5f38434d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/esModuleInteropFindAllReferences.baseline.jsonc @@ -0,0 +1,29 @@ +// === findAllReferences === +// === /abc.d.ts === +// declare module "a" { +// /*FIND ALL REFS*/export const x: number; +// } + + + +// === findAllReferences === +// === /abc.d.ts === +// declare module "a" { +// export const /*FIND ALL REFS*/[|x|]: number; +// } + +// === /b.ts === +// import a from "a"; +// a.[|x|]; + + + +// === findAllReferences === +// === /abc.d.ts === +// declare module "a" { +// export const [|x|]: number; +// } + +// === /b.ts === +// import a from "a"; +// a./*FIND ALL REFS*/[|x|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/esModuleInteropFindAllReferences2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/esModuleInteropFindAllReferences2.baseline.jsonc new file mode 100644 index 0000000000..59537e30fd --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/esModuleInteropFindAllReferences2.baseline.jsonc @@ -0,0 +1,26 @@ +// === findAllReferences === +// === /a.d.ts === +// export as namespace abc; +// /*FIND ALL REFS*/export const x: number; + + + +// === findAllReferences === +// === /a.d.ts === +// export as namespace abc; +// export const /*FIND ALL REFS*/[|x|]: number; + +// === /b.ts === +// import a from "./a"; +// a.[|x|]; + + + +// === findAllReferences === +// === /a.d.ts === +// export as namespace abc; +// export const [|x|]: number; + +// === /b.ts === +// import a from "./a"; +// a./*FIND ALL REFS*/[|x|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/explainFilesNodeNextWithTypesReference.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/explainFilesNodeNextWithTypesReference.baseline.jsonc new file mode 100644 index 0000000000..dbb948be89 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/explainFilesNodeNextWithTypesReference.baseline.jsonc @@ -0,0 +1,5 @@ +// === findAllReferences === +// === /node_modules/react-hook-form/dist/index.d.ts === +// /// +// export type Foo = React.Whatever; +// export function useForm(): any; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferPropertyAccessExpressionHeritageClause.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferPropertyAccessExpressionHeritageClause.baseline.jsonc new file mode 100644 index 0000000000..33a4389032 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferPropertyAccessExpressionHeritageClause.baseline.jsonc @@ -0,0 +1,30 @@ +// === findAllReferences === +// === /findAllReferPropertyAccessExpressionHeritageClause.ts === +// class B {} +// function foo() { +// return {/*FIND ALL REFS*/[|B|]: B}; +// } +// class C extends (foo()).[|B|] {} +// class C1 extends foo().[|B|] {} + + + +// === findAllReferences === +// === /findAllReferPropertyAccessExpressionHeritageClause.ts === +// class B {} +// function foo() { +// return {[|B|]: B}; +// } +// class C extends (foo())./*FIND ALL REFS*/[|B|] {} +// class C1 extends foo().[|B|] {} + + + +// === findAllReferences === +// === /findAllReferPropertyAccessExpressionHeritageClause.ts === +// class B {} +// function foo() { +// return {[|B|]: B}; +// } +// class C extends (foo()).[|B|] {} +// class C1 extends foo()./*FIND ALL REFS*/[|B|] {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesDynamicImport2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesDynamicImport2.baseline.jsonc new file mode 100644 index 0000000000..eeeb1aa1ac --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesDynamicImport2.baseline.jsonc @@ -0,0 +1,17 @@ +// === findAllReferences === +// === /foo.ts === +// export function /*FIND ALL REFS*/[|bar|]() { return "bar"; } +// var x = import("./foo"); +// x.then(foo => { +// foo.[|bar|](); +// }) + + + +// === findAllReferences === +// === /foo.ts === +// export function [|bar|]() { return "bar"; } +// var x = import("./foo"); +// x.then(foo => { +// foo./*FIND ALL REFS*/[|bar|](); +// }) \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesDynamicImport3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesDynamicImport3.baseline.jsonc new file mode 100644 index 0000000000..456169201b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesDynamicImport3.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /foo.ts === +// export function /*FIND ALL REFS*/[|bar|]() { return "bar"; } +// import('./foo').then(({ [|bar|] }) => undefined); + + + +// === findAllReferences === +// === /foo.ts === +// export function [|bar|]() { return "bar"; } +// import('./foo').then(({ /*FIND ALL REFS*/[|bar|] }) => undefined); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFilteringMappedTypeProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFilteringMappedTypeProperty.baseline.jsonc new file mode 100644 index 0000000000..43a226d585 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFilteringMappedTypeProperty.baseline.jsonc @@ -0,0 +1,21 @@ +// === findAllReferences === +// === /findAllReferencesFilteringMappedTypeProperty.ts === +// const obj = { /*FIND ALL REFS*/[|a|]: 1, b: 2 }; +// const filtered: { [P in keyof typeof obj as P extends 'b' ? never : P]: 0; } = { [|a|]: 0 }; +// filtered.[|a|]; + + + +// === findAllReferences === +// === /findAllReferencesFilteringMappedTypeProperty.ts === +// const obj = { [|a|]: 1, b: 2 }; +// const filtered: { [P in keyof typeof obj as P extends 'b' ? never : P]: 0; } = { /*FIND ALL REFS*/[|a|]: 0 }; +// filtered.[|a|]; + + + +// === findAllReferences === +// === /findAllReferencesFilteringMappedTypeProperty.ts === +// const obj = { [|a|]: 1, b: 2 }; +// const filtered: { [P in keyof typeof obj as P extends 'b' ? never : P]: 0; } = { [|a|]: 0 }; +// filtered./*FIND ALL REFS*/[|a|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference1.baseline.jsonc new file mode 100644 index 0000000000..408f4e9f88 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference1.baseline.jsonc @@ -0,0 +1,6 @@ +// === findAllReferences === +// === /findAllReferencesFromLinkTagReference1.ts === +// enum E { +// /** {@link /*FIND ALL REFS*/[|A|]} */ +// [|A|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference2.baseline.jsonc new file mode 100644 index 0000000000..d13a60bfb3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference2.baseline.jsonc @@ -0,0 +1,9 @@ +// === findAllReferences === +// === /a.ts === +// enum E { +// /** {@link /*FIND ALL REFS*/[|Foo|]} */ +// [|Foo|] +// } +// interface Foo { +// foo: E.[|Foo|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference3.baseline.jsonc new file mode 100644 index 0000000000..a47fd93b30 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference3.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /a.ts === +// interface Foo { +// foo: E.[|Foo|]; +// } + +// === /b.ts === +// enum E { +// /** {@link /*FIND ALL REFS*/[|Foo|]} */ +// [|Foo|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference4.baseline.jsonc new file mode 100644 index 0000000000..910ac924e3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference4.baseline.jsonc @@ -0,0 +1,7 @@ +// === findAllReferences === +// === /findAllReferencesFromLinkTagReference4.ts === +// enum E { +// /** {@link /*FIND ALL REFS*/[|B|]} */ +// A, +// [|B|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference5.baseline.jsonc new file mode 100644 index 0000000000..03866a1e00 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesFromLinkTagReference5.baseline.jsonc @@ -0,0 +1,6 @@ +// === findAllReferences === +// === /findAllReferencesFromLinkTagReference5.ts === +// enum E { +// /** {@link E./*FIND ALL REFS*/[|A|]} */ +// [|A|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesImportMeta.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesImportMeta.baseline.jsonc new file mode 100644 index 0000000000..f0113af254 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesImportMeta.baseline.jsonc @@ -0,0 +1,5 @@ +// === findAllReferences === +// === /findAllReferencesImportMeta.ts === +// // Haha that's so meta! +// +// let x = import.[|meta|]/*FIND ALL REFS*/; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJSDocFunctionNew.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJSDocFunctionNew.baseline.jsonc new file mode 100644 index 0000000000..31ac7af7f7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJSDocFunctionNew.baseline.jsonc @@ -0,0 +1,4 @@ +// === findAllReferences === +// === /Foo.js === +// /** @type {function (/*FIND ALL REFS*/new: string, string): string} */ +// var f; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJSDocFunctionThis.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJSDocFunctionThis.baseline.jsonc new file mode 100644 index 0000000000..7746e07493 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJSDocFunctionThis.baseline.jsonc @@ -0,0 +1,4 @@ +// === findAllReferences === +// === /Foo.js === +// /** @type {function (this: string, string): string} */ +// var f = function (s) { return /*FIND ALL REFS*/[|this|] + s; } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsDocTypeLiteral.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsDocTypeLiteral.baseline.jsonc new file mode 100644 index 0000000000..5d43200755 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsDocTypeLiteral.baseline.jsonc @@ -0,0 +1,21 @@ +// === findAllReferences === +// === /foo.js === +// /** +// * @param {object} o - very important! +// * @param {string} o.x - a thing, its ok +// * @param {number} o.y - another thing +// * @param {Object} o.nested - very nested +// * @param {boolean} o.nested./*FIND ALL REFS*/great - much greatness +// * @param {number} o.nested.times - twice? probably!?? +// */ +// function f(o) { return o.nested.great; } + + + +// === findAllReferences === +// === /foo.js === +// --- (line: 5) skipped --- +// * @param {boolean} o.nested.great - much greatness +// * @param {number} o.nested.times - twice? probably!?? +// */ +// function f(o) { return o.nested./*FIND ALL REFS*/[|great|]; } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsOverloadedFunctionParameter.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsOverloadedFunctionParameter.baseline.jsonc new file mode 100644 index 0000000000..75e981f349 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsOverloadedFunctionParameter.baseline.jsonc @@ -0,0 +1,17 @@ +// === findAllReferences === +// === /foo.js === +// /** +// * @overload +// * @param {number} [|x|] +// * @returns {number} +// * +// * @overload +// * @param {string} [|x|] +// * @returns {string} +// * +// * @param {unknown} [|x|] +// * @returns {unknown} +// */ +// function foo([|x|]/*FIND ALL REFS*/) { +// return [|x|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsRequireDestructuring.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsRequireDestructuring.baseline.jsonc new file mode 100644 index 0000000000..bf269035c5 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsRequireDestructuring.baseline.jsonc @@ -0,0 +1,3 @@ +// === findAllReferences === +// === /bar.js === +// const { /*FIND ALL REFS*/[|foo|]: bar } = require('./foo'); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsRequireDestructuring1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsRequireDestructuring1.baseline.jsonc new file mode 100644 index 0000000000..cb07e32a56 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesJsRequireDestructuring1.baseline.jsonc @@ -0,0 +1,3 @@ +// === findAllReferences === +// === /Y.js === +// const { /*FIND ALL REFS*/[|x|]: { y } } = require("./X"); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesLinkTag1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesLinkTag1.baseline.jsonc new file mode 100644 index 0000000000..8db971a964 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesLinkTag1.baseline.jsonc @@ -0,0 +1,208 @@ +// === findAllReferences === +// === /findAllReferencesLinkTag1.ts === +// class C { +// [|m|]/*FIND ALL REFS*/() { } +// n = 1 +// static s() { } +// /** +// * {@link [|m|]} +// * @see {[|m|]} +// * {@link C.[|m|]} +// * @see {C.[|m|]} +// * {@link C#[|m|]} +// * @see {C#[|m|]} +// * {@link C.prototype.[|m|]} +// * @see {C.prototype.[|m|]} +// */ +// p() { } +// /** +// // --- (line: 17) skipped --- + + + +// === findAllReferences === +// === /findAllReferencesLinkTag1.ts === +// class C { +// m() { } +// [|n|]/*FIND ALL REFS*/ = 1 +// static s() { } +// /** +// * {@link m} +// // --- (line: 7) skipped --- + +// --- (line: 13) skipped --- +// */ +// p() { } +// /** +// * {@link [|n|]} +// * @see {[|n|]} +// * {@link C.[|n|]} +// * @see {C.[|n|]} +// * {@link C#[|n|]} +// * @see {C#[|n|]} +// * {@link C.prototype.[|n|]} +// * @see {C.prototype.[|n|]} +// */ +// q() { } +// /** +// // --- (line: 28) skipped --- + + + +// === findAllReferences === +// === /findAllReferencesLinkTag1.ts === +// class C { +// m() { } +// n = 1 +// static [|s|]/*FIND ALL REFS*/() { } +// /** +// * {@link m} +// * @see {m} +// // --- (line: 8) skipped --- + +// --- (line: 24) skipped --- +// */ +// q() { } +// /** +// * {@link [|s|]} +// * @see {[|s|]} +// * {@link C.[|s|]} +// * @see {C.[|s|]} +// */ +// r() { } +// } +// // --- (line: 35) skipped --- + + + +// === findAllReferences === +// === /findAllReferencesLinkTag1.ts === +// --- (line: 33) skipped --- +// } +// +// interface I { +// [|a|]/*FIND ALL REFS*/() +// b: 1 +// /** +// * {@link [|a|]} +// * @see {[|a|]} +// * {@link I.[|a|]} +// * @see {I.[|a|]} +// * {@link I#[|a|]} +// * @see {I#[|a|]} +// */ +// c() +// /** +// // --- (line: 49) skipped --- + + + +// === findAllReferences === +// === /findAllReferencesLinkTag1.ts === +// --- (line: 34) skipped --- +// +// interface I { +// a() +// [|b|]/*FIND ALL REFS*/: 1 +// /** +// * {@link a} +// * @see {a} +// // --- (line: 42) skipped --- + +// --- (line: 45) skipped --- +// */ +// c() +// /** +// * {@link [|b|]} +// * @see {[|b|]} +// * {@link I.[|b|]} +// * @see {I.[|b|]} +// */ +// d() +// } +// // --- (line: 56) skipped --- + + + +// === findAllReferences === +// === /findAllReferencesLinkTag1.ts === +// --- (line: 54) skipped --- +// } +// +// function nestor() { +// /** {@link [|r2|]} */ +// function ref() { } +// /** @see {[|r2|]} */ +// function d3() { } +// function [|r2|]/*FIND ALL REFS*/() { } +// } + + + +// === findAllReferences === +// === /findAllReferencesLinkTag1.ts === +// class [|C|]/*FIND ALL REFS*/ { +// m() { } +// n = 1 +// static s() { } +// /** +// * {@link m} +// * @see {m} +// * {@link [|C|].m} +// * @see {[|C|].m} +// * {@link [|C|]#m} +// * @see {[|C|]#m} +// * {@link [|C|].prototype.m} +// * @see {[|C|].prototype.m} +// */ +// p() { } +// /** +// * {@link n} +// * @see {n} +// * {@link [|C|].n} +// * @see {[|C|].n} +// * {@link [|C|]#n} +// * @see {[|C|]#n} +// * {@link [|C|].prototype.n} +// * @see {[|C|].prototype.n} +// */ +// q() { } +// /** +// * {@link s} +// * @see {s} +// * {@link [|C|].s} +// * @see {[|C|].s} +// */ +// r() { } +// } +// // --- (line: 35) skipped --- + + + +// === findAllReferences === +// === /findAllReferencesLinkTag1.ts === +// --- (line: 32) skipped --- +// r() { } +// } +// +// interface [|I|]/*FIND ALL REFS*/ { +// a() +// b: 1 +// /** +// * {@link a} +// * @see {a} +// * {@link [|I|].a} +// * @see {[|I|].a} +// * {@link [|I|]#a} +// * @see {[|I|]#a} +// */ +// c() +// /** +// * {@link b} +// * @see {b} +// * {@link [|I|].b} +// * @see {[|I|].b} +// */ +// d() +// } +// // --- (line: 56) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesLinkTag2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesLinkTag2.baseline.jsonc new file mode 100644 index 0000000000..164c894c14 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesLinkTag2.baseline.jsonc @@ -0,0 +1,138 @@ +// === findAllReferences === +// === /findAllReferencesLinkTag2.ts === +// namespace NPR { +// export class Consider { +// This = class { +// show() { } +// } +// [|m|]/*FIND ALL REFS*/() { } +// } +// /** +// * @see {Consider.prototype.[|m|]} +// * {@link Consider#[|m|]} +// * @see {Consider#This#show} +// * {@link Consider.This.show} +// * @see {NPR.Consider#This#show} +// // --- (line: 14) skipped --- + + + +// === findAllReferences === +// === /findAllReferencesLinkTag2.ts === +// namespace NPR { +// export class Consider { +// This = class { +// [|show|]/*FIND ALL REFS*/() { } +// } +// m() { } +// } +// /** +// * @see {Consider.prototype.m} +// * {@link Consider#m} +// * @see {Consider#This#[|show|]} +// * {@link Consider.This.[|show|]} +// * @see {NPR.Consider#This#[|show|]} +// * {@link NPR.Consider.This#[|show|]} +// * @see {NPR.Consider#This.show} # doesn't parse trailing . +// * @see {NPR.Consider.This.[|show|]} +// */ +// export function ref() { } +// } +// /** +// * {@link NPR.Consider#This#[|show|] hello hello} +// * {@link NPR.Consider.This#[|show|]} +// * @see {NPR.Consider#This.show} # doesn't parse trailing . +// * @see {NPR.Consider.This.[|show|]} +// */ +// export function outerref() { } + + + +// === findAllReferences === +// === /findAllReferencesLinkTag2.ts === +// namespace NPR { +// export class Consider { +// [|This|]/*FIND ALL REFS*/ = class { +// show() { } +// } +// m() { } +// } +// /** +// * @see {Consider.prototype.m} +// * {@link Consider#m} +// * @see {Consider#[|This|]#show} +// * {@link Consider.[|This|].show} +// * @see {NPR.Consider#[|This|]#show} +// * {@link NPR.Consider.[|This|]#show} +// * @see {NPR.Consider#[|This|].show} # doesn't parse trailing . +// * @see {NPR.Consider.[|This|].show} +// */ +// export function ref() { } +// } +// /** +// * {@link NPR.Consider#[|This|]#show hello hello} +// * {@link NPR.Consider.[|This|]#show} +// * @see {NPR.Consider#[|This|].show} # doesn't parse trailing . +// * @see {NPR.Consider.[|This|].show} +// */ +// export function outerref() { } + + + +// === findAllReferences === +// === /findAllReferencesLinkTag2.ts === +// namespace NPR { +// export class [|Consider|]/*FIND ALL REFS*/ { +// This = class { +// show() { } +// } +// m() { } +// } +// /** +// * @see {[|Consider|].prototype.m} +// * {@link [|Consider|]#m} +// * @see {[|Consider|]#This#show} +// * {@link [|Consider|].This.show} +// * @see {NPR.[|Consider|]#This#show} +// * {@link NPR.[|Consider|].This#show} +// * @see {NPR.[|Consider|]#This.show} # doesn't parse trailing . +// * @see {NPR.[|Consider|].This.show} +// */ +// export function ref() { } +// } +// /** +// * {@link NPR.[|Consider|]#This#show hello hello} +// * {@link NPR.[|Consider|].This#show} +// * @see {NPR.[|Consider|]#This.show} # doesn't parse trailing . +// * @see {NPR.[|Consider|].This.show} +// */ +// export function outerref() { } + + + +// === findAllReferences === +// === /findAllReferencesLinkTag2.ts === +// namespace [|NPR|]/*FIND ALL REFS*/ { +// export class Consider { +// This = class { +// show() { } +// // --- (line: 5) skipped --- + +// --- (line: 9) skipped --- +// * {@link Consider#m} +// * @see {Consider#This#show} +// * {@link Consider.This.show} +// * @see {[|NPR|].Consider#This#show} +// * {@link [|NPR|].Consider.This#show} +// * @see {[|NPR|].Consider#This.show} # doesn't parse trailing . +// * @see {[|NPR|].Consider.This.show} +// */ +// export function ref() { } +// } +// /** +// * {@link [|NPR|].Consider#This#show hello hello} +// * {@link [|NPR|].Consider.This#show} +// * @see {[|NPR|].Consider#This.show} # doesn't parse trailing . +// * @see {[|NPR|].Consider.This.show} +// */ +// export function outerref() { } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesLinkTag3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesLinkTag3.baseline.jsonc new file mode 100644 index 0000000000..37e0a9e126 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesLinkTag3.baseline.jsonc @@ -0,0 +1,138 @@ +// === findAllReferences === +// === /findAllReferencesLinkTag3.ts === +// namespace NPR { +// export class Consider { +// This = class { +// show() { } +// } +// [|m|]/*FIND ALL REFS*/() { } +// } +// /** +// * {@linkcode Consider.prototype.[|m|]} +// * {@linkplain Consider#[|m|]} +// * {@linkcode Consider#This#show} +// * {@linkplain Consider.This.show} +// * {@linkcode NPR.Consider#This#show} +// // --- (line: 14) skipped --- + + + +// === findAllReferences === +// === /findAllReferencesLinkTag3.ts === +// namespace NPR { +// export class Consider { +// This = class { +// [|show|]/*FIND ALL REFS*/() { } +// } +// m() { } +// } +// /** +// * {@linkcode Consider.prototype.m} +// * {@linkplain Consider#m} +// * {@linkcode Consider#This#[|show|]} +// * {@linkplain Consider.This.[|show|]} +// * {@linkcode NPR.Consider#This#[|show|]} +// * {@linkplain NPR.Consider.This#[|show|]} +// * {@linkcode NPR.Consider#This.show} # doesn't parse trailing . +// * {@linkcode NPR.Consider.This.[|show|]} +// */ +// export function ref() { } +// } +// /** +// * {@linkplain NPR.Consider#This#[|show|] hello hello} +// * {@linkplain NPR.Consider.This#[|show|]} +// * {@linkcode NPR.Consider#This.show} # doesn't parse trailing . +// * {@linkcode NPR.Consider.This.[|show|]} +// */ +// export function outerref() { } + + + +// === findAllReferences === +// === /findAllReferencesLinkTag3.ts === +// namespace NPR { +// export class Consider { +// [|This|]/*FIND ALL REFS*/ = class { +// show() { } +// } +// m() { } +// } +// /** +// * {@linkcode Consider.prototype.m} +// * {@linkplain Consider#m} +// * {@linkcode Consider#[|This|]#show} +// * {@linkplain Consider.[|This|].show} +// * {@linkcode NPR.Consider#[|This|]#show} +// * {@linkplain NPR.Consider.[|This|]#show} +// * {@linkcode NPR.Consider#[|This|].show} # doesn't parse trailing . +// * {@linkcode NPR.Consider.[|This|].show} +// */ +// export function ref() { } +// } +// /** +// * {@linkplain NPR.Consider#[|This|]#show hello hello} +// * {@linkplain NPR.Consider.[|This|]#show} +// * {@linkcode NPR.Consider#[|This|].show} # doesn't parse trailing . +// * {@linkcode NPR.Consider.[|This|].show} +// */ +// export function outerref() { } + + + +// === findAllReferences === +// === /findAllReferencesLinkTag3.ts === +// namespace NPR { +// export class [|Consider|]/*FIND ALL REFS*/ { +// This = class { +// show() { } +// } +// m() { } +// } +// /** +// * {@linkcode [|Consider|].prototype.m} +// * {@linkplain [|Consider|]#m} +// * {@linkcode [|Consider|]#This#show} +// * {@linkplain [|Consider|].This.show} +// * {@linkcode NPR.[|Consider|]#This#show} +// * {@linkplain NPR.[|Consider|].This#show} +// * {@linkcode NPR.[|Consider|]#This.show} # doesn't parse trailing . +// * {@linkcode NPR.[|Consider|].This.show} +// */ +// export function ref() { } +// } +// /** +// * {@linkplain NPR.[|Consider|]#This#show hello hello} +// * {@linkplain NPR.[|Consider|].This#show} +// * {@linkcode NPR.[|Consider|]#This.show} # doesn't parse trailing . +// * {@linkcode NPR.[|Consider|].This.show} +// */ +// export function outerref() { } + + + +// === findAllReferences === +// === /findAllReferencesLinkTag3.ts === +// namespace [|NPR|]/*FIND ALL REFS*/ { +// export class Consider { +// This = class { +// show() { } +// // --- (line: 5) skipped --- + +// --- (line: 9) skipped --- +// * {@linkplain Consider#m} +// * {@linkcode Consider#This#show} +// * {@linkplain Consider.This.show} +// * {@linkcode [|NPR|].Consider#This#show} +// * {@linkplain [|NPR|].Consider.This#show} +// * {@linkcode [|NPR|].Consider#This.show} # doesn't parse trailing . +// * {@linkcode [|NPR|].Consider.This.show} +// */ +// export function ref() { } +// } +// /** +// * {@linkplain [|NPR|].Consider#This#show hello hello} +// * {@linkplain [|NPR|].Consider.This#show} +// * {@linkcode [|NPR|].Consider#This.show} # doesn't parse trailing . +// * {@linkcode [|NPR|].Consider.This.show} +// */ +// export function outerref() { } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc new file mode 100644 index 0000000000..e3ba1d5b6a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesNonExistentExportBinding.baseline.jsonc @@ -0,0 +1,3 @@ +// === findAllReferences === +// === /bar.ts === +// import { [|Foo|]/*FIND ALL REFS*/ } from "./foo"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc new file mode 100644 index 0000000000..8b8c2b5574 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor.baseline.jsonc @@ -0,0 +1,114 @@ +// === findAllReferences === +// === /a.ts === +// export class [|C|] { +// /*FIND ALL REFS*/constructor(n: number); +// constructor(); +// constructor(n?: number){} +// static f() { +// this.f(); +// new this(); +// } +// } +// new [|C|](); +// const D = [|C|]; +// new D(); + +// === /b.ts === +// import { [|C|] } from "./a"; +// new [|C|](); + +// === /c.ts === +// import { [|C|] } from "./a"; +// class D extends [|C|] { +// constructor() { +// super(); +// super.method(); +// } +// method() { super(); } +// } +// class E implements [|C|] { +// constructor() { super(); } +// } + +// === /d.ts === +// import * as a from "./a"; +// new a.[|C|](); +// class d extends a.[|C|] { constructor() { super(); } + + + +// === findAllReferences === +// === /a.ts === +// export class [|C|] { +// constructor(n: number); +// /*FIND ALL REFS*/constructor(); +// constructor(n?: number){} +// static f() { +// this.f(); +// new this(); +// } +// } +// new [|C|](); +// const D = [|C|]; +// new D(); + +// === /b.ts === +// import { [|C|] } from "./a"; +// new [|C|](); + +// === /c.ts === +// import { [|C|] } from "./a"; +// class D extends [|C|] { +// constructor() { +// super(); +// super.method(); +// } +// method() { super(); } +// } +// class E implements [|C|] { +// constructor() { super(); } +// } + +// === /d.ts === +// import * as a from "./a"; +// new a.[|C|](); +// class d extends a.[|C|] { constructor() { super(); } + + + +// === findAllReferences === +// === /a.ts === +// export class [|C|] { +// constructor(n: number); +// constructor(); +// /*FIND ALL REFS*/constructor(n?: number){} +// static f() { +// this.f(); +// new this(); +// } +// } +// new [|C|](); +// const D = [|C|]; +// new D(); + +// === /b.ts === +// import { [|C|] } from "./a"; +// new [|C|](); + +// === /c.ts === +// import { [|C|] } from "./a"; +// class D extends [|C|] { +// constructor() { +// super(); +// super.method(); +// } +// method() { super(); } +// } +// class E implements [|C|] { +// constructor() { super(); } +// } + +// === /d.ts === +// import * as a from "./a"; +// new a.[|C|](); +// class d extends a.[|C|] { constructor() { super(); } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor_badOverload.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor_badOverload.baseline.jsonc new file mode 100644 index 0000000000..4c9e2f0c7e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfConstructor_badOverload.baseline.jsonc @@ -0,0 +1,15 @@ +// === findAllReferences === +// === /findAllReferencesOfConstructor_badOverload.ts === +// class [|C|] { +// /*FIND ALL REFS*/constructor(n: number); +// constructor(){} +// } + + + +// === findAllReferences === +// === /findAllReferencesOfConstructor_badOverload.ts === +// class [|C|] { +// constructor(n: number); +// /*FIND ALL REFS*/constructor(){} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfJsonModule.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfJsonModule.baseline.jsonc new file mode 100644 index 0000000000..b573d0da76 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesOfJsonModule.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /foo.ts === +// /*FIND ALL REFS*/import settings from "./settings.json"; +// settings; + + + +// === findAllReferences === +// === /foo.ts === +// import /*FIND ALL REFS*/[|settings|] from "./settings.json"; +// [|settings|]; + + + +// === findAllReferences === +// === /foo.ts === +// import [|settings|] from "./settings.json"; +// /*FIND ALL REFS*/[|settings|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesUndefined.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesUndefined.baseline.jsonc new file mode 100644 index 0000000000..da1581a151 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllReferencesUndefined.baseline.jsonc @@ -0,0 +1,8 @@ +// === findAllReferences === +// === /a.ts === +// /*FIND ALL REFS*/[|undefined|]; +// +// void [|undefined|]; + +// === /b.ts === +// [|undefined|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsBadImport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsBadImport.baseline.jsonc new file mode 100644 index 0000000000..4282a2d249 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsBadImport.baseline.jsonc @@ -0,0 +1,9 @@ +// === findAllReferences === +// === /findAllRefsBadImport.ts === +// import { /*FIND ALL REFS*/ab as cd } from "doesNotExist"; + + + +// === findAllReferences === +// === /findAllRefsBadImport.ts === +// import { ab as /*FIND ALL REFS*/[|cd|] } from "doesNotExist"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsCatchClause.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsCatchClause.baseline.jsonc new file mode 100644 index 0000000000..c9c57b48c4 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsCatchClause.baseline.jsonc @@ -0,0 +1,15 @@ +// === findAllReferences === +// === /findAllRefsCatchClause.ts === +// try { } +// catch (/*FIND ALL REFS*/[|err|]) { +// [|err|]; +// } + + + +// === findAllReferences === +// === /findAllRefsCatchClause.ts === +// try { } +// catch ([|err|]) { +// /*FIND ALL REFS*/[|err|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression0.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression0.baseline.jsonc new file mode 100644 index 0000000000..29550fa58b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression0.baseline.jsonc @@ -0,0 +1,45 @@ +// === findAllReferences === +// === /a.ts === +// export = class /*FIND ALL REFS*/[|A|] { +// m() { [|A|]; } +// }; + +// === /b.ts === +// import [|A|] = require("./a"); +// [|A|]; + + + +// === findAllReferences === +// === /a.ts === +// export = class [|A|] { +// m() { /*FIND ALL REFS*/[|A|]; } +// }; + +// === /b.ts === +// import [|A|] = require("./a"); +// [|A|]; + + + +// === findAllReferences === +// === /a.ts === +// export = class [|A|] { +// m() { [|A|]; } +// }; + +// === /b.ts === +// import /*FIND ALL REFS*/[|A|] = require("./a"); +// [|A|]; + + + +// === findAllReferences === +// === /a.ts === +// export = class [|A|] { +// m() { [|A|]; } +// }; + +// === /b.ts === +// import [|A|] = require("./a"); +// /*FIND ALL REFS*/[|A|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression1.baseline.jsonc new file mode 100644 index 0000000000..28ff6fba96 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression1.baseline.jsonc @@ -0,0 +1,17 @@ +// === findAllReferences === +// === /a.js === +// module.exports = class /*FIND ALL REFS*/[|A|] {}; + + + +// === findAllReferences === +// === /b.js === +// import /*FIND ALL REFS*/[|A|] = require("./a"); +// [|A|]; + + + +// === findAllReferences === +// === /b.js === +// import [|A|] = require("./a"); +// /*FIND ALL REFS*/[|A|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc new file mode 100644 index 0000000000..f5cf4ae9a5 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassExpression2.baseline.jsonc @@ -0,0 +1,27 @@ +// === findAllReferences === +// === /a.js === +// exports./*FIND ALL REFS*/[|A|] = class {}; + +// === /b.js === +// import { [|A|] } from "./a"; +// [|A|]; + + + +// === findAllReferences === +// === /a.js === +// exports.[|A|] = class {}; + +// === /b.js === +// import { /*FIND ALL REFS*/[|A|] } from "./a"; +// [|A|]; + + + +// === findAllReferences === +// === /a.js === +// exports.[|A|] = class {}; + +// === /b.js === +// import { [|A|] } from "./a"; +// /*FIND ALL REFS*/[|A|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassStaticBlocks.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassStaticBlocks.baseline.jsonc new file mode 100644 index 0000000000..d2862f3610 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassStaticBlocks.baseline.jsonc @@ -0,0 +1,34 @@ +// === findAllReferences === +// === /findAllRefsClassStaticBlocks.ts === +// class ClassStaticBocks { +// static x; +// /*FIND ALL REFS*/[|static|] {} +// static y; +// static {} +// static y; +// static {} +// } + + + +// === findAllReferences === +// === /findAllRefsClassStaticBlocks.ts === +// class ClassStaticBocks { +// static x; +// static {} +// static y; +// /*FIND ALL REFS*/[|static|] {} +// static y; +// static {} +// } + + + +// === findAllReferences === +// === /findAllRefsClassStaticBlocks.ts === +// --- (line: 3) skipped --- +// static y; +// static {} +// static y; +// /*FIND ALL REFS*/[|static|] {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassWithStaticThisAccess.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassWithStaticThisAccess.baseline.jsonc new file mode 100644 index 0000000000..6a8b752253 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsClassWithStaticThisAccess.baseline.jsonc @@ -0,0 +1,39 @@ +// === findAllReferences === +// === /findAllRefsClassWithStaticThisAccess.ts === +// class /*FIND ALL REFS*/[|C|] { +// static s() { +// this; +// } +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /findAllRefsClassWithStaticThisAccess.ts === +// class C { +// static s() { +// /*FIND ALL REFS*/[|this|]; +// } +// static get f() { +// return [|this|]; +// +// function inner() { this; } +// class Inner { x = this; } +// } +// } + + + +// === findAllReferences === +// === /findAllRefsClassWithStaticThisAccess.ts === +// class C { +// static s() { +// [|this|]; +// } +// static get f() { +// return /*FIND ALL REFS*/[|this|]; +// +// function inner() { this; } +// class Inner { x = this; } +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsConstructorFunctions.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsConstructorFunctions.baseline.jsonc new file mode 100644 index 0000000000..49d198d629 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsConstructorFunctions.baseline.jsonc @@ -0,0 +1,55 @@ +// === findAllReferences === +// === /a.js === +// function f() { +// /*FIND ALL REFS*/[|this|].x = 0; +// } +// f.prototype.setX = function() { +// this.x = 1; +// } +// f.prototype.useX = function() { this.x; } + + + +// === findAllReferences === +// === /a.js === +// function f() { +// this./*FIND ALL REFS*/x = 0; +// } +// f.prototype.setX = function() { +// this.x = 1; +// } +// f.prototype.useX = function() { this.x; } + + + +// === findAllReferences === +// === /a.js === +// function f() { +// this.x = 0; +// } +// f.prototype.setX = function() { +// /*FIND ALL REFS*/[|this|].x = 1; +// } +// f.prototype.useX = function() { this.x; } + + + +// === findAllReferences === +// === /a.js === +// function f() { +// this.x = 0; +// } +// f.prototype.setX = function() { +// this./*FIND ALL REFS*/x = 1; +// } +// f.prototype.useX = function() { this.x; } + + + +// === findAllReferences === +// === /a.js === +// --- (line: 3) skipped --- +// f.prototype.setX = function() { +// this.x = 1; +// } +// f.prototype.useX = function() { this./*FIND ALL REFS*/x; } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDeclareClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDeclareClass.baseline.jsonc new file mode 100644 index 0000000000..a0e7b903e9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDeclareClass.baseline.jsonc @@ -0,0 +1,13 @@ +// === findAllReferences === +// === /findAllRefsDeclareClass.ts === +// /*FIND ALL REFS*/declare class C { +// static m(): void; +// } + + + +// === findAllReferences === +// === /findAllRefsDeclareClass.ts === +// declare class /*FIND ALL REFS*/[|C|] { +// static m(): void; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDefaultImport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDefaultImport.baseline.jsonc new file mode 100644 index 0000000000..bbefa6332d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDefaultImport.baseline.jsonc @@ -0,0 +1,15 @@ +// === findAllReferences === +// === /a.ts === +// export default function /*FIND ALL REFS*/[|a|]() {} + +// === /b.ts === +// import [|a|], * as ns from "./a"; + + + +// === findAllReferences === +// === /a.ts === +// export default function [|a|]() {} + +// === /b.ts === +// import /*FIND ALL REFS*/[|a|], * as ns from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDefinition.baseline.jsonc new file mode 100644 index 0000000000..14c7bebeaf --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDefinition.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /findAllRefsDefinition.ts === +// const /*FIND ALL REFS*/[|x|] = 0; +// [|x|]; + + + +// === findAllReferences === +// === /findAllRefsDefinition.ts === +// const [|x|] = 0; +// /*FIND ALL REFS*/[|x|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDestructureGeneric.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDestructureGeneric.baseline.jsonc new file mode 100644 index 0000000000..271c0e841d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDestructureGeneric.baseline.jsonc @@ -0,0 +1,17 @@ +// === findAllReferences === +// === /findAllRefsDestructureGeneric.ts === +// interface I { +// /*FIND ALL REFS*/[|x|]: boolean; +// } +// declare const i: I; +// const { [|x|] } = i; + + + +// === findAllReferences === +// === /findAllRefsDestructureGeneric.ts === +// interface I { +// [|x|]: boolean; +// } +// declare const i: I; +// const { /*FIND ALL REFS*/[|x|] } = i; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDestructureGetter.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDestructureGetter.baseline.jsonc new file mode 100644 index 0000000000..ba0f7fb3b3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsDestructureGetter.baseline.jsonc @@ -0,0 +1,69 @@ +// === findAllReferences === +// === /findAllRefsDestructureGetter.ts === +// class Test { +// get /*FIND ALL REFS*/[|x|]() { return 0; } +// +// set y(a: number) {} +// } +// const { [|x|], y } = new Test(); +// x; y; + + + +// === findAllReferences === +// === /findAllRefsDestructureGetter.ts === +// class Test { +// get [|x|]() { return 0; } +// +// set y(a: number) {} +// } +// const { /*FIND ALL REFS*/[|x|], y } = new Test(); +// [|x|]; y; + + + +// === findAllReferences === +// === /findAllRefsDestructureGetter.ts === +// class Test { +// get x() { return 0; } +// +// set y(a: number) {} +// } +// const { [|x|], y } = new Test(); +// /*FIND ALL REFS*/[|x|]; y; + + + +// === findAllReferences === +// === /findAllRefsDestructureGetter.ts === +// class Test { +// get x() { return 0; } +// +// set /*FIND ALL REFS*/[|y|](a: number) {} +// } +// const { x, [|y|] } = new Test(); +// x; y; + + + +// === findAllReferences === +// === /findAllRefsDestructureGetter.ts === +// class Test { +// get x() { return 0; } +// +// set [|y|](a: number) {} +// } +// const { x, /*FIND ALL REFS*/[|y|] } = new Test(); +// x; [|y|]; + + + +// === findAllReferences === +// === /findAllRefsDestructureGetter.ts === +// class Test { +// get x() { return 0; } +// +// set y(a: number) {} +// } +// const { x, [|y|] } = new Test(); +// x; /*FIND ALL REFS*/[|y|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsEnumAsNamespace.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsEnumAsNamespace.baseline.jsonc new file mode 100644 index 0000000000..459666328e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsEnumAsNamespace.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /findAllRefsEnumAsNamespace.ts === +// /*FIND ALL REFS*/enum E { A } +// let e: E.A; + + + +// === findAllReferences === +// === /findAllRefsEnumAsNamespace.ts === +// enum /*FIND ALL REFS*/[|E|] { A } +// let e: [|E|].A; + + + +// === findAllReferences === +// === /findAllRefsEnumAsNamespace.ts === +// enum [|E|] { A } +// let e: /*FIND ALL REFS*/[|E|].A; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsEnumMember.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsEnumMember.baseline.jsonc new file mode 100644 index 0000000000..caca53e1d7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsEnumMember.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /findAllRefsEnumMember.ts === +// enum E { /*FIND ALL REFS*/[|A|], B } +// const e: E.[|A|] = E.[|A|]; + + + +// === findAllReferences === +// === /findAllRefsEnumMember.ts === +// enum E { [|A|], B } +// const e: E./*FIND ALL REFS*/[|A|] = E.[|A|]; + + + +// === findAllReferences === +// === /findAllRefsEnumMember.ts === +// enum E { [|A|], B } +// const e: E.[|A|] = E./*FIND ALL REFS*/[|A|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc new file mode 100644 index 0000000000..e745202e15 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportConstEqualToClass.baseline.jsonc @@ -0,0 +1,17 @@ +// === findAllReferences === +// === /a.ts === +// class C {} +// export const /*FIND ALL REFS*/[|D|] = C; + +// === /b.ts === +// import { [|D|] } from "./a"; + + + +// === findAllReferences === +// === /a.ts === +// class C {} +// export const [|D|] = C; + +// === /b.ts === +// import { /*FIND ALL REFS*/[|D|] } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportDefaultClassConstructor.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportDefaultClassConstructor.baseline.jsonc new file mode 100644 index 0000000000..af95e7e1a7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportDefaultClassConstructor.baseline.jsonc @@ -0,0 +1,5 @@ +// === findAllReferences === +// === /findAllRefsExportDefaultClassConstructor.ts === +// export default class { +// /*FIND ALL REFS*/constructor() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportNotAtTopLevel.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportNotAtTopLevel.baseline.jsonc new file mode 100644 index 0000000000..3341d80afa --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsExportNotAtTopLevel.baseline.jsonc @@ -0,0 +1,24 @@ +// === findAllReferences === +// === /findAllRefsExportNotAtTopLevel.ts === +// { +// /*FIND ALL REFS*/export const x = 0; +// x; +// } + + + +// === findAllReferences === +// === /findAllRefsExportNotAtTopLevel.ts === +// { +// export const /*FIND ALL REFS*/[|x|] = 0; +// [|x|]; +// } + + + +// === findAllReferences === +// === /findAllRefsExportNotAtTopLevel.ts === +// { +// export const [|x|] = 0; +// /*FIND ALL REFS*/[|x|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForComputedProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForComputedProperties.baseline.jsonc new file mode 100644 index 0000000000..11fe2e4161 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForComputedProperties.baseline.jsonc @@ -0,0 +1,45 @@ +// === findAllReferences === +// === /findAllRefsForComputedProperties.ts === +// interface I { +// ["/*FIND ALL REFS*/[|prop1|]"]: () => void; +// } +// +// class C implements I { +// ["[|prop1|]"]: any; +// } +// +// var x: I = { +// ["[|prop1|]"]: function () { }, +// } + + + +// === findAllReferences === +// === /findAllRefsForComputedProperties.ts === +// interface I { +// ["[|prop1|]"]: () => void; +// } +// +// class C implements I { +// ["/*FIND ALL REFS*/[|prop1|]"]: any; +// } +// +// var x: I = { +// ["[|prop1|]"]: function () { }, +// } + + + +// === findAllReferences === +// === /findAllRefsForComputedProperties.ts === +// interface I { +// ["[|prop1|]"]: () => void; +// } +// +// class C implements I { +// ["[|prop1|]"]: any; +// } +// +// var x: I = { +// ["/*FIND ALL REFS*/[|prop1|]"]: function () { }, +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForComputedProperties2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForComputedProperties2.baseline.jsonc new file mode 100644 index 0000000000..4f276e9251 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForComputedProperties2.baseline.jsonc @@ -0,0 +1,45 @@ +// === findAllReferences === +// === /findAllRefsForComputedProperties2.ts === +// interface I { +// [/*FIND ALL REFS*/[|42|]](): void; +// } +// +// class C implements I { +// [[|42|]]: any; +// } +// +// var x: I = { +// ["[|42|]"]: function () { } +// } + + + +// === findAllReferences === +// === /findAllRefsForComputedProperties2.ts === +// interface I { +// [[|42|]](): void; +// } +// +// class C implements I { +// [/*FIND ALL REFS*/[|42|]]: any; +// } +// +// var x: I = { +// ["[|42|]"]: function () { } +// } + + + +// === findAllReferences === +// === /findAllRefsForComputedProperties2.ts === +// interface I { +// [[|42|]](): void; +// } +// +// class C implements I { +// [[|42|]]: any; +// } +// +// var x: I = { +// ["/*FIND ALL REFS*/[|42|]"]: function () { } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport.baseline.jsonc new file mode 100644 index 0000000000..0c7e30155f --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport.baseline.jsonc @@ -0,0 +1,14 @@ +// === findAllReferences === +// === /a.ts === +// export default function /*FIND ALL REFS*/[|f|]() {} + +// === /b.ts === +// import [|g|] from "./a"; +// [|g|](); + + + +// === findAllReferences === +// === /b.ts === +// import /*FIND ALL REFS*/[|g|] from "./a"; +// [|g|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport01.baseline.jsonc new file mode 100644 index 0000000000..a7e3cdedf6 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport01.baseline.jsonc @@ -0,0 +1,41 @@ +// === findAllReferences === +// === /findAllRefsForDefaultExport01.ts === +// /*FIND ALL REFS*/export default class DefaultExportedClass { +// } +// +// var x: DefaultExportedClass; +// +// var y = new DefaultExportedClass; + + + +// === findAllReferences === +// === /findAllRefsForDefaultExport01.ts === +// export default class /*FIND ALL REFS*/[|DefaultExportedClass|] { +// } +// +// var x: [|DefaultExportedClass|]; +// +// var y = new [|DefaultExportedClass|]; + + + +// === findAllReferences === +// === /findAllRefsForDefaultExport01.ts === +// export default class [|DefaultExportedClass|] { +// } +// +// var x: /*FIND ALL REFS*/[|DefaultExportedClass|]; +// +// var y = new [|DefaultExportedClass|]; + + + +// === findAllReferences === +// === /findAllRefsForDefaultExport01.ts === +// export default class [|DefaultExportedClass|] { +// } +// +// var x: [|DefaultExportedClass|]; +// +// var y = new /*FIND ALL REFS*/[|DefaultExportedClass|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport02.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport02.baseline.jsonc new file mode 100644 index 0000000000..00007d570f --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport02.baseline.jsonc @@ -0,0 +1,89 @@ +// === findAllReferences === +// === /findAllRefsForDefaultExport02.ts === +// /*FIND ALL REFS*/export default function DefaultExportedFunction() { +// return DefaultExportedFunction; +// } +// +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /findAllRefsForDefaultExport02.ts === +// export default function /*FIND ALL REFS*/[|DefaultExportedFunction|]() { +// return [|DefaultExportedFunction|]; +// } +// +// var x: typeof [|DefaultExportedFunction|]; +// +// var y = [|DefaultExportedFunction|](); +// +// namespace DefaultExportedFunction { +// } + + + +// === findAllReferences === +// === /findAllRefsForDefaultExport02.ts === +// export default function [|DefaultExportedFunction|]() { +// return /*FIND ALL REFS*/[|DefaultExportedFunction|]; +// } +// +// var x: typeof [|DefaultExportedFunction|]; +// +// var y = [|DefaultExportedFunction|](); +// +// namespace DefaultExportedFunction { +// } + + + +// === findAllReferences === +// === /findAllRefsForDefaultExport02.ts === +// export default function [|DefaultExportedFunction|]() { +// return [|DefaultExportedFunction|]; +// } +// +// var x: typeof /*FIND ALL REFS*/[|DefaultExportedFunction|]; +// +// var y = [|DefaultExportedFunction|](); +// +// namespace DefaultExportedFunction { +// } + + + +// === findAllReferences === +// === /findAllRefsForDefaultExport02.ts === +// export default function [|DefaultExportedFunction|]() { +// return [|DefaultExportedFunction|]; +// } +// +// var x: typeof [|DefaultExportedFunction|]; +// +// var y = /*FIND ALL REFS*/[|DefaultExportedFunction|](); +// +// namespace DefaultExportedFunction { +// } + + + +// === findAllReferences === +// === /findAllRefsForDefaultExport02.ts === +// --- (line: 5) skipped --- +// +// var y = DefaultExportedFunction(); +// +// /*FIND ALL REFS*/namespace DefaultExportedFunction { +// } + + + +// === findAllReferences === +// === /findAllRefsForDefaultExport02.ts === +// --- (line: 5) skipped --- +// +// var y = DefaultExportedFunction(); +// +// namespace /*FIND ALL REFS*/[|DefaultExportedFunction|] { +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport04.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport04.baseline.jsonc new file mode 100644 index 0000000000..a5fd072cef --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport04.baseline.jsonc @@ -0,0 +1,40 @@ +// === findAllReferences === +// === /a.ts === +// const /*FIND ALL REFS*/[|a|] = 0; +// export default [|a|]; + +// === /b.ts === +// import [|a|] from "./a"; +// [|a|]; + + + +// === findAllReferences === +// === /a.ts === +// const [|a|] = 0; +// export default /*FIND ALL REFS*/[|a|]; + +// === /b.ts === +// import [|a|] from "./a"; +// [|a|]; + + + +// === findAllReferences === +// === /a.ts === +// const a = 0; +// export /*FIND ALL REFS*/default a; + + + +// === findAllReferences === +// === /b.ts === +// import /*FIND ALL REFS*/[|a|] from "./a"; +// [|a|]; + + + +// === findAllReferences === +// === /b.ts === +// import [|a|] from "./a"; +// /*FIND ALL REFS*/[|a|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport09.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport09.baseline.jsonc new file mode 100644 index 0000000000..5a1931dc42 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport09.baseline.jsonc @@ -0,0 +1,91 @@ +// === findAllReferences === +// === /foo.ts === +// import * as /*FIND ALL REFS*/[|a|] from "./a.js" +// import aDefault from "./a.js" +// import * as b from "./b.js" +// import bDefault from "./b.js" +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /foo.ts === +// import * as a from "./a.js" +// import /*FIND ALL REFS*/[|aDefault|] from "./a.js" +// import * as b from "./b.js" +// import bDefault from "./b.js" +// +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /foo.ts === +// import * as a from "./a.js" +// import aDefault from "./a.js" +// import * as /*FIND ALL REFS*/[|b|] from "./b.js" +// import bDefault from "./b.js" +// +// import * as c from "./c" +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /foo.ts === +// import * as a from "./a.js" +// import aDefault from "./a.js" +// import * as b from "./b.js" +// import /*FIND ALL REFS*/[|bDefault|] from "./b.js" +// +// import * as c from "./c" +// import cDefault from "./c" +// import * as d from "./d" +// import dDefault from "./d" + + + +// === findAllReferences === +// === /foo.ts === +// import * as a from "./a.js" +// import aDefault from "./a.js" +// import * as b from "./b.js" +// import bDefault from "./b.js" +// +// import * as /*FIND ALL REFS*/[|c|] from "./c" +// import cDefault from "./c" +// import * as d from "./d" +// import dDefault from "./d" + + + +// === findAllReferences === +// === /foo.ts === +// --- (line: 3) skipped --- +// import bDefault from "./b.js" +// +// import * as c from "./c" +// import /*FIND ALL REFS*/[|cDefault|] from "./c" +// import * as d from "./d" +// import dDefault from "./d" + + + +// === findAllReferences === +// === /foo.ts === +// --- (line: 4) skipped --- +// +// import * as c from "./c" +// import cDefault from "./c" +// import * as /*FIND ALL REFS*/[|d|] from "./d" +// import dDefault from "./d" + + + +// === findAllReferences === +// === /foo.ts === +// --- (line: 5) skipped --- +// import * as c from "./c" +// import cDefault from "./c" +// import * as d from "./d" +// import /*FIND ALL REFS*/[|dDefault|] from "./d" \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport_anonymous.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport_anonymous.baseline.jsonc new file mode 100644 index 0000000000..5f0ee63378 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport_anonymous.baseline.jsonc @@ -0,0 +1,3 @@ +// === findAllReferences === +// === /a.ts === +// export /*FIND ALL REFS*/default 1; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport_reExport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport_reExport.baseline.jsonc new file mode 100644 index 0000000000..c6e337ef4b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultExport_reExport.baseline.jsonc @@ -0,0 +1,23 @@ +// === findAllReferences === +// === /export.ts === +// const /*FIND ALL REFS*/[|foo|] = 1; +// export default [|foo|]; + + + +// === findAllReferences === +// === /export.ts === +// const [|foo|] = 1; +// export default /*FIND ALL REFS*/[|foo|]; + + + +// === findAllReferences === +// === /re-export.ts === +// export { /*FIND ALL REFS*/default } from "./export"; + + + +// === findAllReferences === +// === /re-export-dep.ts === +// import /*FIND ALL REFS*/[|fooDefault|] from "./re-export"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultKeyword.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultKeyword.baseline.jsonc new file mode 100644 index 0000000000..c4f30551ac --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForDefaultKeyword.baseline.jsonc @@ -0,0 +1,58 @@ +// === findAllReferences === +// === /findAllRefsForDefaultKeyword.ts === +// function f(value: string, /*FIND ALL REFS*/default: string) {} +// +// const default = 1; +// +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /findAllRefsForDefaultKeyword.ts === +// function f(value: string, default: string) {} +// +// const /*FIND ALL REFS*/default = 1; +// +// function default() {} +// +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /findAllRefsForDefaultKeyword.ts === +// function f(value: string, default: string) {} +// +// const default = 1; +// +// function /*FIND ALL REFS*/default() {} +// +// class default {} +// +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /findAllRefsForDefaultKeyword.ts === +// --- (line: 3) skipped --- +// +// function default() {} +// +// class /*FIND ALL REFS*/default {} +// +// const foo = { +// default: 1 +// } + + + +// === findAllReferences === +// === /findAllRefsForDefaultKeyword.ts === +// --- (line: 6) skipped --- +// class default {} +// +// const foo = { +// /*FIND ALL REFS*/[|default|]: 1 +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForFunctionExpression01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForFunctionExpression01.baseline.jsonc new file mode 100644 index 0000000000..f02db6604a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForFunctionExpression01.baseline.jsonc @@ -0,0 +1,53 @@ +// === findAllReferences === +// === /file1.ts === +// var foo = /*FIND ALL REFS*/function foo(a = foo(), b = () => foo) { +// foo(foo, foo); +// } + + + +// === findAllReferences === +// === /file1.ts === +// var foo = function /*FIND ALL REFS*/[|foo|](a = [|foo|](), b = () => [|foo|]) { +// [|foo|]([|foo|], [|foo|]); +// } + + + +// === findAllReferences === +// === /file1.ts === +// var foo = function [|foo|](a = /*FIND ALL REFS*/[|foo|](), b = () => [|foo|]) { +// [|foo|]([|foo|], [|foo|]); +// } + + + +// === findAllReferences === +// === /file1.ts === +// var foo = function [|foo|](a = [|foo|](), b = () => /*FIND ALL REFS*/[|foo|]) { +// [|foo|]([|foo|], [|foo|]); +// } + + + +// === findAllReferences === +// === /file1.ts === +// var foo = function [|foo|](a = [|foo|](), b = () => [|foo|]) { +// /*FIND ALL REFS*/[|foo|]([|foo|], [|foo|]); +// } + + + +// === findAllReferences === +// === /file1.ts === +// var foo = function [|foo|](a = [|foo|](), b = () => [|foo|]) { +// [|foo|](/*FIND ALL REFS*/[|foo|], [|foo|]); +// } + + + +// === findAllReferences === +// === /file1.ts === +// var foo = function [|foo|](a = [|foo|](), b = () => [|foo|]) { +// [|foo|]([|foo|], /*FIND ALL REFS*/[|foo|]); +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForImportCall.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForImportCall.baseline.jsonc new file mode 100644 index 0000000000..571d62441b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForImportCall.baseline.jsonc @@ -0,0 +1,12 @@ +// === findAllReferences === +// === /app.ts === +// export function [|he/*FIND ALL REFS*/llo|]() {}; + +// === /direct-use.ts === +// async function main() { +// const mod = await import("./app") +// mod.[|hello|](); +// } + +// === /indirect-use.ts === +// import("./re-export").then(mod => mod.services.app.[|hello|]()); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForImportCallType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForImportCallType.baseline.jsonc new file mode 100644 index 0000000000..7addf059ff --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForImportCallType.baseline.jsonc @@ -0,0 +1,8 @@ +// === findAllReferences === +// === /app.ts === +// export function [|he/*FIND ALL REFS*/llo|]() {}; + +// === /indirect-use.ts === +// import type { app } from "./re-export"; +// declare const app: app +// app.[|hello|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForMappedType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForMappedType.baseline.jsonc new file mode 100644 index 0000000000..3004bf50f2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForMappedType.baseline.jsonc @@ -0,0 +1,7 @@ +// === findAllReferences === +// === /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 } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForObjectLiteralProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForObjectLiteralProperties.baseline.jsonc new file mode 100644 index 0000000000..0ee98f9be7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForObjectLiteralProperties.baseline.jsonc @@ -0,0 +1,43 @@ +// === findAllReferences === +// === /findAllRefsForObjectLiteralProperties.ts === +// var x = { +// /*FIND ALL REFS*/[|property|]: {} +// }; +// +// x.[|property|]; +// +// let {[|property|]: pVar} = x; + + + +// === findAllReferences === +// === /findAllRefsForObjectLiteralProperties.ts === +// var x = { +// [|property|]: {} +// }; +// +// x./*FIND ALL REFS*/[|property|]; +// +// let {[|property|]: pVar} = x; + + + +// === findAllReferences === +// === /findAllRefsForObjectLiteralProperties.ts === +// --- (line: 3) skipped --- +// +// x.property; +// +// /*FIND ALL REFS*/let {property: pVar} = x; + + + +// === findAllReferences === +// === /findAllRefsForObjectLiteralProperties.ts === +// var x = { +// [|property|]: {} +// }; +// +// x.[|property|]; +// +// let {/*FIND ALL REFS*/[|property|]: pVar} = x; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForObjectSpread.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForObjectSpread.baseline.jsonc new file mode 100644 index 0000000000..89ba3ee24a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForObjectSpread.baseline.jsonc @@ -0,0 +1,45 @@ +// === findAllReferences === +// === /findAllRefsForObjectSpread.ts === +// interface A1 { readonly /*FIND ALL REFS*/[|a|]: string }; +// interface A2 { a?: number }; +// let a1: A1; +// let a2: A2; +// let a12 = { ...a1, ...a2 }; +// a12.[|a|]; +// a1.[|a|]; + + + +// === findAllReferences === +// === /findAllRefsForObjectSpread.ts === +// interface A1 { readonly a: string }; +// interface A2 { /*FIND ALL REFS*/[|a|]?: number }; +// let a1: A1; +// let a2: A2; +// let a12 = { ...a1, ...a2 }; +// a12.[|a|]; +// a1.a; + + + +// === findAllReferences === +// === /findAllRefsForObjectSpread.ts === +// interface A1 { readonly [|a|]: string }; +// interface A2 { [|a|]?: number }; +// let a1: A1; +// let a2: A2; +// let a12 = { ...a1, ...a2 }; +// a12./*FIND ALL REFS*/[|a|]; +// a1.[|a|]; + + + +// === findAllReferences === +// === /findAllRefsForObjectSpread.ts === +// interface A1 { readonly [|a|]: string }; +// interface A2 { a?: number }; +// let a1: A1; +// let a2: A2; +// let a12 = { ...a1, ...a2 }; +// a12.[|a|]; +// a1./*FIND ALL REFS*/[|a|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForRest.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForRest.baseline.jsonc new file mode 100644 index 0000000000..fa428c7a86 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForRest.baseline.jsonc @@ -0,0 +1,23 @@ +// === findAllReferences === +// === /findAllRefsForRest.ts === +// interface Gen { +// x: number +// /*FIND ALL REFS*/[|parent|]: Gen; +// millenial: string; +// } +// let t: Gen; +// var { x, ...rest } = t; +// rest.[|parent|]; + + + +// === findAllReferences === +// === /findAllRefsForRest.ts === +// interface Gen { +// x: number +// [|parent|]: Gen; +// millenial: string; +// } +// let t: Gen; +// var { x, ...rest } = t; +// rest./*FIND ALL REFS*/[|parent|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStaticInstanceMethodInheritance.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStaticInstanceMethodInheritance.baseline.jsonc new file mode 100644 index 0000000000..872fa19d94 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStaticInstanceMethodInheritance.baseline.jsonc @@ -0,0 +1,91 @@ +// === findAllReferences === +// === /findAllRefsForStaticInstanceMethodInheritance.ts === +// class X{ +// /*FIND ALL REFS*/[|foo|](): void{} +// } +// +// class Y extends X{ +// static foo(): void{} +// } +// +// class Z extends Y{ +// static foo(): void{} +// [|foo|](): void{} +// } +// +// const x = new X(); +// const y = new Y(); +// const z = new Z(); +// x.[|foo|](); +// y.[|foo|](); +// z.[|foo|](); +// Y.foo(); +// Z.foo(); + + + +// === findAllReferences === +// === /findAllRefsForStaticInstanceMethodInheritance.ts === +// class X{ +// foo(): void{} +// } +// +// class Y extends X{ +// static /*FIND ALL REFS*/[|foo|](): void{} +// } +// +// class Z extends Y{ +// // --- (line: 10) skipped --- + +// --- (line: 16) skipped --- +// x.foo(); +// y.foo(); +// z.foo(); +// Y.[|foo|](); +// Z.foo(); + + + +// === findAllReferences === +// === /findAllRefsForStaticInstanceMethodInheritance.ts === +// --- (line: 6) skipped --- +// } +// +// class Z extends Y{ +// static /*FIND ALL REFS*/[|foo|](): void{} +// foo(): void{} +// } +// +// // --- (line: 14) skipped --- + +// --- (line: 17) skipped --- +// y.foo(); +// z.foo(); +// Y.foo(); +// Z.[|foo|](); + + + +// === findAllReferences === +// === /findAllRefsForStaticInstanceMethodInheritance.ts === +// class X{ +// [|foo|](): void{} +// } +// +// class Y extends X{ +// static foo(): void{} +// } +// +// class Z extends Y{ +// static foo(): void{} +// /*FIND ALL REFS*/[|foo|](): void{} +// } +// +// const x = new X(); +// const y = new Y(); +// const z = new Z(); +// x.[|foo|](); +// y.[|foo|](); +// z.[|foo|](); +// Y.foo(); +// Z.foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStaticInstancePropertyInheritance.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStaticInstancePropertyInheritance.baseline.jsonc new file mode 100644 index 0000000000..ef28551cd5 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStaticInstancePropertyInheritance.baseline.jsonc @@ -0,0 +1,211 @@ +// === findAllReferences === +// === /findAllRefsForStaticInstancePropertyInheritance.ts === +// class X{ +// /*FIND ALL REFS*/[|foo|]:any +// } +// +// class Y extends X{ +// static foo:any +// } +// +// class Z extends Y{ +// static foo:any +// [|foo|]:any +// } +// +// const x = new X(); +// const y = new Y(); +// const z = new Z(); +// x.[|foo|]; +// y.[|foo|]; +// z.[|foo|]; +// Y.foo; +// Z.foo; + + + +// === findAllReferences === +// === /findAllRefsForStaticInstancePropertyInheritance.ts === +// class X{ +// foo:any +// } +// +// class Y extends X{ +// static /*FIND ALL REFS*/[|foo|]:any +// } +// +// class Z extends Y{ +// // --- (line: 10) skipped --- + +// --- (line: 16) skipped --- +// x.foo; +// y.foo; +// z.foo; +// Y.[|foo|]; +// Z.foo; + + + +// === findAllReferences === +// === /findAllRefsForStaticInstancePropertyInheritance.ts === +// --- (line: 6) skipped --- +// } +// +// class Z extends Y{ +// static /*FIND ALL REFS*/[|foo|]:any +// foo:any +// } +// +// // --- (line: 14) skipped --- + +// --- (line: 17) skipped --- +// y.foo; +// z.foo; +// Y.foo; +// Z.[|foo|]; + + + +// === findAllReferences === +// === /findAllRefsForStaticInstancePropertyInheritance.ts === +// class X{ +// [|foo|]:any +// } +// +// class Y extends X{ +// static foo:any +// } +// +// class Z extends Y{ +// static foo:any +// /*FIND ALL REFS*/[|foo|]:any +// } +// +// const x = new X(); +// const y = new Y(); +// const z = new Z(); +// x.[|foo|]; +// y.[|foo|]; +// z.[|foo|]; +// Y.foo; +// Z.foo; + + + +// === findAllReferences === +// === /findAllRefsForStaticInstancePropertyInheritance.ts === +// class X{ +// [|foo|]:any +// } +// +// class Y extends X{ +// static foo:any +// } +// +// class Z extends Y{ +// static foo:any +// [|foo|]:any +// } +// +// const x = new X(); +// const y = new Y(); +// const z = new Z(); +// x./*FIND ALL REFS*/[|foo|]; +// y.[|foo|]; +// z.[|foo|]; +// Y.foo; +// Z.foo; + + + +// === findAllReferences === +// === /findAllRefsForStaticInstancePropertyInheritance.ts === +// class X{ +// [|foo|]:any +// } +// +// class Y extends X{ +// static foo:any +// } +// +// class Z extends Y{ +// static foo:any +// [|foo|]:any +// } +// +// const x = new X(); +// const y = new Y(); +// const z = new Z(); +// x.[|foo|]; +// y./*FIND ALL REFS*/[|foo|]; +// z.[|foo|]; +// Y.foo; +// Z.foo; + + + +// === findAllReferences === +// === /findAllRefsForStaticInstancePropertyInheritance.ts === +// class X{ +// [|foo|]:any +// } +// +// class Y extends X{ +// static foo:any +// } +// +// class Z extends Y{ +// static foo:any +// [|foo|]:any +// } +// +// const x = new X(); +// const y = new Y(); +// const z = new Z(); +// x.[|foo|]; +// y.[|foo|]; +// z./*FIND ALL REFS*/[|foo|]; +// Y.foo; +// Z.foo; + + + +// === findAllReferences === +// === /findAllRefsForStaticInstancePropertyInheritance.ts === +// class X{ +// foo:any +// } +// +// class Y extends X{ +// static [|foo|]:any +// } +// +// class Z extends Y{ +// // --- (line: 10) skipped --- + +// --- (line: 16) skipped --- +// x.foo; +// y.foo; +// z.foo; +// Y./*FIND ALL REFS*/[|foo|]; +// Z.foo; + + + +// === findAllReferences === +// === /findAllRefsForStaticInstancePropertyInheritance.ts === +// --- (line: 6) skipped --- +// } +// +// class Z extends Y{ +// static [|foo|]:any +// foo:any +// } +// +// // --- (line: 14) skipped --- + +// --- (line: 17) skipped --- +// y.foo; +// z.foo; +// Y.foo; +// Z./*FIND ALL REFS*/[|foo|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStringLiteral.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStringLiteral.baseline.jsonc new file mode 100644 index 0000000000..25e25f788a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStringLiteral.baseline.jsonc @@ -0,0 +1,8 @@ +// === findAllReferences === +// === /a.ts === +// interface Foo { +// property: /*FIND ALL REFS*/"foo"; +// } +// /** +// * @type {{ property: "foo"}} +// // --- (line: 6) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStringLiteralTypes.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStringLiteralTypes.baseline.jsonc new file mode 100644 index 0000000000..761c82bd75 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForStringLiteralTypes.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /findAllRefsForStringLiteralTypes.ts === +// type Options = "/*FIND ALL REFS*/option 1" | "option 2"; +// let myOption: Options = "option 1"; + + + +// === findAllReferences === +// === /findAllRefsForStringLiteralTypes.ts === +// type Options = "option 1" | "option 2"; +// let myOption: Options = "/*FIND ALL REFS*/option 1"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForUMDModuleAlias1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForUMDModuleAlias1.baseline.jsonc new file mode 100644 index 0000000000..544b2dd589 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForUMDModuleAlias1.baseline.jsonc @@ -0,0 +1,29 @@ +// === findAllReferences === +// === /0.d.ts === +// export function doThing(): string; +// export function doTheOtherThing(): void; +// /*FIND ALL REFS*/export as namespace myLib; + + + +// === findAllReferences === +// === /0.d.ts === +// export function doThing(): string; +// export function doTheOtherThing(): void; +// export as namespace /*FIND ALL REFS*/[|myLib|]; + +// === /1.ts === +// /// +// [|myLib|].doThing(); + + + +// === findAllReferences === +// === /0.d.ts === +// export function doThing(): string; +// export function doTheOtherThing(): void; +// export as namespace [|myLib|]; + +// === /1.ts === +// /// +// /*FIND ALL REFS*/[|myLib|].doThing(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForVariableInExtendsClause01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForVariableInExtendsClause01.baseline.jsonc new file mode 100644 index 0000000000..e63980b63d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForVariableInExtendsClause01.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /findAllRefsForVariableInExtendsClause01.ts === +// /*FIND ALL REFS*/var Base = class { }; +// class C extends Base { } + + + +// === findAllReferences === +// === /findAllRefsForVariableInExtendsClause01.ts === +// var /*FIND ALL REFS*/[|Base|] = class { }; +// class C extends [|Base|] { } + + + +// === findAllReferences === +// === /findAllRefsForVariableInExtendsClause01.ts === +// var [|Base|] = class { }; +// class C extends /*FIND ALL REFS*/[|Base|] { } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForVariableInExtendsClause02.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForVariableInExtendsClause02.baseline.jsonc new file mode 100644 index 0000000000..635f9d38cb --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForVariableInExtendsClause02.baseline.jsonc @@ -0,0 +1,27 @@ +// === findAllReferences === +// === /findAllRefsForVariableInExtendsClause02.ts === +// /*FIND ALL REFS*/interface Base { } +// namespace n { +// var Base = class { }; +// interface I extends Base { } +// } + + + +// === findAllReferences === +// === /findAllRefsForVariableInExtendsClause02.ts === +// interface /*FIND ALL REFS*/[|Base|] { } +// namespace n { +// var Base = class { }; +// interface I extends [|Base|] { } +// } + + + +// === findAllReferences === +// === /findAllRefsForVariableInExtendsClause02.ts === +// interface [|Base|] { } +// namespace n { +// var Base = class { }; +// interface I extends /*FIND ALL REFS*/[|Base|] { } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForVariableInImplementsClause01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForVariableInImplementsClause01.baseline.jsonc new file mode 100644 index 0000000000..87c2ca3367 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsForVariableInImplementsClause01.baseline.jsonc @@ -0,0 +1,4 @@ +// === findAllReferences === +// === /findAllRefsForVariableInImplementsClause01.ts === +// var Base = class { }; +// class C extends Base implements /*FIND ALL REFS*/Base { } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsGlobalThisKeywordInModule.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsGlobalThisKeywordInModule.baseline.jsonc new file mode 100644 index 0000000000..6cdbc9c1bc --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsGlobalThisKeywordInModule.baseline.jsonc @@ -0,0 +1,4 @@ +// === findAllReferences === +// === /findAllRefsGlobalThisKeywordInModule.ts === +// /*FIND ALL REFS*/this; +// export const c = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsImportEquals.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsImportEquals.baseline.jsonc new file mode 100644 index 0000000000..d1ae3b9984 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsImportEquals.baseline.jsonc @@ -0,0 +1,4 @@ +// === findAllReferences === +// === /findAllRefsImportEquals.ts === +// import j = N./*FIND ALL REFS*/[|q|]; +// namespace N { export const q = 0; } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsImportType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsImportType.baseline.jsonc new file mode 100644 index 0000000000..d7491ce03c --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsImportType.baseline.jsonc @@ -0,0 +1,20 @@ +// === findAllReferences === +// === /a.js === +// module.exports = 0; +// /*FIND ALL REFS*/export type N = number; + + + +// === findAllReferences === +// === /a.js === +// module.exports = 0; +// export type /*FIND ALL REFS*/[|N|] = number; + +// === /b.js === +// type T = import("./a").[|N|]; + + + +// === findAllReferences === +// === /b.js === +// type T = import("./a")./*FIND ALL REFS*/N; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInClassExpression.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInClassExpression.baseline.jsonc new file mode 100644 index 0000000000..1b7957d5e9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInClassExpression.baseline.jsonc @@ -0,0 +1,15 @@ +// === findAllReferences === +// === /findAllRefsInClassExpression.ts === +// interface I { /*FIND ALL REFS*/[|boom|](): void; } +// new class C implements I { +// [|boom|](){} +// } + + + +// === findAllReferences === +// === /findAllRefsInClassExpression.ts === +// interface I { [|boom|](): void; } +// new class C implements I { +// /*FIND ALL REFS*/[|boom|](){} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsIndexedAccessTypes.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsIndexedAccessTypes.baseline.jsonc new file mode 100644 index 0000000000..d725fe036e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsIndexedAccessTypes.baseline.jsonc @@ -0,0 +1,49 @@ +// === findAllReferences === +// === /findAllRefsIndexedAccessTypes.ts === +// interface I { +// /*FIND ALL REFS*/[|0|]: number; +// s: string; +// } +// interface J { +// a: I[[|0|]], +// b: I["s"], +// } + + + +// === findAllReferences === +// === /findAllRefsIndexedAccessTypes.ts === +// interface I { +// 0: number; +// /*FIND ALL REFS*/[|s|]: string; +// } +// interface J { +// a: I[0], +// b: I["[|s|]"], +// } + + + +// === findAllReferences === +// === /findAllRefsIndexedAccessTypes.ts === +// interface I { +// [|0|]: number; +// s: string; +// } +// interface J { +// a: I[/*FIND ALL REFS*/[|0|]], +// b: I["s"], +// } + + + +// === findAllReferences === +// === /findAllRefsIndexedAccessTypes.ts === +// interface I { +// 0: number; +// [|s|]: string; +// } +// interface J { +// a: I[0], +// b: I["/*FIND ALL REFS*/[|s|]"], +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties1.baseline.jsonc new file mode 100644 index 0000000000..785fffc0b1 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties1.baseline.jsonc @@ -0,0 +1,49 @@ +// === findAllReferences === +// === /findAllRefsInheritedProperties1.ts === +// class class1 extends class1 { +// /*FIND ALL REFS*/[|doStuff|]() { } +// propName: string; +// } +// +// var v: class1; +// v.[|doStuff|](); +// v.propName; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties1.ts === +// class class1 extends class1 { +// doStuff() { } +// /*FIND ALL REFS*/[|propName|]: string; +// } +// +// var v: class1; +// v.doStuff(); +// v.[|propName|]; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties1.ts === +// class class1 extends class1 { +// [|doStuff|]() { } +// propName: string; +// } +// +// var v: class1; +// v./*FIND ALL REFS*/[|doStuff|](); +// v.propName; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties1.ts === +// class class1 extends class1 { +// doStuff() { } +// [|propName|]: string; +// } +// +// var v: class1; +// v.doStuff(); +// v./*FIND ALL REFS*/[|propName|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties2.baseline.jsonc new file mode 100644 index 0000000000..e97abb0aa8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties2.baseline.jsonc @@ -0,0 +1,49 @@ +// === findAllReferences === +// === /findAllRefsInheritedProperties2.ts === +// interface interface1 extends interface1 { +// /*FIND ALL REFS*/[|doStuff|](): void; // r0 +// propName: string; // r1 +// } +// +// var v: interface1; +// v.[|doStuff|](); // r2 +// v.propName; // r3 + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties2.ts === +// interface interface1 extends interface1 { +// doStuff(): void; // r0 +// /*FIND ALL REFS*/[|propName|]: string; // r1 +// } +// +// var v: interface1; +// v.doStuff(); // r2 +// v.[|propName|]; // r3 + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties2.ts === +// interface interface1 extends interface1 { +// [|doStuff|](): void; // r0 +// propName: string; // r1 +// } +// +// var v: interface1; +// v./*FIND ALL REFS*/[|doStuff|](); // r2 +// v.propName; // r3 + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties2.ts === +// interface interface1 extends interface1 { +// doStuff(): void; // r0 +// [|propName|]: string; // r1 +// } +// +// var v: interface1; +// v.doStuff(); // r2 +// v./*FIND ALL REFS*/[|propName|]; // r3 \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties3.baseline.jsonc new file mode 100644 index 0000000000..5ea694ce25 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties3.baseline.jsonc @@ -0,0 +1,163 @@ +// === findAllReferences === +// === /findAllRefsInheritedProperties3.ts === +// class class1 extends class1 { +// /*FIND ALL REFS*/[|doStuff|]() { } +// propName: string; +// } +// interface interface1 extends interface1 { +// doStuff(): void; +// propName: string; +// } +// class class2 extends class1 implements interface1 { +// [|doStuff|]() { } +// propName: string; +// } +// +// var v: class2; +// v.[|doStuff|](); +// v.propName; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties3.ts === +// class class1 extends class1 { +// doStuff() { } +// /*FIND ALL REFS*/[|propName|]: string; +// } +// interface interface1 extends interface1 { +// doStuff(): void; +// propName: string; +// } +// class class2 extends class1 implements interface1 { +// doStuff() { } +// [|propName|]: string; +// } +// +// var v: class2; +// v.doStuff(); +// v.[|propName|]; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties3.ts === +// class class1 extends class1 { +// doStuff() { } +// propName: string; +// } +// interface interface1 extends interface1 { +// /*FIND ALL REFS*/[|doStuff|](): void; +// propName: string; +// } +// class class2 extends class1 implements interface1 { +// [|doStuff|]() { } +// propName: string; +// } +// +// var v: class2; +// v.[|doStuff|](); +// v.propName; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties3.ts === +// --- (line: 3) skipped --- +// } +// interface interface1 extends interface1 { +// doStuff(): void; +// /*FIND ALL REFS*/[|propName|]: string; +// } +// class class2 extends class1 implements interface1 { +// doStuff() { } +// [|propName|]: string; +// } +// +// var v: class2; +// v.doStuff(); +// v.[|propName|]; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties3.ts === +// class class1 extends class1 { +// [|doStuff|]() { } +// propName: string; +// } +// interface interface1 extends interface1 { +// [|doStuff|](): void; +// propName: string; +// } +// class class2 extends class1 implements interface1 { +// /*FIND ALL REFS*/[|doStuff|]() { } +// propName: string; +// } +// +// var v: class2; +// v.[|doStuff|](); +// v.propName; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties3.ts === +// class class1 extends class1 { +// [|doStuff|]() { } +// propName: string; +// } +// interface interface1 extends interface1 { +// [|doStuff|](): void; +// propName: string; +// } +// class class2 extends class1 implements interface1 { +// [|doStuff|]() { } +// propName: string; +// } +// +// var v: class2; +// v./*FIND ALL REFS*/[|doStuff|](); +// v.propName; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties3.ts === +// class class1 extends class1 { +// doStuff() { } +// [|propName|]: string; +// } +// interface interface1 extends interface1 { +// doStuff(): void; +// [|propName|]: string; +// } +// class class2 extends class1 implements interface1 { +// doStuff() { } +// /*FIND ALL REFS*/[|propName|]: string; +// } +// +// var v: class2; +// v.doStuff(); +// v.[|propName|]; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties3.ts === +// class class1 extends class1 { +// doStuff() { } +// [|propName|]: string; +// } +// interface interface1 extends interface1 { +// doStuff(): void; +// [|propName|]: string; +// } +// class class2 extends class1 implements interface1 { +// doStuff() { } +// [|propName|]: string; +// } +// +// var v: class2; +// v.doStuff(); +// v./*FIND ALL REFS*/[|propName|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties4.baseline.jsonc new file mode 100644 index 0000000000..7574b69cc6 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties4.baseline.jsonc @@ -0,0 +1,70 @@ +// === findAllReferences === +// === /findAllRefsInheritedProperties4.ts === +// interface C extends D { +// /*FIND ALL REFS*/[|prop0|]: string; +// prop1: number; +// } +// +// interface D extends C { +// [|prop0|]: string; +// } +// +// var d: D; +// d.[|prop0|]; +// d.prop1; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties4.ts === +// interface C extends D { +// [|prop0|]: string; +// prop1: number; +// } +// +// interface D extends C { +// /*FIND ALL REFS*/[|prop0|]: string; +// } +// +// var d: D; +// d.[|prop0|]; +// d.prop1; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties4.ts === +// interface C extends D { +// [|prop0|]: string; +// prop1: number; +// } +// +// interface D extends C { +// [|prop0|]: string; +// } +// +// var d: D; +// d./*FIND ALL REFS*/[|prop0|]; +// d.prop1; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties4.ts === +// interface C extends D { +// prop0: string; +// /*FIND ALL REFS*/[|prop1|]: number; +// } +// +// interface D extends C { +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties4.ts === +// --- (line: 8) skipped --- +// +// var d: D; +// d.prop0; +// d./*FIND ALL REFS*/prop1; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties5.baseline.jsonc new file mode 100644 index 0000000000..0e213dc93d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInheritedProperties5.baseline.jsonc @@ -0,0 +1,60 @@ +// === findAllReferences === +// === /findAllRefsInheritedProperties5.ts === +// class C extends D { +// /*FIND ALL REFS*/[|prop0|]: string; +// prop1: number; +// } +// +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties5.ts === +// class C extends D { +// prop0: string; +// /*FIND ALL REFS*/[|prop1|]: number; +// } +// +// class D extends C { +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties5.ts === +// --- (line: 3) skipped --- +// } +// +// class D extends C { +// /*FIND ALL REFS*/[|prop0|]: string; +// } +// +// var d: D; +// d.[|prop0|]; +// d.prop1; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties5.ts === +// --- (line: 3) skipped --- +// } +// +// class D extends C { +// [|prop0|]: string; +// } +// +// var d: D; +// d./*FIND ALL REFS*/[|prop0|]; +// d.prop1; + + + +// === findAllReferences === +// === /findAllRefsInheritedProperties5.ts === +// --- (line: 8) skipped --- +// +// var d: D; +// d.prop0; +// d./*FIND ALL REFS*/prop1; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInsideTemplates1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInsideTemplates1.baseline.jsonc new file mode 100644 index 0000000000..d70f81e56a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInsideTemplates1.baseline.jsonc @@ -0,0 +1,25 @@ +// === findAllReferences === +// === /findAllRefsInsideTemplates1.ts === +// /*FIND ALL REFS*/var x = 10; +// var y = `${ x } ${ x }` + + + +// === findAllReferences === +// === /findAllRefsInsideTemplates1.ts === +// var /*FIND ALL REFS*/[|x|] = 10; +// var y = `${ [|x|] } ${ [|x|] }` + + + +// === findAllReferences === +// === /findAllRefsInsideTemplates1.ts === +// var [|x|] = 10; +// var y = `${ /*FIND ALL REFS*/[|x|] } ${ [|x|] }` + + + +// === findAllReferences === +// === /findAllRefsInsideTemplates1.ts === +// var [|x|] = 10; +// var y = `${ [|x|] } ${ /*FIND ALL REFS*/[|x|] }` \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInsideTemplates2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInsideTemplates2.baseline.jsonc new file mode 100644 index 0000000000..9d2e0aa91d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInsideTemplates2.baseline.jsonc @@ -0,0 +1,32 @@ +// === findAllReferences === +// === /findAllRefsInsideTemplates2.ts === +// /*FIND ALL REFS*/function f(...rest: any[]) { } +// f `${ f } ${ f }` + + + +// === findAllReferences === +// === /findAllRefsInsideTemplates2.ts === +// function /*FIND ALL REFS*/[|f|](...rest: any[]) { } +// [|f|] `${ [|f|] } ${ [|f|] }` + + + +// === findAllReferences === +// === /findAllRefsInsideTemplates2.ts === +// function [|f|](...rest: any[]) { } +// /*FIND ALL REFS*/[|f|] `${ [|f|] } ${ [|f|] }` + + + +// === findAllReferences === +// === /findAllRefsInsideTemplates2.ts === +// function [|f|](...rest: any[]) { } +// [|f|] `${ /*FIND ALL REFS*/[|f|] } ${ [|f|] }` + + + +// === findAllReferences === +// === /findAllRefsInsideTemplates2.ts === +// function [|f|](...rest: any[]) { } +// [|f|] `${ [|f|] } ${ /*FIND ALL REFS*/[|f|] }` \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInsideWithBlock.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInsideWithBlock.baseline.jsonc new file mode 100644 index 0000000000..118d6ab98c --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsInsideWithBlock.baseline.jsonc @@ -0,0 +1,46 @@ +// === findAllReferences === +// === /findAllRefsInsideWithBlock.ts === +// /*FIND ALL REFS*/var x = 0; +// +// with ({}) { +// var y = x; // Reference of x here should not be picked +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /findAllRefsInsideWithBlock.ts === +// var /*FIND ALL REFS*/[|x|] = 0; +// +// with ({}) { +// var y = x; // Reference of x here should not be picked +// y++; // also reference for y should be ignored +// } +// +// [|x|] = [|x|] + 1; + + + +// === findAllReferences === +// === /findAllRefsInsideWithBlock.ts === +// var [|x|] = 0; +// +// with ({}) { +// var y = x; // Reference of x here should not be picked +// y++; // also reference for y should be ignored +// } +// +// /*FIND ALL REFS*/[|x|] = [|x|] + 1; + + + +// === findAllReferences === +// === /findAllRefsInsideWithBlock.ts === +// var [|x|] = 0; +// +// with ({}) { +// var y = x; // Reference of x here should not be picked +// y++; // also reference for y should be ignored +// } +// +// [|x|] = /*FIND ALL REFS*/[|x|] + 1; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsIsDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsIsDefinition.baseline.jsonc new file mode 100644 index 0000000000..40a30963df --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsIsDefinition.baseline.jsonc @@ -0,0 +1,104 @@ +// === findAllReferences === +// === /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 }); +// // --- (line: 15) skipped --- + + + +// === findAllReferences === +// === /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 }); +// // --- (line: 15) skipped --- + + + +// === findAllReferences === +// === /findAllRefsIsDefinition.ts === +// --- (line: 9) skipped --- +// +// foo; foon; +// +// export const [|bar|]/*FIND ALL REFS*/ = 123; +// console.log({ [|bar|] }); +// +// interface IFoo { +// foo(): void; +// // --- (line: 18) skipped --- + + + +// === findAllReferences === +// === /findAllRefsIsDefinition.ts === +// --- (line: 13) skipped --- +// 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() } +// } + + + +// === findAllReferences === +// === /findAllRefsIsDefinition.ts === +// --- (line: 15) skipped --- +// 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() } +// } + + + +// === findAllReferences === +// === /findAllRefsIsDefinition.ts === +// --- (line: 13) skipped --- +// 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() } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc new file mode 100644 index 0000000000..8d4374f0f1 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag.baseline.jsonc @@ -0,0 +1,13 @@ +// === findAllReferences === +// === /a.js === +// /** +// * @import { [|A|] } from "./b"; +// */ +// +// /** +// * @param { [|A|]/*FIND ALL REFS*/ } a +// */ +// function f(a) {} + +// === /b.ts === +// export interface [|A|] { } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag2.baseline.jsonc new file mode 100644 index 0000000000..44d151af3a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag2.baseline.jsonc @@ -0,0 +1,25 @@ +// === findAllReferences === +// === /component.js === +// export default class [|Component|] { +// constructor() { +// this.id_ = Math.random(); +// } +// // --- (line: 5) skipped --- + +// === /player.js === +// import [|Component|] from './component.js'; +// +// /** +// * @extends [|Component|]/*FIND ALL REFS*/ +// */ +// export class Player extends [|Component|] {} + +// === /spatial-navigation.js === +// /** @import [|Component|] from './component.js' */ +// +// export class SpatialNavigation { +// /** +// * @param {[|Component|]} component +// */ +// add(component) {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc new file mode 100644 index 0000000000..fe331dd151 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag3.baseline.jsonc @@ -0,0 +1,25 @@ +// === findAllReferences === +// === /component.js === +// export class [|Component|] { +// constructor() { +// this.id_ = Math.random(); +// } +// // --- (line: 5) skipped --- + +// === /player.js === +// import { [|Component|] } from './component.js'; +// +// /** +// * @extends [|Component|]/*FIND ALL REFS*/ +// */ +// export class Player extends [|Component|] {} + +// === /spatial-navigation.js === +// /** @import { [|Component|] } from './component.js' */ +// +// export class SpatialNavigation { +// /** +// * @param {[|Component|]} component +// */ +// add(component) {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag4.baseline.jsonc new file mode 100644 index 0000000000..c3af1c6944 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag4.baseline.jsonc @@ -0,0 +1,8 @@ +// === findAllReferences === +// === /player.js === +// import * as [|C|] from './component.js'; +// +// /** +// * @extends [|C|]/*FIND ALL REFS*/.Component +// */ +// export class Player extends Component {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag5.baseline.jsonc new file mode 100644 index 0000000000..9d98322358 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocImportTag5.baseline.jsonc @@ -0,0 +1,15 @@ +// === findAllReferences === +// === /a.js === +// export default function /*FIND ALL REFS*/[|a|]() {} + +// === /b.js === +// /** @import [|a|], * as ns from "./a" */ + + + +// === findAllReferences === +// === /a.js === +// export default function [|a|]() {} + +// === /b.js === +// /** @import /*FIND ALL REFS*/[|a|], * as ns from "./a" */ \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocTemplateTag_class.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocTemplateTag_class.baseline.jsonc new file mode 100644 index 0000000000..587b5c0e14 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocTemplateTag_class.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /findAllRefsJsDocTemplateTag_class.ts === +// /** @template /*FIND ALL REFS*/T */ +// class C {} + + + +// === findAllReferences === +// === /findAllRefsJsDocTemplateTag_class.ts === +// /** @template T */ +// class C {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocTemplateTag_function.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocTemplateTag_function.baseline.jsonc new file mode 100644 index 0000000000..132af93f79 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocTemplateTag_function.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /findAllRefsJsDocTemplateTag_function.ts === +// /** @template /*FIND ALL REFS*/T */ +// function f() {} + + + +// === findAllReferences === +// === /findAllRefsJsDocTemplateTag_function.ts === +// /** @template T */ +// function f() {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocTypeDef.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocTypeDef.baseline.jsonc new file mode 100644 index 0000000000..7abed0e240 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsDocTypeDef.baseline.jsonc @@ -0,0 +1,4 @@ +// === findAllReferences === +// === /findAllRefsJsDocTypeDef.ts === +// /** @typedef {Object} /*FIND ALL REFS*/T */ +// function foo() {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsThisPropertyAssignment.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsThisPropertyAssignment.baseline.jsonc new file mode 100644 index 0000000000..10c5f56ae9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsThisPropertyAssignment.baseline.jsonc @@ -0,0 +1,25 @@ +// === findAllReferences === +// === /a.js === +// import { infer } from "./infer"; +// infer({ +// m() { +// this.[|x|] = 1; +// this./*FIND ALL REFS*/[|x|]; +// }, +// }); + +// === /infer.d.ts === +// export declare function infer(o: { m(): void } & ThisType<{ [|x|]: number }>): void; + + + +// === findAllReferences === +// === /b.js === +// --- (line: 4) skipped --- +// function infer(o) {} +// infer({ +// m() { +// this.[|x|] = 2; +// this./*FIND ALL REFS*/[|x|]; +// }, +// }); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsThisPropertyAssignment2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsThisPropertyAssignment2.baseline.jsonc new file mode 100644 index 0000000000..031de898a8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsJsThisPropertyAssignment2.baseline.jsonc @@ -0,0 +1,53 @@ +// === findAllReferences === +// === /a.js === +// import { infer } from "./infer"; +// infer({ +// m: { +// initData() { +// this.[|x|] = 1; +// this./*FIND ALL REFS*/[|x|]; +// }, +// } +// }); + +// === /b.ts === +// import { infer } from "./infer"; +// infer({ +// m: { +// initData() { +// this.[|x|] = 1; +// this.[|x|]; +// }, +// } +// }); + +// === /infer.d.ts === +// export declare function infer(o: { m: Record } & ThisType<{ [|x|]: number }>): void; + + + +// === findAllReferences === +// === /a.js === +// import { infer } from "./infer"; +// infer({ +// m: { +// initData() { +// this.[|x|] = 1; +// this.[|x|]; +// }, +// } +// }); + +// === /b.ts === +// import { infer } from "./infer"; +// infer({ +// m: { +// initData() { +// this.[|x|] = 1; +// this./*FIND ALL REFS*/[|x|]; +// }, +// } +// }); + +// === /infer.d.ts === +// export declare function infer(o: { m: Record } & ThisType<{ [|x|]: number }>): void; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsMappedType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsMappedType.baseline.jsonc new file mode 100644 index 0000000000..87daf167b0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsMappedType.baseline.jsonc @@ -0,0 +1,30 @@ +// === findAllReferences === +// === /findAllRefsMappedType.ts === +// interface T { /*FIND ALL REFS*/[|a|]: number; } +// type U = { readonly [K in keyof T]?: string }; +// declare const t: T; +// t.[|a|]; +// declare const u: U; +// u.[|a|]; + + + +// === findAllReferences === +// === /findAllRefsMappedType.ts === +// interface T { [|a|]: number; } +// type U = { readonly [K in keyof T]?: string }; +// declare const t: T; +// t./*FIND ALL REFS*/[|a|]; +// declare const u: U; +// u.[|a|]; + + + +// === findAllReferences === +// === /findAllRefsMappedType.ts === +// interface T { [|a|]: number; } +// type U = { readonly [K in keyof T]?: string }; +// declare const t: T; +// t.[|a|]; +// declare const u: U; +// u./*FIND ALL REFS*/[|a|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsMappedType_nonHomomorphic.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsMappedType_nonHomomorphic.baseline.jsonc new file mode 100644 index 0000000000..fbc0d6c2b1 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsMappedType_nonHomomorphic.baseline.jsonc @@ -0,0 +1,15 @@ +// === findAllReferences === +// === /findAllRefsMappedType_nonHomomorphic.ts === +// function f(x: { [K in "m"]: number; }) { +// x./*FIND ALL REFS*/[|m|]; +// x.[|m|] +// } + + + +// === findAllReferences === +// === /findAllRefsMappedType_nonHomomorphic.ts === +// function f(x: { [K in "m"]: number; }) { +// x.[|m|]; +// x./*FIND ALL REFS*/[|m|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsMissingModulesOverlappingSpecifiers.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsMissingModulesOverlappingSpecifiers.baseline.jsonc new file mode 100644 index 0000000000..6aaee5897e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsMissingModulesOverlappingSpecifiers.baseline.jsonc @@ -0,0 +1,13 @@ +// === findAllReferences === +// === /findAllRefsMissingModulesOverlappingSpecifiers.ts === +// // https://github.com/microsoft/TypeScript/issues/5551 +// import { resolve/*FIND ALL REFS*/ as resolveUrl } from "idontcare"; +// import { resolve } from "whatever"; + + + +// === findAllReferences === +// === /findAllRefsMissingModulesOverlappingSpecifiers.ts === +// // https://github.com/microsoft/TypeScript/issues/5551 +// import { resolve as resolveUrl } from "idontcare"; +// import { [|resolve|]/*FIND ALL REFS*/ } from "whatever"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNoImportClause.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNoImportClause.baseline.jsonc new file mode 100644 index 0000000000..7538271b44 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNoImportClause.baseline.jsonc @@ -0,0 +1,9 @@ +// === findAllReferences === +// === /a.ts === +// /*FIND ALL REFS*/export const x = 0; + + + +// === findAllReferences === +// === /a.ts === +// export const /*FIND ALL REFS*/[|x|] = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNoSubstitutionTemplateLiteralNoCrash1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNoSubstitutionTemplateLiteralNoCrash1.baseline.jsonc new file mode 100644 index 0000000000..f475c56be3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNoSubstitutionTemplateLiteralNoCrash1.baseline.jsonc @@ -0,0 +1,3 @@ +// === findAllReferences === +// === /findAllRefsNoSubstitutionTemplateLiteralNoCrash1.ts === +// type Test = `T/*FIND ALL REFS*/`; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNonModule.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNonModule.baseline.jsonc new file mode 100644 index 0000000000..851c5ebc14 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNonModule.baseline.jsonc @@ -0,0 +1,17 @@ +// === findAllReferences === +// === /import.ts === +// import "./script/*FIND ALL REFS*/"; + + + +// === findAllReferences === +// === /require.js === +// require("./script/*FIND ALL REFS*/"); +// console.log("./script"); + + + +// === findAllReferences === +// === /require.js === +// require("./script"); +// console.log("./script/*FIND ALL REFS*/"); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNonexistentPropertyNoCrash1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNonexistentPropertyNoCrash1.baseline.jsonc new file mode 100644 index 0000000000..effe8abd26 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsNonexistentPropertyNoCrash1.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /src/parser.js === +// --- (line: 10) skipped --- +// variable: function () { +// let name; +// +// if (parserInput.currentChar() === "/*FIND ALL REFS*/@") { +// return name[1]; +// } +// }, +// // --- (line: 18) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName01.baseline.jsonc new file mode 100644 index 0000000000..88473b4793 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName01.baseline.jsonc @@ -0,0 +1,31 @@ +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName01.ts === +// interface I { +// /*FIND ALL REFS*/[|property1|]: number; +// property2: string; +// } +// +// var foo: I; +// var { [|property1|]: prop1 } = foo; + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName01.ts === +// --- (line: 3) skipped --- +// } +// +// var foo: I; +// /*FIND ALL REFS*/var { property1: prop1 } = foo; + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName01.ts === +// interface I { +// [|property1|]: number; +// property2: string; +// } +// +// var foo: I; +// var { /*FIND ALL REFS*/[|property1|]: prop1 } = foo; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName02.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName02.baseline.jsonc new file mode 100644 index 0000000000..a20ffda8ca --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName02.baseline.jsonc @@ -0,0 +1,31 @@ +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName02.ts === +// interface I { +// /*FIND ALL REFS*/[|property1|]: number; +// property2: string; +// } +// +// var foo: I; +// var { [|property1|]: {} } = foo; + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName02.ts === +// --- (line: 3) skipped --- +// } +// +// var foo: I; +// /*FIND ALL REFS*/var { property1: {} } = foo; + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName02.ts === +// interface I { +// [|property1|]: number; +// property2: string; +// } +// +// var foo: I; +// var { /*FIND ALL REFS*/[|property1|]: {} } = foo; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName03.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName03.baseline.jsonc new file mode 100644 index 0000000000..4a97e32610 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName03.baseline.jsonc @@ -0,0 +1,21 @@ +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName03.ts === +// interface I { +// /*FIND ALL REFS*/[|property1|]: number; +// property2: string; +// } +// +// var foo: I; +// var [ { [|property1|]: prop1 }, { [|property1|], property2 } ] = [foo, foo]; + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName03.ts === +// interface I { +// [|property1|]: number; +// property2: string; +// } +// +// var foo: I; +// var [ { [|property1|]: prop1 }, { /*FIND ALL REFS*/[|property1|], property2 } ] = [foo, foo]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName04.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName04.baseline.jsonc new file mode 100644 index 0000000000..8a01daa2da --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName04.baseline.jsonc @@ -0,0 +1,59 @@ +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName04.ts === +// interface I { +// /*FIND ALL REFS*/[|property1|]: number; +// property2: string; +// } +// +// function f({ [|property1|]: p1 }: I, +// { [|property1|] }: I, +// { property1: p2 }) { +// +// return property1 + 1; +// } + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName04.ts === +// interface I { +// [|property1|]: number; +// property2: string; +// } +// +// function f({ /*FIND ALL REFS*/[|property1|]: p1 }: I, +// { [|property1|] }: I, +// { property1: p2 }) { +// +// return property1 + 1; +// } + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName04.ts === +// interface I { +// [|property1|]: number; +// property2: string; +// } +// +// function f({ [|property1|]: p1 }: I, +// { /*FIND ALL REFS*/[|property1|] }: I, +// { property1: p2 }) { +// +// return [|property1|] + 1; +// } + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName04.ts === +// --- (line: 3) skipped --- +// } +// +// function f({ property1: p1 }: I, +// { [|property1|] }: I, +// { property1: p2 }) { +// +// return /*FIND ALL REFS*/[|property1|] + 1; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName05.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName05.baseline.jsonc new file mode 100644 index 0000000000..fc60af735d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName05.baseline.jsonc @@ -0,0 +1,10 @@ +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName05.ts === +// interface I { +// property1: number; +// property2: string; +// } +// +// function f({ /*FIND ALL REFS*/property1: p }, { property1 }) { +// let x = property1; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName06.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName06.baseline.jsonc new file mode 100644 index 0000000000..bb0311f6e4 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName06.baseline.jsonc @@ -0,0 +1,97 @@ +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName06.ts === +// interface I { +// /*FIND ALL REFS*/[|property1|]: number; +// property2: string; +// } +// +// var elems: I[]; +// for (let { [|property1|]: p } of elems) { +// } +// for (let { [|property1|] } of elems) { +// } +// for (var { [|property1|]: p1 } of elems) { +// } +// var p2; +// for ({ [|property1|] : p2 } of elems) { +// } + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName06.ts === +// interface I { +// [|property1|]: number; +// property2: string; +// } +// +// var elems: I[]; +// for (let { /*FIND ALL REFS*/[|property1|]: p } of elems) { +// } +// for (let { [|property1|] } of elems) { +// } +// for (var { [|property1|]: p1 } of elems) { +// } +// var p2; +// for ({ [|property1|] : p2 } of elems) { +// } + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName06.ts === +// interface I { +// [|property1|]: number; +// property2: string; +// } +// +// var elems: I[]; +// for (let { [|property1|]: p } of elems) { +// } +// for (let { [|property1|] } of elems) { +// } +// for (var { /*FIND ALL REFS*/[|property1|]: p1 } of elems) { +// } +// var p2; +// for ({ [|property1|] : p2 } of elems) { +// } + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName06.ts === +// interface I { +// [|property1|]: number; +// property2: string; +// } +// +// var elems: I[]; +// for (let { [|property1|]: p } of elems) { +// } +// for (let { [|property1|] } of elems) { +// } +// for (var { [|property1|]: p1 } of elems) { +// } +// var p2; +// for ({ /*FIND ALL REFS*/[|property1|] : p2 } of elems) { +// } + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName06.ts === +// interface I { +// [|property1|]: number; +// property2: string; +// } +// +// var elems: I[]; +// for (let { [|property1|]: p } of elems) { +// } +// for (let { /*FIND ALL REFS*/[|property1|] } of elems) { +// } +// for (var { [|property1|]: p1 } of elems) { +// } +// var p2; +// for ({ [|property1|] : p2 } of elems) { +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName07.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName07.baseline.jsonc new file mode 100644 index 0000000000..46279d6946 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName07.baseline.jsonc @@ -0,0 +1,5 @@ +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName07.ts === +// let p, b; +// +// p, [{ /*FIND ALL REFS*/[|a|]: p, b }] = [{ [|a|]: 10, b: true }]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName10.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName10.baseline.jsonc new file mode 100644 index 0000000000..369cf2fa1d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsObjectBindingElementPropertyName10.baseline.jsonc @@ -0,0 +1,45 @@ +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName10.ts === +// interface Recursive { +// /*FIND ALL REFS*/[|next|]?: Recursive; +// value: any; +// } +// +// function f ({ [|next|]: { [|next|]: x} }: Recursive) { +// } + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName10.ts === +// interface Recursive { +// next?: Recursive; +// value: any; +// } +// +// function f (/*FIND ALL REFS*/{ next: { next: x} }: Recursive) { +// } + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName10.ts === +// interface Recursive { +// [|next|]?: Recursive; +// value: any; +// } +// +// function f ({ /*FIND ALL REFS*/[|next|]: { [|next|]: x} }: Recursive) { +// } + + + +// === findAllReferences === +// === /findAllRefsObjectBindingElementPropertyName10.ts === +// interface Recursive { +// [|next|]?: Recursive; +// value: any; +// } +// +// function f ({ [|next|]: { /*FIND ALL REFS*/[|next|]: x} }: Recursive) { +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_withModifier.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_withModifier.baseline.jsonc new file mode 100644 index 0000000000..109ee85c9a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOfConstructor_withModifier.baseline.jsonc @@ -0,0 +1,6 @@ +// === findAllReferences === +// === /findAllRefsOfConstructor_withModifier.ts === +// class [|X|] { +// public /*FIND ALL REFS*/constructor() {} +// } +// var x = new [|X|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnDecorators.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnDecorators.baseline.jsonc new file mode 100644 index 0000000000..8cef99ffaa --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnDecorators.baseline.jsonc @@ -0,0 +1,86 @@ +// === findAllReferences === +// === /a.ts === +// /*FIND ALL REFS*/function decorator(target) { +// return target; +// } +// decorator(); + + + +// === findAllReferences === +// === /a.ts === +// function /*FIND ALL REFS*/[|decorator|](target) { +// return target; +// } +// [|decorator|](); + +// === /b.ts === +// @[|decorator|] @[|decorator|]("again") +// class C { +// @[|decorator|] +// method() {} +// } + + + +// === findAllReferences === +// === /a.ts === +// function [|decorator|](target) { +// return target; +// } +// /*FIND ALL REFS*/[|decorator|](); + +// === /b.ts === +// @[|decorator|] @[|decorator|]("again") +// class C { +// @[|decorator|] +// method() {} +// } + + + +// === findAllReferences === +// === /a.ts === +// function [|decorator|](target) { +// return target; +// } +// [|decorator|](); + +// === /b.ts === +// @/*FIND ALL REFS*/[|decorator|] @[|decorator|]("again") +// class C { +// @[|decorator|] +// method() {} +// } + + + +// === findAllReferences === +// === /a.ts === +// function [|decorator|](target) { +// return target; +// } +// [|decorator|](); + +// === /b.ts === +// @[|decorator|] @/*FIND ALL REFS*/[|decorator|]("again") +// class C { +// @[|decorator|] +// method() {} +// } + + + +// === findAllReferences === +// === /a.ts === +// function [|decorator|](target) { +// return target; +// } +// [|decorator|](); + +// === /b.ts === +// @[|decorator|] @[|decorator|]("again") +// class C { +// @/*FIND ALL REFS*/[|decorator|] +// method() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnDefinition.baseline.jsonc new file mode 100644 index 0000000000..c27ee5460e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnDefinition.baseline.jsonc @@ -0,0 +1,53 @@ +// === findAllReferences === +// === /findAllRefsOnDefinition-import.ts === +// --- (line: 3) skipped --- +// +// } +// +// /*FIND ALL REFS*/public start(){ +// return this; +// } +// +// // --- (line: 11) skipped --- + + + +// === findAllReferences === +// === /findAllRefsOnDefinition-import.ts === +// --- (line: 3) skipped --- +// +// } +// +// public /*FIND ALL REFS*/[|start|](){ +// return this; +// } +// +// // --- (line: 11) skipped --- + +// === /findAllRefsOnDefinition.ts === +// import Second = require("./findAllRefsOnDefinition-import"); +// +// var second = new Second.Test() +// second.[|start|](); +// second.stop(); + + + +// === findAllReferences === +// === /findAllRefsOnDefinition-import.ts === +// --- (line: 3) skipped --- +// +// } +// +// public [|start|](){ +// return this; +// } +// +// // --- (line: 11) skipped --- + +// === /findAllRefsOnDefinition.ts === +// import Second = require("./findAllRefsOnDefinition-import"); +// +// var second = new Second.Test() +// second./*FIND ALL REFS*/[|start|](); +// second.stop(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnDefinition2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnDefinition2.baseline.jsonc new file mode 100644 index 0000000000..97030d14d0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnDefinition2.baseline.jsonc @@ -0,0 +1,42 @@ +// === findAllReferences === +// === /findAllRefsOnDefinition2-import.ts === +// export module Test{ +// +// /*FIND ALL REFS*/export interface start { } +// +// export interface stop { } +// } + + + +// === findAllReferences === +// === /findAllRefsOnDefinition2-import.ts === +// export module Test{ +// +// export interface /*FIND ALL REFS*/[|start|] { } +// +// export interface stop { } +// } + +// === /findAllRefsOnDefinition2.ts === +// import Second = require("./findAllRefsOnDefinition2-import"); +// +// var start: Second.Test.[|start|]; +// var stop: Second.Test.stop; + + + +// === findAllReferences === +// === /findAllRefsOnDefinition2-import.ts === +// export module Test{ +// +// export interface [|start|] { } +// +// export interface stop { } +// } + +// === /findAllRefsOnDefinition2.ts === +// import Second = require("./findAllRefsOnDefinition2-import"); +// +// var start: Second.Test./*FIND ALL REFS*/[|start|]; +// var stop: Second.Test.stop; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc new file mode 100644 index 0000000000..0074e398ae --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases.baseline.jsonc @@ -0,0 +1,33 @@ +// === findAllReferences === +// === /a.ts === +// export class /*FIND ALL REFS*/[|Class|] { +// } + +// === /b.ts === +// import { [|Class|] } from "./a"; +// +// var c = new [|Class|](); + + + +// === findAllReferences === +// === /a.ts === +// export class [|Class|] { +// } + +// === /b.ts === +// import { /*FIND ALL REFS*/[|Class|] } from "./a"; +// +// var c = new [|Class|](); + + + +// === findAllReferences === +// === /a.ts === +// export class [|Class|] { +// } + +// === /b.ts === +// import { [|Class|] } from "./a"; +// +// var c = new /*FIND ALL REFS*/[|Class|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases2.baseline.jsonc new file mode 100644 index 0000000000..78284dcace --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnImportAliases2.baseline.jsonc @@ -0,0 +1,56 @@ +// === findAllReferences === +// === /a.ts === +// export class /*FIND ALL REFS*/[|Class|] {} + +// === /b.ts === +// import { [|Class|] as [|C2|] } from "./a"; +// var c = new [|C2|](); + +// === /c.ts === +// export { [|Class|] as C3 } from "./a"; + + + +// === findAllReferences === +// === /a.ts === +// export class [|Class|] {} + +// === /b.ts === +// import { /*FIND ALL REFS*/[|Class|] as [|C2|] } from "./a"; +// var c = new [|C2|](); + +// === /c.ts === +// export { [|Class|] as C3 } from "./a"; + + + +// === findAllReferences === +// === /a.ts === +// export class [|Class|] {} + +// === /b.ts === +// import { [|Class|] as [|C2|] } from "./a"; +// var c = new [|C2|](); + +// === /c.ts === +// export { /*FIND ALL REFS*/[|Class|] as C3 } from "./a"; + + + +// === findAllReferences === +// === /b.ts === +// import { Class as /*FIND ALL REFS*/[|C2|] } from "./a"; +// var c = new [|C2|](); + + + +// === findAllReferences === +// === /b.ts === +// import { Class as [|C2|] } from "./a"; +// var c = new /*FIND ALL REFS*/[|C2|](); + + + +// === findAllReferences === +// === /c.ts === +// export { Class as /*FIND ALL REFS*/C3 } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnPrivateParameterProperty1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnPrivateParameterProperty1.baseline.jsonc new file mode 100644 index 0000000000..a353dee861 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsOnPrivateParameterProperty1.baseline.jsonc @@ -0,0 +1,34 @@ +// === findAllReferences === +// === /findAllRefsOnPrivateParameterProperty1.ts === +// class ABCD { +// constructor(private x: number, public y: number, /*FIND ALL REFS*/private z: number) { +// } +// +// func() { +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /findAllRefsOnPrivateParameterProperty1.ts === +// class ABCD { +// constructor(private x: number, public y: number, private /*FIND ALL REFS*/[|z|]: number) { +// } +// +// func() { +// return this.[|z|]; +// } +// } + + + +// === findAllReferences === +// === /findAllRefsOnPrivateParameterProperty1.ts === +// class ABCD { +// constructor(private x: number, public y: number, private [|z|]: number) { +// } +// +// func() { +// return this./*FIND ALL REFS*/[|z|]; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration1.baseline.jsonc new file mode 100644 index 0000000000..86c9802651 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration1.baseline.jsonc @@ -0,0 +1,8 @@ +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration1.ts === +// class Foo { +// constructor(private /*FIND ALL REFS*/[|privateParam|]: number) { +// let localPrivate = [|privateParam|]; +// this.[|privateParam|] += 10; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration2.baseline.jsonc new file mode 100644 index 0000000000..9a12ebdbb9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration2.baseline.jsonc @@ -0,0 +1,30 @@ +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration2.ts === +// class Foo { +// constructor(public /*FIND ALL REFS*/[|publicParam|]: number) { +// let localPublic = [|publicParam|]; +// this.[|publicParam|] += 10; +// } +// } + + + +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration2.ts === +// class Foo { +// constructor(public [|publicParam|]: number) { +// let localPublic = /*FIND ALL REFS*/[|publicParam|]; +// this.[|publicParam|] += 10; +// } +// } + + + +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration2.ts === +// class Foo { +// constructor(public [|publicParam|]: number) { +// let localPublic = [|publicParam|]; +// this./*FIND ALL REFS*/[|publicParam|] += 10; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration3.baseline.jsonc new file mode 100644 index 0000000000..3c60be1d26 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration3.baseline.jsonc @@ -0,0 +1,30 @@ +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration3.ts === +// class Foo { +// constructor(protected /*FIND ALL REFS*/[|protectedParam|]: number) { +// let localProtected = [|protectedParam|]; +// this.[|protectedParam|] += 10; +// } +// } + + + +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration3.ts === +// class Foo { +// constructor(protected [|protectedParam|]: number) { +// let localProtected = /*FIND ALL REFS*/[|protectedParam|]; +// this.[|protectedParam|] += 10; +// } +// } + + + +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration3.ts === +// class Foo { +// constructor(protected [|protectedParam|]: number) { +// let localProtected = [|protectedParam|]; +// this./*FIND ALL REFS*/[|protectedParam|] += 10; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration_inheritance.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration_inheritance.baseline.jsonc new file mode 100644 index 0000000000..035894ef83 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsParameterPropertyDeclaration_inheritance.baseline.jsonc @@ -0,0 +1,54 @@ +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration_inheritance.ts === +// class C { +// constructor(public /*FIND ALL REFS*/[|x|]: string) { +// [|x|]; +// } +// } +// class D extends C { +// constructor(public [|x|]: string) { +// super([|x|]); +// } +// } + + + +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration_inheritance.ts === +// class C { +// constructor(public [|x|]: string) { +// /*FIND ALL REFS*/[|x|]; +// } +// } +// class D extends C { +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration_inheritance.ts === +// class C { +// constructor(public [|x|]: string) { +// [|x|]; +// } +// } +// class D extends C { +// constructor(public /*FIND ALL REFS*/[|x|]: string) { +// super([|x|]); +// } +// } + + + +// === findAllReferences === +// === /findAllRefsParameterPropertyDeclaration_inheritance.ts === +// class C { +// constructor(public [|x|]: string) { +// [|x|]; +// } +// } +// class D extends C { +// constructor(public [|x|]: string) { +// super(/*FIND ALL REFS*/[|x|]); +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrimitiveJsDoc.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrimitiveJsDoc.baseline.jsonc new file mode 100644 index 0000000000..0b90e046e7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrimitiveJsDoc.baseline.jsonc @@ -0,0 +1,37 @@ +// === findAllReferences === +// === /findAllRefsPrimitiveJsDoc.ts === +// /** +// * @param {/*FIND ALL REFS*/[|number|]} n +// * @returns {[|number|]} +// */ +// function f(n: [|number|]): [|number|] {} + + + +// === findAllReferences === +// === /findAllRefsPrimitiveJsDoc.ts === +// /** +// * @param {[|number|]} n +// * @returns {/*FIND ALL REFS*/[|number|]} +// */ +// function f(n: [|number|]): [|number|] {} + + + +// === findAllReferences === +// === /findAllRefsPrimitiveJsDoc.ts === +// /** +// * @param {[|number|]} n +// * @returns {[|number|]} +// */ +// function f(n: /*FIND ALL REFS*/[|number|]): [|number|] {} + + + +// === findAllReferences === +// === /findAllRefsPrimitiveJsDoc.ts === +// /** +// * @param {[|number|]} n +// * @returns {[|number|]} +// */ +// function f(n: [|number|]): /*FIND ALL REFS*/[|number|] {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrivateNameAccessors.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrivateNameAccessors.baseline.jsonc new file mode 100644 index 0000000000..450a19bbe9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrivateNameAccessors.baseline.jsonc @@ -0,0 +1,136 @@ +// === findAllReferences === +// === /findAllRefsPrivateNameAccessors.ts === +// class C { +// /*FIND ALL REFS*/get #foo(){ return 1; } +// set #foo(value: number){ } +// constructor() { +// this.#foo(); +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /findAllRefsPrivateNameAccessors.ts === +// class C { +// get /*FIND ALL REFS*/[|#foo|](){ return 1; } +// set [|#foo|](value: number){ } +// constructor() { +// this.[|#foo|](); +// } +// } +// class D extends C { +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /findAllRefsPrivateNameAccessors.ts === +// class C { +// get #foo(){ return 1; } +// /*FIND ALL REFS*/set #foo(value: number){ } +// constructor() { +// this.#foo(); +// } +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /findAllRefsPrivateNameAccessors.ts === +// class C { +// get [|#foo|](){ return 1; } +// set /*FIND ALL REFS*/[|#foo|](value: number){ } +// constructor() { +// this.[|#foo|](); +// } +// } +// class D extends C { +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /findAllRefsPrivateNameAccessors.ts === +// class C { +// get [|#foo|](){ return 1; } +// set [|#foo|](value: number){ } +// constructor() { +// this./*FIND ALL REFS*/[|#foo|](); +// } +// } +// class D extends C { +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /findAllRefsPrivateNameAccessors.ts === +// --- (line: 11) skipped --- +// } +// } +// class E { +// /*FIND ALL REFS*/get #foo(){ return 1; } +// set #foo(value: number){ } +// constructor() { +// this.#foo(); +// } +// } + + + +// === findAllReferences === +// === /findAllRefsPrivateNameAccessors.ts === +// --- (line: 11) skipped --- +// } +// } +// class E { +// get /*FIND ALL REFS*/[|#foo|](){ return 1; } +// set [|#foo|](value: number){ } +// constructor() { +// this.[|#foo|](); +// } +// } + + + +// === findAllReferences === +// === /findAllRefsPrivateNameAccessors.ts === +// --- (line: 12) skipped --- +// } +// class E { +// get #foo(){ return 1; } +// /*FIND ALL REFS*/set #foo(value: number){ } +// constructor() { +// this.#foo(); +// } +// } + + + +// === findAllReferences === +// === /findAllRefsPrivateNameAccessors.ts === +// --- (line: 11) skipped --- +// } +// } +// class E { +// get [|#foo|](){ return 1; } +// set /*FIND ALL REFS*/[|#foo|](value: number){ } +// constructor() { +// this.[|#foo|](); +// } +// } + + + +// === findAllReferences === +// === /findAllRefsPrivateNameAccessors.ts === +// --- (line: 11) skipped --- +// } +// } +// class E { +// get [|#foo|](){ return 1; } +// set [|#foo|](value: number){ } +// constructor() { +// this./*FIND ALL REFS*/[|#foo|](); +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrivateNameMethods.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrivateNameMethods.baseline.jsonc new file mode 100644 index 0000000000..b115a88835 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrivateNameMethods.baseline.jsonc @@ -0,0 +1,51 @@ +// === findAllReferences === +// === /findAllRefsPrivateNameMethods.ts === +// class C { +// /*FIND ALL REFS*/[|#foo|](){ } +// constructor() { +// this.[|#foo|](); +// } +// } +// class D extends C { +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /findAllRefsPrivateNameMethods.ts === +// class C { +// [|#foo|](){ } +// constructor() { +// this./*FIND ALL REFS*/[|#foo|](); +// } +// } +// class D extends C { +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /findAllRefsPrivateNameMethods.ts === +// --- (line: 10) skipped --- +// } +// } +// class E { +// /*FIND ALL REFS*/[|#foo|](){ } +// constructor() { +// this.[|#foo|](); +// } +// } + + + +// === findAllReferences === +// === /findAllRefsPrivateNameMethods.ts === +// --- (line: 10) skipped --- +// } +// } +// class E { +// [|#foo|](){ } +// constructor() { +// this./*FIND ALL REFS*/[|#foo|](); +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrivateNameProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrivateNameProperties.baseline.jsonc new file mode 100644 index 0000000000..cbc205cc2d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPrivateNameProperties.baseline.jsonc @@ -0,0 +1,67 @@ +// === findAllReferences === +// === /findAllRefsPrivateNameProperties.ts === +// class C { +// /*FIND ALL REFS*/[|#foo|] = 10; +// constructor() { +// this.[|#foo|] = 20; +// [|#foo|] in this; +// } +// } +// class D extends C { +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /findAllRefsPrivateNameProperties.ts === +// class C { +// [|#foo|] = 10; +// constructor() { +// this./*FIND ALL REFS*/[|#foo|] = 20; +// [|#foo|] in this; +// } +// } +// class D extends C { +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /findAllRefsPrivateNameProperties.ts === +// class C { +// [|#foo|] = 10; +// constructor() { +// this.[|#foo|] = 20; +// /*FIND ALL REFS*/[|#foo|] in this; +// } +// } +// class D extends C { +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /findAllRefsPrivateNameProperties.ts === +// --- (line: 11) skipped --- +// } +// } +// class E { +// /*FIND ALL REFS*/[|#foo|]: number; +// constructor() { +// this.[|#foo|] = 20; +// } +// } + + + +// === findAllReferences === +// === /findAllRefsPrivateNameProperties.ts === +// --- (line: 11) skipped --- +// } +// } +// class E { +// [|#foo|]: number; +// constructor() { +// this./*FIND ALL REFS*/[|#foo|] = 20; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPropertyContextuallyTypedByTypeParam01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPropertyContextuallyTypedByTypeParam01.baseline.jsonc new file mode 100644 index 0000000000..8700a8fdc9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsPropertyContextuallyTypedByTypeParam01.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /findAllRefsPropertyContextuallyTypedByTypeParam01.ts === +// interface IFoo { +// /*FIND ALL REFS*/[|a|]: string; +// } +// class C { +// method() { +// var x: T = { +// [|a|]: "" +// }; +// x.[|a|]; +// } +// } +// +// +// var x: IFoo = { +// [|a|]: "ss" +// }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExport_broken2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExport_broken2.baseline.jsonc new file mode 100644 index 0000000000..6dc48c5a33 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsReExport_broken2.baseline.jsonc @@ -0,0 +1,9 @@ +// === findAllReferences === +// === /a.ts === +// /*FIND ALL REFS*/export { x } from "nonsense"; + + + +// === findAllReferences === +// === /a.ts === +// export { /*FIND ALL REFS*/x } from "nonsense"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsRedeclaredPropertyInDerivedInterface.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsRedeclaredPropertyInDerivedInterface.baseline.jsonc new file mode 100644 index 0000000000..443196f6f9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsRedeclaredPropertyInDerivedInterface.baseline.jsonc @@ -0,0 +1,49 @@ +// === findAllReferences === +// === /findAllRefsRedeclaredPropertyInDerivedInterface.ts === +// interface A { +// readonly /*FIND ALL REFS*/[|x|]: number | string; +// } +// interface B extends A { +// readonly [|x|]: number; +// } +// const a: A = { [|x|]: 0 }; +// const b: B = { [|x|]: 0 }; + + + +// === findAllReferences === +// === /findAllRefsRedeclaredPropertyInDerivedInterface.ts === +// interface A { +// readonly [|x|]: number | string; +// } +// interface B extends A { +// readonly /*FIND ALL REFS*/[|x|]: number; +// } +// const a: A = { [|x|]: 0 }; +// const b: B = { [|x|]: 0 }; + + + +// === findAllReferences === +// === /findAllRefsRedeclaredPropertyInDerivedInterface.ts === +// interface A { +// readonly [|x|]: number | string; +// } +// interface B extends A { +// readonly [|x|]: number; +// } +// const a: A = { /*FIND ALL REFS*/[|x|]: 0 }; +// const b: B = { [|x|]: 0 }; + + + +// === findAllReferences === +// === /findAllRefsRedeclaredPropertyInDerivedInterface.ts === +// interface A { +// readonly [|x|]: number | string; +// } +// interface B extends A { +// readonly [|x|]: number; +// } +// const a: A = { [|x|]: 0 }; +// const b: B = { /*FIND ALL REFS*/[|x|]: 0 }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsRootSymbols.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsRootSymbols.baseline.jsonc new file mode 100644 index 0000000000..68ecb662d8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsRootSymbols.baseline.jsonc @@ -0,0 +1,33 @@ +// === findAllReferences === +// === /findAllRefsRootSymbols.ts === +// interface I { /*FIND ALL REFS*/[|x|]: {}; } +// interface J { x: {}; } +// declare const o: (I | J) & { x: string }; +// o.[|x|]; + + + +// === findAllReferences === +// === /findAllRefsRootSymbols.ts === +// interface I { x: {}; } +// interface J { /*FIND ALL REFS*/[|x|]: {}; } +// declare const o: (I | J) & { x: string }; +// o.[|x|]; + + + +// === findAllReferences === +// === /findAllRefsRootSymbols.ts === +// interface I { x: {}; } +// interface J { x: {}; } +// declare const o: (I | J) & { /*FIND ALL REFS*/[|x|]: string }; +// o.[|x|]; + + + +// === findAllReferences === +// === /findAllRefsRootSymbols.ts === +// interface I { [|x|]: {}; } +// interface J { [|x|]: {}; } +// declare const o: (I | J) & { [|x|]: string }; +// o./*FIND ALL REFS*/[|x|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsThisKeyword.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsThisKeyword.baseline.jsonc new file mode 100644 index 0000000000..f8e13748e3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsThisKeyword.baseline.jsonc @@ -0,0 +1,149 @@ +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// /*FIND ALL REFS*/[|this|]; +// function f(this) { +// return this; +// function g(this) { return this; } +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// this; +// function f(/*FIND ALL REFS*/[|this|]) { +// return [|this|]; +// function g(this) { return this; } +// } +// class C { +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// this; +// function f([|this|]) { +// return /*FIND ALL REFS*/[|this|]; +// function g(this) { return this; } +// } +// class C { +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// this; +// function f(this) { +// return this; +// function g(/*FIND ALL REFS*/[|this|]) { return [|this|]; } +// } +// class C { +// static x() { +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// this; +// function f(this) { +// return this; +// function g([|this|]) { return /*FIND ALL REFS*/[|this|]; } +// } +// class C { +// static x() { +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// --- (line: 4) skipped --- +// } +// class C { +// static x() { +// /*FIND ALL REFS*/[|this|]; +// } +// static y() { +// () => [|this|]; +// } +// constructor() { +// this; +// // --- (line: 15) skipped --- + + + +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// --- (line: 4) skipped --- +// } +// class C { +// static x() { +// [|this|]; +// } +// static y() { +// () => /*FIND ALL REFS*/[|this|]; +// } +// constructor() { +// this; +// // --- (line: 15) skipped --- + + + +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// --- (line: 10) skipped --- +// () => this; +// } +// constructor() { +// /*FIND ALL REFS*/[|this|]; +// } +// method() { +// () => [|this|]; +// } +// } +// // These are *not* real uses of the 'this' keyword, they are identifiers. +// const x = { this: 0 } +// x.this; + + + +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// --- (line: 10) skipped --- +// () => this; +// } +// constructor() { +// [|this|]; +// } +// method() { +// () => /*FIND ALL REFS*/[|this|]; +// } +// } +// // These are *not* real uses of the 'this' keyword, they are identifiers. +// const x = { this: 0 } +// x.this; + + + +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// --- (line: 17) skipped --- +// } +// } +// // These are *not* real uses of the 'this' keyword, they are identifiers. +// const x = { /*FIND ALL REFS*/[|this|]: 0 } +// x.[|this|]; + + + +// === findAllReferences === +// === /findAllRefsThisKeyword.ts === +// --- (line: 17) skipped --- +// } +// } +// // These are *not* real uses of the 'this' keyword, they are identifiers. +// const x = { [|this|]: 0 } +// x./*FIND ALL REFS*/[|this|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsThisKeywordMultipleFiles.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsThisKeywordMultipleFiles.baseline.jsonc new file mode 100644 index 0000000000..1864e0a2c2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsThisKeywordMultipleFiles.baseline.jsonc @@ -0,0 +1,55 @@ +// === findAllReferences === +// === /file1.ts === +// /*FIND ALL REFS*/[|this|]; [|this|]; + + + +// === findAllReferences === +// === /file1.ts === +// [|this|]; /*FIND ALL REFS*/[|this|]; + + + +// === findAllReferences === +// === /file2.ts === +// /*FIND ALL REFS*/[|this|]; +// [|this|]; + + + +// === findAllReferences === +// === /file2.ts === +// [|this|]; +// /*FIND ALL REFS*/[|this|]; + + + +// === findAllReferences === +// === /file3.ts === +// ((x = /*FIND ALL REFS*/[|this|], y) => [|this|])([|this|], [|this|]); +// // different 'this' +// function f(this) { return this; } + + + +// === findAllReferences === +// === /file3.ts === +// ((x = [|this|], y) => /*FIND ALL REFS*/[|this|])([|this|], [|this|]); +// // different 'this' +// function f(this) { return this; } + + + +// === findAllReferences === +// === /file3.ts === +// ((x = [|this|], y) => [|this|])(/*FIND ALL REFS*/[|this|], [|this|]); +// // different 'this' +// function f(this) { return this; } + + + +// === findAllReferences === +// === /file3.ts === +// ((x = [|this|], y) => [|this|])([|this|], /*FIND ALL REFS*/[|this|]); +// // different 'this' +// function f(this) { return this; } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypeParameterInMergedInterface.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypeParameterInMergedInterface.baseline.jsonc new file mode 100644 index 0000000000..2573cb4e41 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypeParameterInMergedInterface.baseline.jsonc @@ -0,0 +1,25 @@ +// === findAllReferences === +// === /findAllRefsTypeParameterInMergedInterface.ts === +// interface I { a: [|T|] } +// interface I<[|T|]> { b: [|T|] } + + + +// === findAllReferences === +// === /findAllRefsTypeParameterInMergedInterface.ts === +// interface I<[|T|]> { a: /*FIND ALL REFS*/[|T|] } +// interface I<[|T|]> { b: [|T|] } + + + +// === findAllReferences === +// === /findAllRefsTypeParameterInMergedInterface.ts === +// interface I<[|T|]> { a: [|T|] } +// interface I { b: [|T|] } + + + +// === findAllReferences === +// === /findAllRefsTypeParameterInMergedInterface.ts === +// interface I<[|T|]> { a: [|T|] } +// interface I<[|T|]> { b: /*FIND ALL REFS*/[|T|] } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypedef.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypedef.baseline.jsonc new file mode 100644 index 0000000000..1065a70060 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypedef.baseline.jsonc @@ -0,0 +1,36 @@ +// === findAllReferences === +// === /a.js === +// /** +// * @typedef I {Object} +// * /*FIND ALL REFS*/@prop p {number} +// */ +// +// /** @type {I} */ +// let x; +// x.p; + + + +// === findAllReferences === +// === /a.js === +// /** +// * @typedef I {Object} +// * @prop /*FIND ALL REFS*/[|p|] {number} +// */ +// +// /** @type {I} */ +// let x; +// x.[|p|]; + + + +// === findAllReferences === +// === /a.js === +// /** +// * @typedef I {Object} +// * @prop [|p|] {number} +// */ +// +// /** @type {I} */ +// let x; +// x./*FIND ALL REFS*/[|p|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypedef_importType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypedef_importType.baseline.jsonc new file mode 100644 index 0000000000..d58e4feb85 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypedef_importType.baseline.jsonc @@ -0,0 +1,24 @@ +// === findAllReferences === +// === /a.js === +// module.exports = 0; +// /** /*FIND ALL REFS*/@typedef {number} Foo */ +// const dummy = 0; + + + +// === findAllReferences === +// === /a.js === +// module.exports = 0; +// /** @typedef {number} /*FIND ALL REFS*/[|Foo|] */ +// const dummy = 0; + +// === /b.js === +// /** @type {import('./a').[|Foo|]} */ +// const x = 0; + + + +// === findAllReferences === +// === /b.js === +// /** @type {import('./a')./*FIND ALL REFS*/Foo} */ +// const x = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypeofImport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypeofImport.baseline.jsonc new file mode 100644 index 0000000000..96b25fccdf --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsTypeofImport.baseline.jsonc @@ -0,0 +1,21 @@ +// === findAllReferences === +// === /a.ts === +// /*FIND ALL REFS*/export const x = 0; +// declare const a: typeof import("./a"); +// a.x; + + + +// === findAllReferences === +// === /a.ts === +// export const /*FIND ALL REFS*/[|x|] = 0; +// declare const a: typeof import("./a"); +// a.[|x|]; + + + +// === findAllReferences === +// === /a.ts === +// export const [|x|] = 0; +// declare const a: typeof import("./a"); +// a./*FIND ALL REFS*/[|x|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnionProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnionProperty.baseline.jsonc new file mode 100644 index 0000000000..7eb77a494a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnionProperty.baseline.jsonc @@ -0,0 +1,150 @@ +// === findAllReferences === +// === /findAllRefsUnionProperty.ts === +// type T = +// | { /*FIND ALL REFS*/[|type|]: "a", prop: number } +// | { [|type|]: "b", prop: string }; +// const tt: T = { +// [|type|]: "a", +// prop: 0, +// }; +// declare const t: T; +// if (t.[|type|] === "a") { +// t.[|type|]; +// } else { +// t.[|type|]; +// } + + + +// === findAllReferences === +// === /findAllRefsUnionProperty.ts === +// type T = +// | { [|type|]: "a", prop: number } +// | { /*FIND ALL REFS*/[|type|]: "b", prop: string }; +// const tt: T = { +// [|type|]: "a", +// prop: 0, +// }; +// declare const t: T; +// if (t.[|type|] === "a") { +// t.[|type|]; +// } else { +// t.[|type|]; +// } + + + +// === findAllReferences === +// === /findAllRefsUnionProperty.ts === +// type T = +// | { [|type|]: "a", prop: number } +// | { [|type|]: "b", prop: string }; +// const tt: T = { +// [|type|]: "a", +// prop: 0, +// }; +// declare const t: T; +// if (t./*FIND ALL REFS*/[|type|] === "a") { +// t.[|type|]; +// } else { +// t.[|type|]; +// } + + + +// === findAllReferences === +// === /findAllRefsUnionProperty.ts === +// type T = +// | { [|type|]: "a", prop: number } +// | { [|type|]: "b", prop: string }; +// const tt: T = { +// [|type|]: "a", +// prop: 0, +// }; +// declare const t: T; +// if (t.[|type|] === "a") { +// t./*FIND ALL REFS*/[|type|]; +// } else { +// t.[|type|]; +// } + + + +// === findAllReferences === +// === /findAllRefsUnionProperty.ts === +// type T = +// | { [|type|]: "a", prop: number } +// | { [|type|]: "b", prop: string }; +// const tt: T = { +// [|type|]: "a", +// prop: 0, +// }; +// declare const t: T; +// if (t.[|type|] === "a") { +// t.[|type|]; +// } else { +// t./*FIND ALL REFS*/[|type|]; +// } + + + +// === findAllReferences === +// === /findAllRefsUnionProperty.ts === +// type T = +// | { [|type|]: "a", prop: number } +// | { type: "b", prop: string }; +// const tt: T = { +// /*FIND ALL REFS*/[|type|]: "a", +// prop: 0, +// }; +// declare const t: T; +// if (t.[|type|] === "a") { +// t.[|type|]; +// } else { +// t.type; +// } + + + +// === findAllReferences === +// === /findAllRefsUnionProperty.ts === +// type T = +// | { type: "a", /*FIND ALL REFS*/[|prop|]: number } +// | { type: "b", [|prop|]: string }; +// const tt: T = { +// type: "a", +// [|prop|]: 0, +// }; +// declare const t: T; +// if (t.type === "a") { +// // --- (line: 10) skipped --- + + + +// === findAllReferences === +// === /findAllRefsUnionProperty.ts === +// type T = +// | { type: "a", [|prop|]: number } +// | { type: "b", /*FIND ALL REFS*/[|prop|]: string }; +// const tt: T = { +// type: "a", +// [|prop|]: 0, +// }; +// declare const t: T; +// if (t.type === "a") { +// // --- (line: 10) skipped --- + + + +// === findAllReferences === +// === /findAllRefsUnionProperty.ts === +// type T = +// | { type: "a", [|prop|]: number } +// | { type: "b", prop: string }; +// const tt: T = { +// type: "a", +// /*FIND ALL REFS*/[|prop|]: 0, +// }; +// declare const t: T; +// if (t.type === "a") { +// // --- (line: 10) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnresolvedSymbols1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnresolvedSymbols1.baseline.jsonc new file mode 100644 index 0000000000..c65b6a9fb7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnresolvedSymbols1.baseline.jsonc @@ -0,0 +1,107 @@ +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols1.ts === +// let a: /*FIND ALL REFS*/[|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: Bar.X; +// let e: Bar.X; +// let f: Bar.X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols1.ts === +// let a: [|Bar|]; +// let b: /*FIND ALL REFS*/[|Bar|]; +// let c: [|Bar|]; +// let d: Bar.X; +// let e: Bar.X; +// let f: Bar.X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols1.ts === +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: /*FIND ALL REFS*/[|Bar|]; +// let d: Bar.X; +// let e: Bar.X; +// let f: Bar.X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols1.ts === +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: /*FIND ALL REFS*/[|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols1.ts === +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: [|Bar|].X; +// let e: /*FIND ALL REFS*/[|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols1.ts === +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: /*FIND ALL REFS*/[|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols1.ts === +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: Bar./*FIND ALL REFS*/[|X|]; +// let e: Bar.[|X|]; +// let f: Bar.X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols1.ts === +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: Bar.[|X|]; +// let e: Bar./*FIND ALL REFS*/[|X|]; +// let f: Bar.X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols1.ts === +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: Bar.X; +// let e: Bar.X; +// let f: Bar./*FIND ALL REFS*/[|X|].Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols1.ts === +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: Bar.X; +// let e: Bar.X; +// let f: Bar.X./*FIND ALL REFS*/[|Y|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnresolvedSymbols2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnresolvedSymbols2.baseline.jsonc new file mode 100644 index 0000000000..d542f719cd --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnresolvedSymbols2.baseline.jsonc @@ -0,0 +1,134 @@ +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// import { /*FIND ALL REFS*/[|Bar|] } from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// import { [|Bar|] } from "does-not-exist"; +// +// let a: /*FIND ALL REFS*/[|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// import { [|Bar|] } from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: /*FIND ALL REFS*/[|Bar|]; +// let c: [|Bar|]; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// import { [|Bar|] } from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: /*FIND ALL REFS*/[|Bar|]; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// import { [|Bar|] } from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: /*FIND ALL REFS*/[|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// import { [|Bar|] } from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: [|Bar|].X; +// let e: /*FIND ALL REFS*/[|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// import { [|Bar|] } from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: /*FIND ALL REFS*/[|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// import { Bar } from "does-not-exist"; +// +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: Bar./*FIND ALL REFS*/[|X|]; +// let e: Bar.[|X|]; +// let f: Bar.X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// import { Bar } from "does-not-exist"; +// +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: Bar.[|X|]; +// let e: Bar./*FIND ALL REFS*/[|X|]; +// let f: Bar.X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// --- (line: 4) skipped --- +// let c: Bar; +// let d: Bar.X; +// let e: Bar.X; +// let f: Bar./*FIND ALL REFS*/[|X|].Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols2.ts === +// --- (line: 4) skipped --- +// let c: Bar; +// let d: Bar.X; +// let e: Bar.X; +// let f: Bar.X./*FIND ALL REFS*/[|Y|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnresolvedSymbols3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnresolvedSymbols3.baseline.jsonc new file mode 100644 index 0000000000..890fd6f9b0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsUnresolvedSymbols3.baseline.jsonc @@ -0,0 +1,134 @@ +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// import * as /*FIND ALL REFS*/[|Bar|] from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// import * as [|Bar|] from "does-not-exist"; +// +// let a: /*FIND ALL REFS*/[|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// import * as [|Bar|] from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: /*FIND ALL REFS*/[|Bar|]; +// let c: [|Bar|]; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// import * as [|Bar|] from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: /*FIND ALL REFS*/[|Bar|]; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// import * as [|Bar|] from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: /*FIND ALL REFS*/[|Bar|].X; +// let e: [|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// import * as [|Bar|] from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: [|Bar|].X; +// let e: /*FIND ALL REFS*/[|Bar|].X; +// let f: [|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// import * as [|Bar|] from "does-not-exist"; +// +// let a: [|Bar|]; +// let b: [|Bar|]; +// let c: [|Bar|]; +// let d: [|Bar|].X; +// let e: [|Bar|].X; +// let f: /*FIND ALL REFS*/[|Bar|].X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// import * as Bar from "does-not-exist"; +// +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: Bar./*FIND ALL REFS*/[|X|]; +// let e: Bar.[|X|]; +// let f: Bar.X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// import * as Bar from "does-not-exist"; +// +// let a: Bar; +// let b: Bar; +// let c: Bar; +// let d: Bar.[|X|]; +// let e: Bar./*FIND ALL REFS*/[|X|]; +// let f: Bar.X.Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// --- (line: 4) skipped --- +// let c: Bar; +// let d: Bar.X; +// let e: Bar.X; +// let f: Bar./*FIND ALL REFS*/[|X|].Y; + + + +// === findAllReferences === +// === /findAllRefsUnresolvedSymbols3.ts === +// --- (line: 4) skipped --- +// let c: Bar; +// let d: Bar.X; +// let e: Bar.X; +// let f: Bar.X./*FIND ALL REFS*/[|Y|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames1.baseline.jsonc new file mode 100644 index 0000000000..275b2415e7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames1.baseline.jsonc @@ -0,0 +1,30 @@ +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames1.ts === +// class Foo { +// /*FIND ALL REFS*/public _bar() { return 0; } +// } +// +// var x: Foo; +// x._bar; + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames1.ts === +// class Foo { +// public /*FIND ALL REFS*/[|_bar|]() { return 0; } +// } +// +// var x: Foo; +// x.[|_bar|]; + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames1.ts === +// class Foo { +// public [|_bar|]() { return 0; } +// } +// +// var x: Foo; +// x./*FIND ALL REFS*/[|_bar|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames2.baseline.jsonc new file mode 100644 index 0000000000..0627485bd8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames2.baseline.jsonc @@ -0,0 +1,30 @@ +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames2.ts === +// class Foo { +// /*FIND ALL REFS*/public __bar() { return 0; } +// } +// +// var x: Foo; +// x.__bar; + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames2.ts === +// class Foo { +// public /*FIND ALL REFS*/[|__bar|]() { return 0; } +// } +// +// var x: Foo; +// x.[|__bar|]; + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames2.ts === +// class Foo { +// public [|__bar|]() { return 0; } +// } +// +// var x: Foo; +// x./*FIND ALL REFS*/[|__bar|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames3.baseline.jsonc new file mode 100644 index 0000000000..ba2b00295d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames3.baseline.jsonc @@ -0,0 +1,30 @@ +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames3.ts === +// class Foo { +// /*FIND ALL REFS*/public ___bar() { return 0; } +// } +// +// var x: Foo; +// x.___bar; + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames3.ts === +// class Foo { +// public /*FIND ALL REFS*/[|___bar|]() { return 0; } +// } +// +// var x: Foo; +// x.[|___bar|]; + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames3.ts === +// class Foo { +// public [|___bar|]() { return 0; } +// } +// +// var x: Foo; +// x./*FIND ALL REFS*/[|___bar|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames4.baseline.jsonc new file mode 100644 index 0000000000..4c995ceb99 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames4.baseline.jsonc @@ -0,0 +1,30 @@ +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames4.ts === +// class Foo { +// /*FIND ALL REFS*/public ____bar() { return 0; } +// } +// +// var x: Foo; +// x.____bar; + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames4.ts === +// class Foo { +// public /*FIND ALL REFS*/[|____bar|]() { return 0; } +// } +// +// var x: Foo; +// x.[|____bar|]; + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames4.ts === +// class Foo { +// public [|____bar|]() { return 0; } +// } +// +// var x: Foo; +// x./*FIND ALL REFS*/[|____bar|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames5.baseline.jsonc new file mode 100644 index 0000000000..68b9058871 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames5.baseline.jsonc @@ -0,0 +1,44 @@ +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames5.ts === +// class Foo { +// public _bar; +// public __bar; +// /*FIND ALL REFS*/public ___bar; +// public ____bar; +// } +// +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames5.ts === +// class Foo { +// public _bar; +// public __bar; +// public /*FIND ALL REFS*/[|___bar|]; +// public ____bar; +// } +// +// var x: Foo; +// x._bar; +// x.__bar; +// x.[|___bar|]; +// x.____bar; + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames5.ts === +// class Foo { +// public _bar; +// public __bar; +// public [|___bar|]; +// public ____bar; +// } +// +// var x: Foo; +// x._bar; +// x.__bar; +// x./*FIND ALL REFS*/[|___bar|]; +// x.____bar; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames6.baseline.jsonc new file mode 100644 index 0000000000..5cea661dd5 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames6.baseline.jsonc @@ -0,0 +1,43 @@ +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames6.ts === +// class Foo { +// public _bar; +// /*FIND ALL REFS*/public __bar; +// public ___bar; +// public ____bar; +// } +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames6.ts === +// class Foo { +// public _bar; +// public /*FIND ALL REFS*/[|__bar|]; +// public ___bar; +// public ____bar; +// } +// +// var x: Foo; +// x._bar; +// x.[|__bar|]; +// x.___bar; +// x.____bar; + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames6.ts === +// class Foo { +// public _bar; +// public [|__bar|]; +// public ___bar; +// public ____bar; +// } +// +// var x: Foo; +// x._bar; +// x./*FIND ALL REFS*/[|__bar|]; +// x.___bar; +// x.____bar; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames7.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames7.baseline.jsonc new file mode 100644 index 0000000000..761a4899a3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames7.baseline.jsonc @@ -0,0 +1,21 @@ +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames7.ts === +// /*FIND ALL REFS*/function __foo() { +// __foo(); +// } + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames7.ts === +// function /*FIND ALL REFS*/[|__foo|]() { +// [|__foo|](); +// } + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames7.ts === +// function [|__foo|]() { +// /*FIND ALL REFS*/[|__foo|](); +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames8.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames8.baseline.jsonc new file mode 100644 index 0000000000..16510e0f5b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames8.baseline.jsonc @@ -0,0 +1,21 @@ +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames8.ts === +// (/*FIND ALL REFS*/function __foo() { +// __foo(); +// }) + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames8.ts === +// (function /*FIND ALL REFS*/__foo() { +// [|__foo|](); +// }) + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames8.ts === +// (function __foo() { +// /*FIND ALL REFS*/[|__foo|](); +// }) \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames9.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames9.baseline.jsonc new file mode 100644 index 0000000000..099cdfee54 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithLeadingUnderscoreNames9.baseline.jsonc @@ -0,0 +1,21 @@ +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames9.ts === +// (/*FIND ALL REFS*/function ___foo() { +// ___foo(); +// }) + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames9.ts === +// (function /*FIND ALL REFS*/___foo() { +// [|___foo|](); +// }) + + + +// === findAllReferences === +// === /findAllRefsWithLeadingUnderscoreNames9.ts === +// (function ___foo() { +// /*FIND ALL REFS*/[|___foo|](); +// }) \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithShorthandPropertyAssignment.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithShorthandPropertyAssignment.baseline.jsonc new file mode 100644 index 0000000000..1666c1f148 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithShorthandPropertyAssignment.baseline.jsonc @@ -0,0 +1,47 @@ +// === findAllReferences === +// === /findAllRefsWithShorthandPropertyAssignment.ts === +// var /*FIND ALL REFS*/[|name|] = "Foo"; +// +// var obj = { name }; +// var obj1 = { name: name }; +// obj.name; + + + +// === findAllReferences === +// === /findAllRefsWithShorthandPropertyAssignment.ts === +// var name = "Foo"; +// +// var obj = { [|name|] }; +// var obj1 = { name: /*FIND ALL REFS*/[|name|] }; +// obj.name; + + + +// === findAllReferences === +// === /findAllRefsWithShorthandPropertyAssignment.ts === +// var name = "Foo"; +// +// var obj = { /*FIND ALL REFS*/[|name|] }; +// var obj1 = { name: [|name|] }; +// obj.[|name|]; + + + +// === findAllReferences === +// === /findAllRefsWithShorthandPropertyAssignment.ts === +// var name = "Foo"; +// +// var obj = { name }; +// var obj1 = { /*FIND ALL REFS*/[|name|]: name }; +// obj.name; + + + +// === findAllReferences === +// === /findAllRefsWithShorthandPropertyAssignment.ts === +// var name = "Foo"; +// +// var obj = { [|name|] }; +// var obj1 = { name: name }; +// obj./*FIND ALL REFS*/[|name|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithShorthandPropertyAssignment2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithShorthandPropertyAssignment2.baseline.jsonc new file mode 100644 index 0000000000..4aa27d262c --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWithShorthandPropertyAssignment2.baseline.jsonc @@ -0,0 +1,46 @@ +// === findAllReferences === +// === /findAllRefsWithShorthandPropertyAssignment2.ts === +// var /*FIND ALL REFS*/[|dx|] = "Foo"; +// +// module M { export var dx; } +// module M { +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /findAllRefsWithShorthandPropertyAssignment2.ts === +// var dx = "Foo"; +// +// module M { export var /*FIND ALL REFS*/[|dx|]; } +// module M { +// var z = 100; +// export var y = { [|dx|], z }; +// } +// M.y.dx; + + + +// === findAllReferences === +// === /findAllRefsWithShorthandPropertyAssignment2.ts === +// var dx = "Foo"; +// +// module M { export var [|dx|]; } +// module M { +// var z = 100; +// export var y = { /*FIND ALL REFS*/[|dx|], z }; +// } +// M.y.[|dx|]; + + + +// === findAllReferences === +// === /findAllRefsWithShorthandPropertyAssignment2.ts === +// var dx = "Foo"; +// +// module M { export var dx; } +// module M { +// var z = 100; +// export var y = { [|dx|], z }; +// } +// M.y./*FIND ALL REFS*/[|dx|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWriteAccess.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWriteAccess.baseline.jsonc new file mode 100644 index 0000000000..23ff101c44 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefsWriteAccess.baseline.jsonc @@ -0,0 +1,19 @@ +// === findAllReferences === +// === /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|]`]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_importType_js4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_importType_js4.baseline.jsonc new file mode 100644 index 0000000000..a59140e4ff --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_importType_js4.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /a.js === +// /** +// * @callback /*FIND ALL REFS*/[|A|] +// * @param {unknown} response +// */ +// +// module.exports = {}; + +// === /b.js === +// /** @typedef {import("./a").[|A|]} A */ \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_importType_meaningAtLocation.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_importType_meaningAtLocation.baseline.jsonc new file mode 100644 index 0000000000..41f5903eec --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_importType_meaningAtLocation.baseline.jsonc @@ -0,0 +1,55 @@ +// === findAllReferences === +// === /a.ts === +// /*FIND ALL REFS*/export type T = 0; +// export const T = 0; + + + +// === findAllReferences === +// === /a.ts === +// export type /*FIND ALL REFS*/[|T|] = 0; +// export const T = 0; + +// === /b.ts === +// const x: import("./a").[|T|] = 0; +// const x: typeof import("./a").T = 0; + + + +// === findAllReferences === +// === /a.ts === +// export type T = 0; +// /*FIND ALL REFS*/export const T = 0; + + + +// === findAllReferences === +// === /a.ts === +// export type T = 0; +// export const /*FIND ALL REFS*/[|T|] = 0; + +// === /b.ts === +// const x: import("./a").T = 0; +// const x: typeof import("./a").[|T|] = 0; + + + +// === findAllReferences === +// === /a.ts === +// export type [|T|] = 0; +// export const T = 0; + +// === /b.ts === +// const x: import("./a")./*FIND ALL REFS*/[|T|] = 0; +// const x: typeof import("./a").T = 0; + + + +// === findAllReferences === +// === /a.ts === +// export type T = 0; +// export const [|T|] = 0; + +// === /b.ts === +// const x: import("./a").T = 0; +// const x: typeof import("./a")./*FIND ALL REFS*/[|T|] = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_importType_named.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_importType_named.baseline.jsonc new file mode 100644 index 0000000000..55c3e1d76c --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_importType_named.baseline.jsonc @@ -0,0 +1,55 @@ +// === findAllReferences === +// === /a.ts === +// /*FIND ALL REFS*/export type T = number; +// export type U = string; + + + +// === findAllReferences === +// === /a.ts === +// export type /*FIND ALL REFS*/[|T|] = number; +// export type U = string; + +// === /b.ts === +// const x: import("./a").[|T|] = 0; +// const x: import("./a").U = 0; + + + +// === findAllReferences === +// === /a.ts === +// export type T = number; +// /*FIND ALL REFS*/export type U = string; + + + +// === findAllReferences === +// === /a.ts === +// export type T = number; +// export type /*FIND ALL REFS*/[|U|] = string; + +// === /b.ts === +// const x: import("./a").T = 0; +// const x: import("./a").[|U|] = 0; + + + +// === findAllReferences === +// === /a.ts === +// export type [|T|] = number; +// export type U = string; + +// === /b.ts === +// const x: import("./a")./*FIND ALL REFS*/[|T|] = 0; +// const x: import("./a").U = 0; + + + +// === findAllReferences === +// === /a.ts === +// export type T = number; +// export type [|U|] = string; + +// === /b.ts === +// const x: import("./a").T = 0; +// const x: import("./a")./*FIND ALL REFS*/[|U|] = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_jsEnum.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_jsEnum.baseline.jsonc new file mode 100644 index 0000000000..14c23a2f5f --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findAllRefs_jsEnum.baseline.jsonc @@ -0,0 +1,47 @@ +// === findAllReferences === +// === /a.js === +// /** @enum {string} */ +// /*FIND ALL REFS*/const E = { A: "" }; +// E["A"]; +// /** @type {E} */ +// const e = E.A; + + + +// === findAllReferences === +// === /a.js === +// /** @enum {string} */ +// const /*FIND ALL REFS*/[|E|] = { A: "" }; +// [|E|]["A"]; +// /** @type {E} */ +// const e = [|E|].A; + + + +// === findAllReferences === +// === /a.js === +// /** @enum {string} */ +// const [|E|] = { A: "" }; +// /*FIND ALL REFS*/[|E|]["A"]; +// /** @type {E} */ +// const e = [|E|].A; + + + +// === findAllReferences === +// === /a.js === +// /** @enum {string} */ +// const E = { A: "" }; +// E["A"]; +// /** @type {/*FIND ALL REFS*/[|E|]} */ +// const e = E.A; + + + +// === findAllReferences === +// === /a.js === +// /** @enum {string} */ +// const [|E|] = { A: "" }; +// [|E|]["A"]; +// /** @type {E} */ +// const e = /*FIND ALL REFS*/[|E|].A; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findReferencesAcrossMultipleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesAcrossMultipleProjects.baseline.jsonc new file mode 100644 index 0000000000..ec494e6888 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesAcrossMultipleProjects.baseline.jsonc @@ -0,0 +1,45 @@ +// === findAllReferences === +// === /a.ts === +// /*FIND ALL REFS*/var x: number; + + + +// === findAllReferences === +// === /a.ts === +// var /*FIND ALL REFS*/[|x|]: number; + +// === /b.ts === +// /// +// [|x|]++; + +// === /c.ts === +// /// +// [|x|]++; + + + +// === findAllReferences === +// === /a.ts === +// var [|x|]: number; + +// === /b.ts === +// /// +// /*FIND ALL REFS*/[|x|]++; + +// === /c.ts === +// /// +// [|x|]++; + + + +// === findAllReferences === +// === /a.ts === +// var [|x|]: number; + +// === /b.ts === +// /// +// [|x|]++; + +// === /c.ts === +// /// +// /*FIND ALL REFS*/[|x|]++; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findReferencesDefinitionDisplayParts.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesDefinitionDisplayParts.baseline.jsonc new file mode 100644 index 0000000000..01bbfdfb3a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesDefinitionDisplayParts.baseline.jsonc @@ -0,0 +1,43 @@ +// === findAllReferences === +// === /findReferencesDefinitionDisplayParts.ts === +// class [|Gre/*FIND ALL REFS*/eter|] { +// someFunction() { this; } +// } +// +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /findReferencesDefinitionDisplayParts.ts === +// class Greeter { +// someFunction() { [|th/*FIND ALL REFS*/is|]; } +// } +// +// type Options = "option 1" | "option 2"; +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /findReferencesDefinitionDisplayParts.ts === +// class Greeter { +// someFunction() { this; } +// } +// +// type Options = "opt/*FIND ALL REFS*/ion 1" | "option 2"; +// let myOption: Options = "option 1"; +// +// someLabel: +// break someLabel; + + + +// === findAllReferences === +// === /findReferencesDefinitionDisplayParts.ts === +// --- (line: 4) skipped --- +// type Options = "option 1" | "option 2"; +// let myOption: Options = "option 1"; +// +// [|some/*FIND ALL REFS*/Label|]: +// break [|someLabel|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc new file mode 100644 index 0000000000..b0d90630ef --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName.baseline.jsonc @@ -0,0 +1,25 @@ +// === findAllReferences === +// === /RedditSubmission.ts === +// export const [|SubmissionComp|] = (submission: SubmissionProps) => +//
; + +// === /index.tsx === +// import { /*FIND ALL REFS*/[|SubmissionComp|] } from "./RedditSubmission" +// function displaySubreddit(subreddit: string) { +// let components = submissions +// .map((value, index) => <[|SubmissionComp|] key={ index } elementPosition= { index } {...value.data} />); +// } + + + +// === findAllReferences === +// === /RedditSubmission.ts === +// export const /*FIND ALL REFS*/[|SubmissionComp|] = (submission: SubmissionProps) => +//
; + +// === /index.tsx === +// import { [|SubmissionComp|] } from "./RedditSubmission" +// function displaySubreddit(subreddit: string) { +// let components = submissions +// .map((value, index) => <[|SubmissionComp|] key={ index } elementPosition= { index } {...value.data} />); +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName2.baseline.jsonc new file mode 100644 index 0000000000..a3b65b722a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesJSXTagName2.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /index.tsx === +// /*FIND ALL REFS*/const obj = {Component: () =>
}; +// const element = ; + + + +// === findAllReferences === +// === /index.tsx === +// const /*FIND ALL REFS*/[|obj|] = {Component: () =>
}; +// const element = <[|obj|].Component/>; + + + +// === findAllReferences === +// === /index.tsx === +// const [|obj|] = {Component: () =>
}; +// const element = ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/findReferencesSeeTagInTs.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesSeeTagInTs.baseline.jsonc new file mode 100644 index 0000000000..1c1a1e53e5 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/findReferencesSeeTagInTs.baseline.jsonc @@ -0,0 +1,7 @@ +// === findAllReferences === +// === /findReferencesSeeTagInTs.ts === +// function [|doStuffWithStuff|]/*FIND ALL REFS*/(stuff: { quantity: number }) {} +// +// declare const stuff: { quantity: number }; +// /** @see {[|doStuffWithStuff|]} */ +// if (stuff.quantity) {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/fourslash/findAllReferencesDynamicImport2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/fourslash/findAllReferencesDynamicImport2.baseline.jsonc new file mode 100644 index 0000000000..33d82f72a8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/fourslash/findAllReferencesDynamicImport2.baseline.jsonc @@ -0,0 +1,20 @@ +// === findAllReferences === +// === /foo.ts === + +// export function /*FIND ALL REFS*/[|bar|]() { return "bar"; } +// var x = import("./foo"); +// x.then(foo => { +// foo.[|bar|](); +// }) + + + + +// === findAllReferences === +// === /foo.ts === + +// export function [|bar|]() { return "bar"; } +// var x = import("./foo"); +// x.then(foo => { +// foo./*FIND ALL REFS*/[|bar|](); +// }) diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfArrowFunction.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfArrowFunction.baseline.jsonc new file mode 100644 index 0000000000..d47a9cd615 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfArrowFunction.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfArrowFunction.ts === +// /*FIND ALL REFS*/var f = x => x + 1; +// f(12); + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfArrowFunction.ts === +// var /*FIND ALL REFS*/[|f|] = x => x + 1; +// [|f|](12); + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfArrowFunction.ts === +// var [|f|] = x => x + 1; +// /*FIND ALL REFS*/[|f|](12); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfBindingPattern.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfBindingPattern.baseline.jsonc new file mode 100644 index 0000000000..7b39ee9210 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfBindingPattern.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfBindingPattern.ts === +// const { /*FIND ALL REFS*/[|x|], y } = { [|x|]: 1, y: 2 }; +// const z = [|x|]; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfBindingPattern.ts === +// const { [|x|], y } = { /*FIND ALL REFS*/[|x|]: 1, y: 2 }; +// const z = x; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfBindingPattern.ts === +// const { [|x|], y } = { x: 1, y: 2 }; +// const z = /*FIND ALL REFS*/[|x|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfClass.baseline.jsonc new file mode 100644 index 0000000000..66aa26aa9b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfClass.baseline.jsonc @@ -0,0 +1,31 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfClass.ts === +// /*FIND ALL REFS*/class C { +// n: number; +// constructor() { +// this.n = 12; +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfClass.ts === +// class /*FIND ALL REFS*/[|C|] { +// n: number; +// constructor() { +// this.n = 12; +// } +// } +// let c = new [|C|](); + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfClass.ts === +// class [|C|] { +// n: number; +// constructor() { +// this.n = 12; +// } +// } +// let c = new /*FIND ALL REFS*/[|C|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfComputedProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfComputedProperty.baseline.jsonc new file mode 100644 index 0000000000..01ccd7b8dc --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfComputedProperty.baseline.jsonc @@ -0,0 +1,29 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfComputedProperty.ts === +// let o = { /*FIND ALL REFS*/["foo"]: 12 }; +// let y = o.foo; +// let z = o['foo']; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfComputedProperty.ts === +// let o = { ["/*FIND ALL REFS*/[|foo|]"]: 12 }; +// let y = o.[|foo|]; +// let z = o['[|foo|]']; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfComputedProperty.ts === +// let o = { ["[|foo|]"]: 12 }; +// let y = o./*FIND ALL REFS*/[|foo|]; +// let z = o['[|foo|]']; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfComputedProperty.ts === +// let o = { ["[|foo|]"]: 12 }; +// let y = o.[|foo|]; +// let z = o['/*FIND ALL REFS*/[|foo|]']; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfEnum.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfEnum.baseline.jsonc new file mode 100644 index 0000000000..e0b28c98c1 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfEnum.baseline.jsonc @@ -0,0 +1,27 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfEnum.ts === +// /*FIND ALL REFS*/enum E { +// First, +// Second +// } +// let first = E.First; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfEnum.ts === +// enum /*FIND ALL REFS*/[|E|] { +// First, +// Second +// } +// let first = [|E|].First; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfEnum.ts === +// enum [|E|] { +// First, +// Second +// } +// let first = /*FIND ALL REFS*/[|E|].First; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc new file mode 100644 index 0000000000..75f7ea71d1 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfExport.baseline.jsonc @@ -0,0 +1,17 @@ +// === findAllReferences === +// === /m.ts === +// export var /*FIND ALL REFS*/[|x|] = 12; + +// === /main.ts === +// import { [|x|] } from "./m"; +// const y = [|x|]; + + + +// === findAllReferences === +// === /m.ts === +// export var [|x|] = 12; + +// === /main.ts === +// import { /*FIND ALL REFS*/[|x|] } from "./m"; +// const y = [|x|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfFunction.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfFunction.baseline.jsonc new file mode 100644 index 0000000000..93a9afb726 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfFunction.baseline.jsonc @@ -0,0 +1,21 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfFunction.ts === +// /*FIND ALL REFS*/function func(x: number) { +// } +// func(x) + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfFunction.ts === +// function /*FIND ALL REFS*/[|func|](x: number) { +// } +// [|func|](x) + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfFunction.ts === +// function [|func|](x: number) { +// } +// /*FIND ALL REFS*/[|func|](x) \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfInterface.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfInterface.baseline.jsonc new file mode 100644 index 0000000000..1d3cb221db --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfInterface.baseline.jsonc @@ -0,0 +1,24 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterface.ts === +// /*FIND ALL REFS*/interface I { +// p: number; +// } +// let i: I = { p: 12 }; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterface.ts === +// interface /*FIND ALL REFS*/[|I|] { +// p: number; +// } +// let i: [|I|] = { p: 12 }; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterface.ts === +// interface [|I|] { +// p: number; +// } +// let i: /*FIND ALL REFS*/[|I|] = { p: 12 }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfInterfaceClassMerge.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfInterfaceClassMerge.baseline.jsonc new file mode 100644 index 0000000000..0482d27845 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfInterfaceClassMerge.baseline.jsonc @@ -0,0 +1,124 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === +// /*FIND ALL REFS*/interface Numbers { +// p: number; +// } +// interface Numbers { +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === +// interface /*FIND ALL REFS*/[|Numbers|] { +// p: number; +// } +// interface [|Numbers|] { +// m: number; +// } +// class [|Numbers|] { +// f(n: number) { +// return this.p + this.m + n; +// } +// } +// let i: [|Numbers|] = new [|Numbers|](); +// let x = i.f(i.p + i.m); + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === +// interface Numbers { +// p: number; +// } +// /*FIND ALL REFS*/interface Numbers { +// m: number; +// } +// class Numbers { +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === +// interface [|Numbers|] { +// p: number; +// } +// interface /*FIND ALL REFS*/[|Numbers|] { +// m: number; +// } +// class [|Numbers|] { +// f(n: number) { +// return this.p + this.m + n; +// } +// } +// let i: [|Numbers|] = new [|Numbers|](); +// let x = i.f(i.p + i.m); + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === +// --- (line: 3) skipped --- +// interface Numbers { +// m: number; +// } +// /*FIND ALL REFS*/class Numbers { +// f(n: number) { +// return this.p + this.m + n; +// } +// // --- (line: 11) skipped --- + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === +// interface [|Numbers|] { +// p: number; +// } +// interface [|Numbers|] { +// m: number; +// } +// class /*FIND ALL REFS*/[|Numbers|] { +// f(n: number) { +// return this.p + this.m + n; +// } +// } +// let i: [|Numbers|] = new [|Numbers|](); +// let x = i.f(i.p + i.m); + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === +// interface [|Numbers|] { +// p: number; +// } +// interface [|Numbers|] { +// m: number; +// } +// class [|Numbers|] { +// f(n: number) { +// return this.p + this.m + n; +// } +// } +// let i: /*FIND ALL REFS*/[|Numbers|] = new [|Numbers|](); +// let x = i.f(i.p + i.m); + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfInterfaceClassMerge.ts === +// interface [|Numbers|] { +// p: number; +// } +// interface [|Numbers|] { +// m: number; +// } +// class [|Numbers|] { +// f(n: number) { +// return this.p + this.m + n; +// } +// } +// let i: [|Numbers|] = new /*FIND ALL REFS*/[|Numbers|](); +// let x = i.f(i.p + i.m); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfNamespace.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfNamespace.baseline.jsonc new file mode 100644 index 0000000000..bba65c8c91 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfNamespace.baseline.jsonc @@ -0,0 +1,24 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfNamespace.ts === +// /*FIND ALL REFS*/namespace Numbers { +// export var n = 12; +// } +// let x = Numbers.n + 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfNamespace.ts === +// namespace /*FIND ALL REFS*/[|Numbers|] { +// export var n = 12; +// } +// let x = [|Numbers|].n + 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfNamespace.ts === +// namespace [|Numbers|] { +// export var n = 12; +// } +// let x = /*FIND ALL REFS*/[|Numbers|].n + 1; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfNumberNamedProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfNumberNamedProperty.baseline.jsonc new file mode 100644 index 0000000000..4c7d71532e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfNumberNamedProperty.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfNumberNamedProperty.ts === +// let o = { /*FIND ALL REFS*/[|1|]: 12 }; +// let y = o[[|1|]]; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfNumberNamedProperty.ts === +// let o = { [|1|]: 12 }; +// let y = o[/*FIND ALL REFS*/[|1|]]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfParameter.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfParameter.baseline.jsonc new file mode 100644 index 0000000000..311de56bc8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfParameter.baseline.jsonc @@ -0,0 +1,13 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfParameter.ts === +// function f(/*FIND ALL REFS*/[|x|]: number) { +// return [|x|] + 1 +// } + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfParameter.ts === +// function f([|x|]: number) { +// return /*FIND ALL REFS*/[|x|] + 1 +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfStringNamedProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfStringNamedProperty.baseline.jsonc new file mode 100644 index 0000000000..76d23e15de --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfStringNamedProperty.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfStringNamedProperty.ts === +// let o = { /*FIND ALL REFS*/"[|x|]": 12 }; +// let y = o.[|x|]; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfStringNamedProperty.ts === +// let o = { "/*FIND ALL REFS*/[|x|]": 12 }; +// let y = o.[|x|]; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfStringNamedProperty.ts === +// let o = { "[|x|]": 12 }; +// let y = o./*FIND ALL REFS*/[|x|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfTypeAlias.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfTypeAlias.baseline.jsonc new file mode 100644 index 0000000000..588c2d0769 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfTypeAlias.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfTypeAlias.ts === +// /*FIND ALL REFS*/type Alias= number; +// let n: Alias = 12; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfTypeAlias.ts === +// type /*FIND ALL REFS*/[|Alias|]= number; +// let n: [|Alias|] = 12; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfTypeAlias.ts === +// type [|Alias|]= number; +// let n: /*FIND ALL REFS*/[|Alias|] = 12; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfVariable.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfVariable.baseline.jsonc new file mode 100644 index 0000000000..3e18059318 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/getOccurrencesIsDefinitionOfVariable.baseline.jsonc @@ -0,0 +1,337 @@ +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// /*FIND ALL REFS*/var x = 0; +// var assignmentRightHandSide = x; +// var assignmentRightHandSide2 = 1 + x; +// +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var /*FIND ALL REFS*/[|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = /*FIND ALL REFS*/[|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + /*FIND ALL REFS*/[|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// /*FIND ALL REFS*/[|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// /*FIND ALL REFS*/[|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = /*FIND ALL REFS*/[|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + /*FIND ALL REFS*/[|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// /*FIND ALL REFS*/[|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// /*FIND ALL REFS*/[|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++/*FIND ALL REFS*/[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = /*FIND ALL REFS*/[|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --/*FIND ALL REFS*/[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = /*FIND ALL REFS*/[|x|]--; +// +// [|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// /*FIND ALL REFS*/[|x|] += 1; +// [|x|] <<= 1; + + + +// === findAllReferences === +// === /getOccurrencesIsDefinitionOfVariable.ts === +// var [|x|] = 0; +// var assignmentRightHandSide = [|x|]; +// var assignmentRightHandSide2 = 1 + [|x|]; +// +// [|x|] = 1; +// [|x|] = [|x|] + [|x|]; +// +// [|x|] == 1; +// [|x|] <= 1; +// +// var preIncrement = ++[|x|]; +// var postIncrement = [|x|]++; +// var preDecrement = --[|x|]; +// var postDecrement = [|x|]--; +// +// [|x|] += 1; +// /*FIND ALL REFS*/[|x|] <<= 1; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/indirectJsRequireRename.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/indirectJsRequireRename.baseline.jsonc new file mode 100644 index 0000000000..fc53c36f09 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/indirectJsRequireRename.baseline.jsonc @@ -0,0 +1,6 @@ +// === findAllReferences === +// === /lib/classes/Error.js === +// module.exports.[|logWarning|] = message => { }; + +// === /bin/serverless.js === +// require('../lib/classes/Error').log/*FIND ALL REFS*/Warning(`CLI triage crashed with: ${error.stack}`); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionAcrossGlobalProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionAcrossGlobalProjects.baseline.jsonc new file mode 100644 index 0000000000..d97e39c38f --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionAcrossGlobalProjects.baseline.jsonc @@ -0,0 +1,121 @@ +// === findAllReferences === +// === /home/src/workspaces/project/a/index.ts === +// namespace NS { +// export function /*FIND ALL REFS*/[|FA|]() { +// FB(); +// } +// } +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /home/src/workspaces/project/a/index.ts === +// --- (line: 3) skipped --- +// } +// } +// +// interface /*FIND ALL REFS*/[|I|] { +// FA(); +// } +// +// const ia: [|I|] = { +// FA() { }, +// FB() { }, +// FC() { }, +// }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/a/index.ts === +// --- (line: 4) skipped --- +// } +// +// interface I { +// /*FIND ALL REFS*/[|FA|](); +// } +// +// const ia: I = { +// [|FA|]() { }, +// FB() { }, +// FC() { }, +// }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/b/index.ts === +// namespace NS { +// export function /*FIND ALL REFS*/[|FB|]() {} +// } +// +// interface I { +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /home/src/workspaces/project/b/index.ts === +// namespace NS { +// export function FB() {} +// } +// +// interface /*FIND ALL REFS*/[|I|] { +// FB(); +// } +// +// const ib: [|I|] = { FB() {} }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/b/index.ts === +// namespace NS { +// export function FB() {} +// } +// +// interface I { +// /*FIND ALL REFS*/[|FB|](); +// } +// +// const ib: I = { [|FB|]() {} }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/c/index.ts === +// namespace NS { +// export function /*FIND ALL REFS*/[|FC|]() {} +// } +// +// interface I { +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /home/src/workspaces/project/c/index.ts === +// namespace NS { +// export function FC() {} +// } +// +// interface /*FIND ALL REFS*/[|I|] { +// FC(); +// } +// +// const ic: [|I|] = { FC() {} }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/c/index.ts === +// namespace NS { +// export function FC() {} +// } +// +// interface I { +// /*FIND ALL REFS*/[|FC|](); +// } +// +// const ic: I = { [|FC|]() {} }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionAcrossModuleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionAcrossModuleProjects.baseline.jsonc new file mode 100644 index 0000000000..bab15b51fa --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionAcrossModuleProjects.baseline.jsonc @@ -0,0 +1,225 @@ +// === findAllReferences === +// === /home/src/workspaces/project/a/index.ts === +// import { NS } from "../b"; +// import { I } from "../c"; +// +// declare module "../b" { +// export namespace NS { +// export function /*FIND ALL REFS*/[|FA|](); +// } +// } +// +// // --- (line: 10) skipped --- + +// --- (line: 13) skipped --- +// } +// +// const ia: I = { +// FA: NS.[|FA|], +// FC() { }, +// }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/a/index.ts === +// import { NS } from "../b"; +// import { [|I|] } from "../c"; +// +// declare module "../b" { +// export namespace NS { +// export function FA(); +// } +// } +// +// declare module "../c" { +// export interface /*FIND ALL REFS*/[|I|] { +// FA(); +// } +// } +// +// const ia: [|I|] = { +// FA: NS.FA, +// FC() { }, +// }; + +// === /home/src/workspaces/project/c/index.ts === +// export namespace NS { +// export function FC() {} +// } +// +// export interface [|I|] { +// FC(); +// } +// +// const ic: [|I|] = { FC() {} }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/a/index.ts === +// --- (line: 8) skipped --- +// +// declare module "../c" { +// export interface I { +// /*FIND ALL REFS*/[|FA|](); +// } +// } +// +// const ia: I = { +// [|FA|]: NS.FA, +// FC() { }, +// }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/a2/index.ts === +// import { NS } from "../b"; +// import { I } from "../c"; +// +// declare module "../b" { +// export namespace NS { +// export function /*FIND ALL REFS*/[|FA|](); +// } +// } +// +// // --- (line: 10) skipped --- + +// --- (line: 13) skipped --- +// } +// +// const ia: I = { +// FA: NS.[|FA|], +// FC() { }, +// }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/a2/index.ts === +// import { NS } from "../b"; +// import { [|I|] } from "../c"; +// +// declare module "../b" { +// export namespace NS { +// export function FA(); +// } +// } +// +// declare module "../c" { +// export interface /*FIND ALL REFS*/[|I|] { +// FA(); +// } +// } +// +// const ia: [|I|] = { +// FA: NS.FA, +// FC() { }, +// }; + +// === /home/src/workspaces/project/c/index.ts === +// export namespace NS { +// export function FC() {} +// } +// +// export interface [|I|] { +// FC(); +// } +// +// const ic: [|I|] = { FC() {} }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/a2/index.ts === +// --- (line: 8) skipped --- +// +// declare module "../c" { +// export interface I { +// /*FIND ALL REFS*/[|FA|](); +// } +// } +// +// const ia: I = { +// [|FA|]: NS.FA, +// FC() { }, +// }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/b/index.ts === +// export namespace NS { +// export function /*FIND ALL REFS*/[|FB|]() {} +// } +// +// export interface I { +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /home/src/workspaces/project/b/index.ts === +// export namespace NS { +// export function FB() {} +// } +// +// export interface /*FIND ALL REFS*/[|I|] { +// FB(); +// } +// +// const ib: [|I|] = { FB() {} }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/b/index.ts === +// export namespace NS { +// export function FB() {} +// } +// +// export interface I { +// /*FIND ALL REFS*/[|FB|](); +// } +// +// const ib: I = { [|FB|]() {} }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/c/index.ts === +// export namespace NS { +// export function /*FIND ALL REFS*/[|FC|]() {} +// } +// +// export interface I { +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /home/src/workspaces/project/c/index.ts === +// export namespace NS { +// export function FC() {} +// } +// +// export interface /*FIND ALL REFS*/[|I|] { +// FC(); +// } +// +// const ic: [|I|] = { FC() {} }; + + + +// === findAllReferences === +// === /home/src/workspaces/project/c/index.ts === +// export namespace NS { +// export function FC() {} +// } +// +// export interface I { +// /*FIND ALL REFS*/[|FC|](); +// } +// +// const ic: I = { [|FC|]() {} }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionInterfaceImplementation.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionInterfaceImplementation.baseline.jsonc new file mode 100644 index 0000000000..e51b9e8cad --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionInterfaceImplementation.baseline.jsonc @@ -0,0 +1,27 @@ +// === findAllReferences === +// === /isDefinitionInterfaceImplementation.ts === +// interface I { +// /*FIND ALL REFS*/[|M|](): void; +// } +// +// class C implements I { +// [|M|]() { } +// } +// +// ({} as I).[|M|](); +// ({} as C).[|M|](); + + + +// === findAllReferences === +// === /isDefinitionInterfaceImplementation.ts === +// interface I { +// [|M|](): void; +// } +// +// class C implements I { +// /*FIND ALL REFS*/[|M|]() { } +// } +// +// ({} as I).[|M|](); +// ({} as C).[|M|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionOverloads.baseline.jsonc new file mode 100644 index 0000000000..29eeb6d11a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionOverloads.baseline.jsonc @@ -0,0 +1,30 @@ +// === findAllReferences === +// === /isDefinitionOverloads.ts === +// function /*FIND ALL REFS*/[|f|](x: number): void; +// function [|f|](x: string): void; +// function [|f|](x: number | string) { } +// +// [|f|](1); +// [|f|]("a"); + + + +// === findAllReferences === +// === /isDefinitionOverloads.ts === +// function [|f|](x: number): void; +// function /*FIND ALL REFS*/[|f|](x: string): void; +// function [|f|](x: number | string) { } +// +// [|f|](1); +// [|f|]("a"); + + + +// === findAllReferences === +// === /isDefinitionOverloads.ts === +// function [|f|](x: number): void; +// function [|f|](x: string): void; +// function /*FIND ALL REFS*/[|f|](x: number | string) { } +// +// [|f|](1); +// [|f|]("a"); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionShorthandProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionShorthandProperty.baseline.jsonc new file mode 100644 index 0000000000..837a87c67a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionShorthandProperty.baseline.jsonc @@ -0,0 +1,18 @@ +// === findAllReferences === +// === /isDefinitionShorthandProperty.ts === +// const /*FIND ALL REFS*/[|x|] = 1; +// const y: { x: number } = { [|x|] }; + + + +// === findAllReferences === +// === /isDefinitionShorthandProperty.ts === +// const x = 1; +// const y: { /*FIND ALL REFS*/[|x|]: number } = { [|x|] }; + + + +// === findAllReferences === +// === /isDefinitionShorthandProperty.ts === +// const [|x|] = 1; +// const y: { [|x|]: number } = { /*FIND ALL REFS*/[|x|] }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc new file mode 100644 index 0000000000..52a7e63c1b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleImport.baseline.jsonc @@ -0,0 +1,15 @@ +// === findAllReferences === +// === /a.ts === +// export function /*FIND ALL REFS*/[|f|]() {} + +// === /b.ts === +// import { [|f|] } from "./a"; + + + +// === findAllReferences === +// === /a.ts === +// export function [|f|]() {} + +// === /b.ts === +// import { /*FIND ALL REFS*/[|f|] } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleReference.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleReference.baseline.jsonc new file mode 100644 index 0000000000..9b9178931c --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/isDefinitionSingleReference.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /isDefinitionSingleReference.ts === +// function /*FIND ALL REFS*/[|f|]() {} +// [|f|](); + + + +// === findAllReferences === +// === /isDefinitionSingleReference.ts === +// function [|f|]() {} +// /*FIND ALL REFS*/[|f|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/jsdocSatisfiesTagFindAllReferences.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/jsdocSatisfiesTagFindAllReferences.baseline.jsonc new file mode 100644 index 0000000000..b7690faa79 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/jsdocSatisfiesTagFindAllReferences.baseline.jsonc @@ -0,0 +1,9 @@ +// === findAllReferences === +// === /a.js === +// /** +// * @typedef {Object} [|T|] +// * @property {number} a +// */ +// +// /** @satisfies {/*FIND ALL REFS*/[|T|]} comment */ +// const foo = { a: 1 }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/jsdocThrowsTag_findAllReferences.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/jsdocThrowsTag_findAllReferences.baseline.jsonc new file mode 100644 index 0000000000..d399b6dc09 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/jsdocThrowsTag_findAllReferences.baseline.jsonc @@ -0,0 +1,7 @@ +// === findAllReferences === +// === /jsdocThrowsTag_findAllReferences.ts === +// class /*FIND ALL REFS*/[|E|] extends Error {} +// /** +// * @throws {E} +// */ +// function f() {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/jsdocTypedefTagSemanticMeaning0.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/jsdocTypedefTagSemanticMeaning0.baseline.jsonc new file mode 100644 index 0000000000..662ccb87d3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/jsdocTypedefTagSemanticMeaning0.baseline.jsonc @@ -0,0 +1,51 @@ +// === findAllReferences === +// === /a.js === +// /** /*FIND ALL REFS*/@typedef {number} T */ +// const T = 1; +// /** @type {T} */ +// const n = T; + + + +// === findAllReferences === +// === /a.js === +// /** @typedef {number} /*FIND ALL REFS*/[|T|] */ +// const T = 1; +// /** @type {[|T|]} */ +// const n = T; + + + +// === findAllReferences === +// === /a.js === +// /** @typedef {number} T */ +// /*FIND ALL REFS*/const T = 1; +// /** @type {T} */ +// const n = T; + + + +// === findAllReferences === +// === /a.js === +// /** @typedef {number} T */ +// const /*FIND ALL REFS*/[|T|] = 1; +// /** @type {T} */ +// const n = [|T|]; + + + +// === findAllReferences === +// === /a.js === +// /** @typedef {number} [|T|] */ +// const T = 1; +// /** @type {/*FIND ALL REFS*/[|T|]} */ +// const n = T; + + + +// === findAllReferences === +// === /a.js === +// /** @typedef {number} T */ +// const [|T|] = 1; +// /** @type {T} */ +// const n = /*FIND ALL REFS*/[|T|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/jsdocTypedefTagSemanticMeaning1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/jsdocTypedefTagSemanticMeaning1.baseline.jsonc new file mode 100644 index 0000000000..72f2f31da3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/jsdocTypedefTagSemanticMeaning1.baseline.jsonc @@ -0,0 +1,33 @@ +// === findAllReferences === +// === /a.js === +// /** @typedef {number} */ +// /*FIND ALL REFS*/const T = 1; +// /** @type {T} */ +// const n = T; + + + +// === findAllReferences === +// === /a.js === +// /** @typedef {number} */ +// const /*FIND ALL REFS*/[|T|] = 1; +// /** @type {T} */ +// const n = [|T|]; + + + +// === findAllReferences === +// === /a.js === +// /** @typedef {number} */ +// const T = 1; +// /** @type {/*FIND ALL REFS*/[|T|]} */ +// const n = T; + + + +// === findAllReferences === +// === /a.js === +// /** @typedef {number} */ +// const [|T|] = 1; +// /** @type {T} */ +// const n = /*FIND ALL REFS*/[|T|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referenceInParameterPropertyDeclaration.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referenceInParameterPropertyDeclaration.baseline.jsonc new file mode 100644 index 0000000000..4cc9699bb0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referenceInParameterPropertyDeclaration.baseline.jsonc @@ -0,0 +1,53 @@ +// === findAllReferences === +// === /file1.ts === +// class Foo { +// constructor(private /*FIND ALL REFS*/[|privateParam|]: number, +// public publicParam: string, +// protected protectedParam: boolean) { +// +// let localPrivate = [|privateParam|]; +// this.[|privateParam|] += 10; +// +// let localPublic = publicParam; +// this.publicParam += " Hello!"; +// // --- (line: 11) skipped --- + + + +// === findAllReferences === +// === /file1.ts === +// class Foo { +// constructor(private privateParam: number, +// public /*FIND ALL REFS*/[|publicParam|]: string, +// protected protectedParam: boolean) { +// +// let localPrivate = privateParam; +// this.privateParam += 10; +// +// let localPublic = [|publicParam|]; +// this.[|publicParam|] += " Hello!"; +// +// let localProtected = protectedParam; +// this.protectedParam = false; +// } +// } + + + +// === findAllReferences === +// === /file1.ts === +// class Foo { +// constructor(private privateParam: number, +// public publicParam: string, +// protected /*FIND ALL REFS*/[|protectedParam|]: boolean) { +// +// let localPrivate = privateParam; +// this.privateParam += 10; +// +// let localPublic = publicParam; +// this.publicParam += " Hello!"; +// +// let localProtected = [|protectedParam|]; +// this.[|protectedParam|] = false; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referenceToClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referenceToClass.baseline.jsonc new file mode 100644 index 0000000000..039a517c5f --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referenceToClass.baseline.jsonc @@ -0,0 +1,123 @@ +// === findAllReferences === +// === /referenceToClass_1.ts === +// class /*FIND ALL REFS*/[|foo|] { +// public n: [|foo|]; +// public foo: number; +// } +// +// class bar { +// public n: [|foo|]; +// public k = new [|foo|](); +// } +// +// module mod { +// var k: [|foo|] = null; +// } + +// === /referenceToClass_2.ts === +// var k: [|foo|]; + + + +// === findAllReferences === +// === /referenceToClass_1.ts === +// class [|foo|] { +// public n: /*FIND ALL REFS*/[|foo|]; +// public foo: number; +// } +// +// class bar { +// public n: [|foo|]; +// public k = new [|foo|](); +// } +// +// module mod { +// var k: [|foo|] = null; +// } + +// === /referenceToClass_2.ts === +// var k: [|foo|]; + + + +// === findAllReferences === +// === /referenceToClass_1.ts === +// class [|foo|] { +// public n: [|foo|]; +// public foo: number; +// } +// +// class bar { +// public n: /*FIND ALL REFS*/[|foo|]; +// public k = new [|foo|](); +// } +// +// module mod { +// var k: [|foo|] = null; +// } + +// === /referenceToClass_2.ts === +// var k: [|foo|]; + + + +// === findAllReferences === +// === /referenceToClass_1.ts === +// class [|foo|] { +// public n: [|foo|]; +// public foo: number; +// } +// +// class bar { +// public n: [|foo|]; +// public k = new /*FIND ALL REFS*/[|foo|](); +// } +// +// module mod { +// var k: [|foo|] = null; +// } + +// === /referenceToClass_2.ts === +// var k: [|foo|]; + + + +// === findAllReferences === +// === /referenceToClass_1.ts === +// class [|foo|] { +// public n: [|foo|]; +// public foo: number; +// } +// +// class bar { +// public n: [|foo|]; +// public k = new [|foo|](); +// } +// +// module mod { +// var k: /*FIND ALL REFS*/[|foo|] = null; +// } + +// === /referenceToClass_2.ts === +// var k: [|foo|]; + + + +// === findAllReferences === +// === /referenceToClass_1.ts === +// class [|foo|] { +// public n: [|foo|]; +// public foo: number; +// } +// +// class bar { +// public n: [|foo|]; +// public k = new [|foo|](); +// } +// +// module mod { +// var k: [|foo|] = null; +// } + +// === /referenceToClass_2.ts === +// var k: /*FIND ALL REFS*/[|foo|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referenceToEmptyObject.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referenceToEmptyObject.baseline.jsonc new file mode 100644 index 0000000000..b25f19fd68 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referenceToEmptyObject.baseline.jsonc @@ -0,0 +1,3 @@ +// === findAllReferences === +// === /referenceToEmptyObject.ts === +// const obj = {}/*FIND ALL REFS*/; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/references01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/references01.baseline.jsonc new file mode 100644 index 0000000000..95c1aa6286 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/references01.baseline.jsonc @@ -0,0 +1,9 @@ +// === findAllReferences === +// === /home/src/workspaces/project/referencesForGlobals_1.ts === +// class [|globalClass|] { +// public f() { } +// } + +// === /home/src/workspaces/project/referencesForGlobals_2.ts === +// /// +// var c = /*FIND ALL REFS*/[|globalClass|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesBloomFilters.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesBloomFilters.baseline.jsonc new file mode 100644 index 0000000000..2ca946624b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesBloomFilters.baseline.jsonc @@ -0,0 +1,12 @@ +// === findAllReferences === +// === /declaration.ts === +// var container = { /*FIND ALL REFS*/[|searchProp|] : 1 }; + +// === /expression.ts === +// function blah() { return (1 + 2 + container.[|searchProp|]()) === 2; }; + +// === /redeclaration.ts === +// container = { "[|searchProp|]" : 18 }; + +// === /stringIndexer.ts === +// function blah2() { container["[|searchProp|]"] }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesBloomFilters2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesBloomFilters2.baseline.jsonc new file mode 100644 index 0000000000..e005ba98a0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesBloomFilters2.baseline.jsonc @@ -0,0 +1,12 @@ +// === findAllReferences === +// === /declaration.ts === +// var container = { /*FIND ALL REFS*/[|42|]: 1 }; + +// === /expression.ts === +// function blah() { return (container[[|42|]]) === 2; }; + +// === /redeclaration.ts === +// container = { "[|42|]" : 18 }; + +// === /stringIndexer.ts === +// function blah2() { container["[|42|]"] }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesBloomFilters3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesBloomFilters3.baseline.jsonc new file mode 100644 index 0000000000..f1fe9c8f47 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesBloomFilters3.baseline.jsonc @@ -0,0 +1,24 @@ +// === findAllReferences === +// === /declaration.ts === +// enum Test { /*FIND ALL REFS*/"[|42|]" = 1 }; + +// === /expression.ts === +// (Test[[|42|]]); + + + +// === findAllReferences === +// === /declaration.ts === +// enum Test { "/*FIND ALL REFS*/[|42|]" = 1 }; + +// === /expression.ts === +// (Test[[|42|]]); + + + +// === findAllReferences === +// === /declaration.ts === +// enum Test { "[|42|]" = 1 }; + +// === /expression.ts === +// (Test[/*FIND ALL REFS*/[|42|]]); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForAmbients.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForAmbients.baseline.jsonc new file mode 100644 index 0000000000..b70c6b36cd --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForAmbients.baseline.jsonc @@ -0,0 +1,211 @@ +// === findAllReferences === +// === /referencesForAmbients.ts === +// /*FIND ALL REFS*/declare module "foo" { +// var f: number; +// } +// +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "/*FIND ALL REFS*/[|foo|]" { +// var f: number; +// } +// +// declare module "bar" { +// export import foo = require("[|foo|]"); +// var f2: typeof foo.f; +// } +// +// // --- (line: 10) skipped --- + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "foo" { +// /*FIND ALL REFS*/var f: number; +// } +// +// declare module "bar" { +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "foo" { +// var /*FIND ALL REFS*/[|f|]: number; +// } +// +// declare module "bar" { +// export import foo = require("foo"); +// var f2: typeof foo.[|f|]; +// } +// +// declare module "baz" { +// // --- (line: 11) skipped --- + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "foo" { +// var f: number; +// } +// +// /*FIND ALL REFS*/declare module "bar" { +// export import foo = require("foo"); +// var f2: typeof foo.f; +// } +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "foo" { +// var f: number; +// } +// +// declare module "/*FIND ALL REFS*/[|bar|]" { +// export import foo = require("foo"); +// var f2: typeof foo.f; +// } +// +// declare module "baz" { +// import bar = require("[|bar|]"); +// var f2: typeof bar.foo; +// } + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "foo" { +// var f: number; +// } +// +// declare module "bar" { +// /*FIND ALL REFS*/export import foo = require("foo"); +// var f2: typeof foo.f; +// } +// +// // --- (line: 10) skipped --- + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "foo" { +// var f: number; +// } +// +// declare module "bar" { +// export import /*FIND ALL REFS*/[|foo|] = require("foo"); +// var f2: typeof [|foo|].f; +// } +// +// declare module "baz" { +// import bar = require("bar"); +// var f2: typeof bar.[|foo|]; +// } + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "[|foo|]" { +// var f: number; +// } +// +// declare module "bar" { +// export import foo = require("/*FIND ALL REFS*/[|foo|]"); +// var f2: typeof foo.f; +// } +// +// // --- (line: 10) skipped --- + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "foo" { +// var f: number; +// } +// +// declare module "bar" { +// export import [|foo|] = require("foo"); +// var f2: typeof /*FIND ALL REFS*/[|foo|].f; +// } +// +// declare module "baz" { +// import bar = require("bar"); +// var f2: typeof bar.[|foo|]; +// } + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "foo" { +// var [|f|]: number; +// } +// +// declare module "bar" { +// export import foo = require("foo"); +// var f2: typeof foo./*FIND ALL REFS*/[|f|]; +// } +// +// declare module "baz" { +// // --- (line: 11) skipped --- + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// --- (line: 7) skipped --- +// } +// +// declare module "baz" { +// /*FIND ALL REFS*/import bar = require("bar"); +// var f2: typeof bar.foo; +// } + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "foo" { +// var f: number; +// } +// +// declare module "[|bar|]" { +// export import foo = require("foo"); +// var f2: typeof foo.f; +// } +// +// declare module "baz" { +// import bar = require("/*FIND ALL REFS*/[|bar|]"); +// var f2: typeof bar.foo; +// } + + + +// === findAllReferences === +// === /referencesForAmbients.ts === +// declare module "foo" { +// var f: number; +// } +// +// declare module "bar" { +// export import [|foo|] = require("foo"); +// var f2: typeof [|foo|].f; +// } +// +// declare module "baz" { +// import bar = require("bar"); +// var f2: typeof bar./*FIND ALL REFS*/[|foo|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassLocal.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassLocal.baseline.jsonc new file mode 100644 index 0000000000..6eba7c7b66 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassLocal.baseline.jsonc @@ -0,0 +1,70 @@ +// === findAllReferences === +// === /referencesForClassLocal.ts === +// var n = 14; +// +// class foo { +// /*FIND ALL REFS*/private n = 0; +// +// public bar() { +// this.n = 9; +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /referencesForClassLocal.ts === +// var n = 14; +// +// class foo { +// private /*FIND ALL REFS*/[|n|] = 0; +// +// public bar() { +// this.[|n|] = 9; +// } +// +// constructor() { +// this.[|n|] = 4; +// } +// +// public bar2() { +// // --- (line: 15) skipped --- + + + +// === findAllReferences === +// === /referencesForClassLocal.ts === +// var n = 14; +// +// class foo { +// private [|n|] = 0; +// +// public bar() { +// this./*FIND ALL REFS*/[|n|] = 9; +// } +// +// constructor() { +// this.[|n|] = 4; +// } +// +// public bar2() { +// // --- (line: 15) skipped --- + + + +// === findAllReferences === +// === /referencesForClassLocal.ts === +// var n = 14; +// +// class foo { +// private [|n|] = 0; +// +// public bar() { +// this.[|n|] = 9; +// } +// +// constructor() { +// this./*FIND ALL REFS*/[|n|] = 4; +// } +// +// public bar2() { +// // --- (line: 15) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassMembers.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassMembers.baseline.jsonc new file mode 100644 index 0000000000..33b6e54679 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassMembers.baseline.jsonc @@ -0,0 +1,99 @@ +// === findAllReferences === +// === /referencesForClassMembers.ts === +// class Base { +// /*FIND ALL REFS*/[|a|]: number; +// method(): void { } +// } +// class MyClass extends Base { +// [|a|]; +// method() { } +// } +// +// var c: MyClass; +// c.[|a|]; +// c.method(); + + + +// === findAllReferences === +// === /referencesForClassMembers.ts === +// class Base { +// [|a|]: number; +// method(): void { } +// } +// class MyClass extends Base { +// /*FIND ALL REFS*/[|a|]; +// method() { } +// } +// +// var c: MyClass; +// c.[|a|]; +// c.method(); + + + +// === findAllReferences === +// === /referencesForClassMembers.ts === +// class Base { +// [|a|]: number; +// method(): void { } +// } +// class MyClass extends Base { +// [|a|]; +// method() { } +// } +// +// var c: MyClass; +// c./*FIND ALL REFS*/[|a|]; +// c.method(); + + + +// === findAllReferences === +// === /referencesForClassMembers.ts === +// class Base { +// a: number; +// /*FIND ALL REFS*/[|method|](): void { } +// } +// class MyClass extends Base { +// a; +// [|method|]() { } +// } +// +// var c: MyClass; +// c.a; +// c.[|method|](); + + + +// === findAllReferences === +// === /referencesForClassMembers.ts === +// class Base { +// a: number; +// [|method|](): void { } +// } +// class MyClass extends Base { +// a; +// /*FIND ALL REFS*/[|method|]() { } +// } +// +// var c: MyClass; +// c.a; +// c.[|method|](); + + + +// === findAllReferences === +// === /referencesForClassMembers.ts === +// class Base { +// a: number; +// [|method|](): void { } +// } +// class MyClass extends Base { +// a; +// [|method|]() { } +// } +// +// var c: MyClass; +// c.a; +// c./*FIND ALL REFS*/[|method|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassMembersExtendingAbstractClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassMembersExtendingAbstractClass.baseline.jsonc new file mode 100644 index 0000000000..f86f487c5f --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassMembersExtendingAbstractClass.baseline.jsonc @@ -0,0 +1,99 @@ +// === findAllReferences === +// === /referencesForClassMembersExtendingAbstractClass.ts === +// abstract class Base { +// abstract /*FIND ALL REFS*/[|a|]: number; +// abstract method(): void; +// } +// class MyClass extends Base { +// [|a|]; +// method() { } +// } +// +// var c: MyClass; +// c.[|a|]; +// c.method(); + + + +// === findAllReferences === +// === /referencesForClassMembersExtendingAbstractClass.ts === +// abstract class Base { +// abstract [|a|]: number; +// abstract method(): void; +// } +// class MyClass extends Base { +// /*FIND ALL REFS*/[|a|]; +// method() { } +// } +// +// var c: MyClass; +// c.[|a|]; +// c.method(); + + + +// === findAllReferences === +// === /referencesForClassMembersExtendingAbstractClass.ts === +// abstract class Base { +// abstract [|a|]: number; +// abstract method(): void; +// } +// class MyClass extends Base { +// [|a|]; +// method() { } +// } +// +// var c: MyClass; +// c./*FIND ALL REFS*/[|a|]; +// c.method(); + + + +// === findAllReferences === +// === /referencesForClassMembersExtendingAbstractClass.ts === +// abstract class Base { +// abstract a: number; +// abstract /*FIND ALL REFS*/[|method|](): void; +// } +// class MyClass extends Base { +// a; +// [|method|]() { } +// } +// +// var c: MyClass; +// c.a; +// c.[|method|](); + + + +// === findAllReferences === +// === /referencesForClassMembersExtendingAbstractClass.ts === +// abstract class Base { +// abstract a: number; +// abstract [|method|](): void; +// } +// class MyClass extends Base { +// a; +// /*FIND ALL REFS*/[|method|]() { } +// } +// +// var c: MyClass; +// c.a; +// c.[|method|](); + + + +// === findAllReferences === +// === /referencesForClassMembersExtendingAbstractClass.ts === +// abstract class Base { +// abstract a: number; +// abstract [|method|](): void; +// } +// class MyClass extends Base { +// a; +// [|method|]() { } +// } +// +// var c: MyClass; +// c.a; +// c./*FIND ALL REFS*/[|method|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassMembersExtendingGenericClass.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassMembersExtendingGenericClass.baseline.jsonc new file mode 100644 index 0000000000..c1fa532bb7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassMembersExtendingGenericClass.baseline.jsonc @@ -0,0 +1,99 @@ +// === findAllReferences === +// === /referencesForClassMembersExtendingGenericClass.ts === +// class Base { +// /*FIND ALL REFS*/[|a|]: this; +// method(a?:T, b?:U): this { } +// } +// class MyClass extends Base { +// [|a|]; +// method() { } +// } +// +// var c: MyClass; +// c.[|a|]; +// c.method(); + + + +// === findAllReferences === +// === /referencesForClassMembersExtendingGenericClass.ts === +// class Base { +// [|a|]: this; +// method(a?:T, b?:U): this { } +// } +// class MyClass extends Base { +// /*FIND ALL REFS*/[|a|]; +// method() { } +// } +// +// var c: MyClass; +// c.[|a|]; +// c.method(); + + + +// === findAllReferences === +// === /referencesForClassMembersExtendingGenericClass.ts === +// class Base { +// [|a|]: this; +// method(a?:T, b?:U): this { } +// } +// class MyClass extends Base { +// [|a|]; +// method() { } +// } +// +// var c: MyClass; +// c./*FIND ALL REFS*/[|a|]; +// c.method(); + + + +// === findAllReferences === +// === /referencesForClassMembersExtendingGenericClass.ts === +// class Base { +// a: this; +// /*FIND ALL REFS*/[|method|](a?:T, b?:U): this { } +// } +// class MyClass extends Base { +// a; +// [|method|]() { } +// } +// +// var c: MyClass; +// c.a; +// c.[|method|](); + + + +// === findAllReferences === +// === /referencesForClassMembersExtendingGenericClass.ts === +// class Base { +// a: this; +// [|method|](a?:T, b?:U): this { } +// } +// class MyClass extends Base { +// a; +// /*FIND ALL REFS*/[|method|]() { } +// } +// +// var c: MyClass; +// c.a; +// c.[|method|](); + + + +// === findAllReferences === +// === /referencesForClassMembersExtendingGenericClass.ts === +// class Base { +// a: this; +// [|method|](a?:T, b?:U): this { } +// } +// class MyClass extends Base { +// a; +// [|method|]() { } +// } +// +// var c: MyClass; +// c.a; +// c./*FIND ALL REFS*/[|method|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassParameter.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassParameter.baseline.jsonc new file mode 100644 index 0000000000..e5b662d166 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForClassParameter.baseline.jsonc @@ -0,0 +1,75 @@ +// === findAllReferences === +// === /referencesForClassParameter.ts === +// var p = 2; +// +// class p { } +// +// class foo { +// constructor (/*FIND ALL REFS*/public p: any) { +// } +// +// public f(p) { +// // --- (line: 10) skipped --- + + + +// === findAllReferences === +// === /referencesForClassParameter.ts === +// var p = 2; +// +// class p { } +// +// class foo { +// constructor (public /*FIND ALL REFS*/[|p|]: any) { +// } +// +// public f(p) { +// this.[|p|] = p; +// } +// +// } +// +// var n = new foo(undefined); +// n.[|p|] = null; + + + +// === findAllReferences === +// === /referencesForClassParameter.ts === +// var p = 2; +// +// class p { } +// +// class foo { +// constructor (public [|p|]: any) { +// } +// +// public f(p) { +// this./*FIND ALL REFS*/[|p|] = p; +// } +// +// } +// +// var n = new foo(undefined); +// n.[|p|] = null; + + + +// === findAllReferences === +// === /referencesForClassParameter.ts === +// var p = 2; +// +// class p { } +// +// class foo { +// constructor (public [|p|]: any) { +// } +// +// public f(p) { +// this.[|p|] = p; +// } +// +// } +// +// var n = new foo(undefined); +// n./*FIND ALL REFS*/[|p|] = null; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForContextuallyTypedObjectLiteralProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForContextuallyTypedObjectLiteralProperties.baseline.jsonc new file mode 100644 index 0000000000..4c491c78d4 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForContextuallyTypedObjectLiteralProperties.baseline.jsonc @@ -0,0 +1,26 @@ +// === findAllReferences === +// === /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 }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForContextuallyTypedUnionProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForContextuallyTypedUnionProperties.baseline.jsonc new file mode 100644 index 0000000000..81e3ad5bc9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForContextuallyTypedUnionProperties.baseline.jsonc @@ -0,0 +1,374 @@ +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties.ts === +// interface A { +// a: number; +// /*FIND ALL REFS*/[|common|]: string; +// } +// +// interface B { +// 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 = { a:0, [|common|]: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; + + + +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties.ts === +// --- (line: 4) skipped --- +// +// interface B { +// b: number; +// /*FIND ALL REFS*/[|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 = { a:0, [|common|]: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; + + + +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties.ts === +// interface A { +// a: number; +// [|common|]: string; +// } +// +// interface B { +// b: number; +// [|common|]: number; +// } +// +// // Assignment +// var v1: A | B = { a: 0, /*FIND ALL REFS*/[|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 = { a:0, [|common|]: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; + + + +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties.ts === +// interface A { +// a: number; +// [|common|]: string; +// } +// +// interface B { +// b: number; +// [|common|]: number; +// } +// +// // Assignment +// var v1: A | B = { a: 0, [|common|]: "" }; +// var v2: A | B = { b: 0, /*FIND ALL REFS*/[|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 = { a:0, [|common|]: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; + + + +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties.ts === +// interface A { +// a: number; +// [|common|]: string; +// } +// +// interface B { +// 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, /*FIND ALL REFS*/[|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 = { a:0, [|common|]: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; + + + +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties.ts === +// interface A { +// a: number; +// [|common|]: string; +// } +// +// interface B { +// 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 = { /*FIND ALL REFS*/[|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 = { a:0, [|common|]: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; + + + +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties.ts === +// interface A { +// a: number; +// [|common|]: string; +// } +// +// interface B { +// 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, /*FIND ALL REFS*/[|common|]: "" }, { b: 0, [|common|]: 0 }]; +// +// // Nested object literal +// var ob: { aorb: A|B } = { aorb: { b: 0, [|common|]: 0 } }; +// +// // Widened type +// var w: A|B = { a:0, [|common|]: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; + + + +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties.ts === +// interface A { +// a: number; +// [|common|]: string; +// } +// +// interface B { +// 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, /*FIND ALL REFS*/[|common|]: 0 }]; +// +// // Nested object literal +// var ob: { aorb: A|B } = { aorb: { b: 0, [|common|]: 0 } }; +// +// // Widened type +// var w: A|B = { a:0, [|common|]: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; + + + +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties.ts === +// interface A { +// a: number; +// [|common|]: string; +// } +// +// interface B { +// 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, /*FIND ALL REFS*/[|common|]: 0 } }; +// +// // Widened type +// var w: A|B = { a:0, [|common|]: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; + + + +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties.ts === +// interface A { +// a: number; +// [|common|]: string; +// } +// +// interface B { +// 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 = { a:0, /*FIND ALL REFS*/[|common|]: undefined }; +// +// // Untped -- should not be included +// var u1 = { a: 0, b: 0, common: "" }; +// var u2 = { b: 0, common: 0 }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForContextuallyTypedUnionProperties2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForContextuallyTypedUnionProperties2.baseline.jsonc new file mode 100644 index 0000000000..f3a40c040c --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForContextuallyTypedUnionProperties2.baseline.jsonc @@ -0,0 +1,33 @@ +// === findAllReferences === +// === /referencesForContextuallyTypedUnionProperties2.ts === +// --- (line: 3) skipped --- +// } +// +// 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 }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForDeclarationKeywords.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForDeclarationKeywords.baseline.jsonc new file mode 100644 index 0000000000..1eaba5ce64 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForDeclarationKeywords.baseline.jsonc @@ -0,0 +1,222 @@ +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// class Base {} +// interface Implemented1 {} +// /*FIND ALL REFS*/class C1 extends Base implements Implemented1 { +// get e() { return 1; } +// set e(v) {} +// } +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// class Base {} +// interface Implemented1 {} +// class C1 /*FIND ALL REFS*/extends Base implements Implemented1 { +// get e() { return 1; } +// set e(v) {} +// } +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// class Base {} +// interface Implemented1 {} +// class C1 extends Base /*FIND ALL REFS*/implements Implemented1 { +// get e() { return 1; } +// set e(v) {} +// } +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 14) skipped --- +// const z = 1; +// interface Implemented2 {} +// interface Implemented3 {} +// class C2 /*FIND ALL REFS*/implements Implemented2, Implemented3 {} +// interface I2 extends Implemented2, Implemented3 {} + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// class Base {} +// interface Implemented1 {} +// class C1 extends Base implements Implemented1 { +// /*FIND ALL REFS*/get e() { return 1; } +// set e(v) {} +// } +// interface I1 extends Base { } +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// class Base {} +// interface Implemented1 {} +// class C1 extends Base implements Implemented1 { +// get e() { return 1; } +// /*FIND ALL REFS*/set e(v) {} +// } +// interface I1 extends Base { } +// type T = { } +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 3) skipped --- +// get e() { return 1; } +// set e(v) {} +// } +// /*FIND ALL REFS*/interface I1 extends Base { } +// type T = { } +// enum E { } +// namespace N { } +// // --- (line: 11) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 3) skipped --- +// get e() { return 1; } +// set e(v) {} +// } +// interface I1 /*FIND ALL REFS*/extends Base { } +// type T = { } +// enum E { } +// namespace N { } +// // --- (line: 11) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 15) skipped --- +// interface Implemented2 {} +// interface Implemented3 {} +// class C2 implements Implemented2, Implemented3 {} +// interface I2 /*FIND ALL REFS*/extends Implemented2, Implemented3 {} + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 4) skipped --- +// set e(v) {} +// } +// interface I1 extends Base { } +// /*FIND ALL REFS*/type T = { } +// enum E { } +// namespace N { } +// module M { } +// // --- (line: 12) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 5) skipped --- +// } +// interface I1 extends Base { } +// type T = { } +// /*FIND ALL REFS*/enum E { } +// namespace N { } +// module M { } +// function fn() {} +// // --- (line: 13) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 6) skipped --- +// interface I1 extends Base { } +// type T = { } +// enum E { } +// /*FIND ALL REFS*/namespace N { } +// module M { } +// function fn() {} +// var x; +// // --- (line: 14) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 7) skipped --- +// type T = { } +// enum E { } +// namespace N { } +// /*FIND ALL REFS*/module M { } +// function fn() {} +// var x; +// let y; +// // --- (line: 15) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 8) skipped --- +// enum E { } +// namespace N { } +// module M { } +// /*FIND ALL REFS*/function fn() {} +// var x; +// let y; +// const z = 1; +// // --- (line: 16) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 9) skipped --- +// namespace N { } +// module M { } +// function fn() {} +// /*FIND ALL REFS*/var x; +// let y; +// const z = 1; +// interface Implemented2 {} +// // --- (line: 17) skipped --- + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 10) skipped --- +// module M { } +// function fn() {} +// var x; +// /*FIND ALL REFS*/let y; +// const z = 1; +// interface Implemented2 {} +// interface Implemented3 {} +// class C2 implements Implemented2, Implemented3 {} +// interface I2 extends Implemented2, Implemented3 {} + + + +// === findAllReferences === +// === /referencesForDeclarationKeywords.ts === +// --- (line: 11) skipped --- +// function fn() {} +// var x; +// let y; +// /*FIND ALL REFS*/const z = 1; +// interface Implemented2 {} +// interface Implemented3 {} +// class C2 implements Implemented2, Implemented3 {} +// interface I2 extends Implemented2, Implemented3 {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForEnums.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForEnums.baseline.jsonc new file mode 100644 index 0000000000..1cc4283eff --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForEnums.baseline.jsonc @@ -0,0 +1,132 @@ +// === findAllReferences === +// === /referencesForEnums.ts === +// enum E { +// /*FIND ALL REFS*/[|value1|] = 1, +// "value2" = [|value1|], +// 111 = 11 +// } +// +// E.[|value1|]; +// E["value2"]; +// E.value2; +// E[111]; + + + +// === findAllReferences === +// === /referencesForEnums.ts === +// enum E { +// value1 = 1, +// /*FIND ALL REFS*/"[|value2|]" = value1, +// 111 = 11 +// } +// +// E.value1; +// E["[|value2|]"]; +// E.[|value2|]; +// E[111]; + + + +// === findAllReferences === +// === /referencesForEnums.ts === +// enum E { +// value1 = 1, +// "/*FIND ALL REFS*/[|value2|]" = value1, +// 111 = 11 +// } +// +// E.value1; +// E["[|value2|]"]; +// E.[|value2|]; +// E[111]; + + + +// === findAllReferences === +// === /referencesForEnums.ts === +// enum E { +// [|value1|] = 1, +// "value2" = /*FIND ALL REFS*/[|value1|], +// 111 = 11 +// } +// +// E.[|value1|]; +// E["value2"]; +// E.value2; +// E[111]; + + + +// === findAllReferences === +// === /referencesForEnums.ts === +// enum E { +// value1 = 1, +// "value2" = value1, +// /*FIND ALL REFS*/[|111|] = 11 +// } +// +// E.value1; +// E["value2"]; +// E.value2; +// E[[|111|]]; + + + +// === findAllReferences === +// === /referencesForEnums.ts === +// enum E { +// [|value1|] = 1, +// "value2" = [|value1|], +// 111 = 11 +// } +// +// E./*FIND ALL REFS*/[|value1|]; +// E["value2"]; +// E.value2; +// E[111]; + + + +// === findAllReferences === +// === /referencesForEnums.ts === +// enum E { +// value1 = 1, +// "[|value2|]" = value1, +// 111 = 11 +// } +// +// E.value1; +// E["/*FIND ALL REFS*/[|value2|]"]; +// E.[|value2|]; +// E[111]; + + + +// === findAllReferences === +// === /referencesForEnums.ts === +// enum E { +// value1 = 1, +// "[|value2|]" = value1, +// 111 = 11 +// } +// +// E.value1; +// E["[|value2|]"]; +// E./*FIND ALL REFS*/[|value2|]; +// E[111]; + + + +// === findAllReferences === +// === /referencesForEnums.ts === +// enum E { +// value1 = 1, +// "value2" = value1, +// [|111|] = 11 +// } +// +// E.value1; +// E["value2"]; +// E.value2; +// E[/*FIND ALL REFS*/[|111|]]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForExpressionKeywords.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForExpressionKeywords.baseline.jsonc new file mode 100644 index 0000000000..845f1c7ced --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForExpressionKeywords.baseline.jsonc @@ -0,0 +1,123 @@ +// === findAllReferences === +// === /referencesForExpressionKeywords.ts === +// class C { +// static x = 1; +// } +// /*FIND ALL REFS*/new C(); +// void C; +// typeof C; +// delete C.x; +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /referencesForExpressionKeywords.ts === +// class C { +// static x = 1; +// } +// new C(); +// /*FIND ALL REFS*/void C; +// typeof C; +// delete C.x; +// async function* f() { +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /referencesForExpressionKeywords.ts === +// class C { +// static x = 1; +// } +// new C(); +// void C; +// /*FIND ALL REFS*/[|typeof|] C; +// delete C.x; +// async function* f() { +// yield C; +// // --- (line: 10) skipped --- + + + +// === findAllReferences === +// === /referencesForExpressionKeywords.ts === +// --- (line: 5) skipped --- +// typeof C; +// delete C.x; +// async function* f() { +// /*FIND ALL REFS*/yield C; +// await C; +// } +// "x" in C; +// undefined instanceof C; +// undefined as C; + + + +// === findAllReferences === +// === /referencesForExpressionKeywords.ts === +// --- (line: 6) skipped --- +// delete C.x; +// async function* f() { +// yield C; +// /*FIND ALL REFS*/await C; +// } +// "x" in C; +// undefined instanceof C; +// undefined as C; + + + +// === findAllReferences === +// === /referencesForExpressionKeywords.ts === +// --- (line: 8) skipped --- +// yield C; +// await C; +// } +// "x" /*FIND ALL REFS*/in C; +// undefined instanceof C; +// undefined as C; + + + +// === findAllReferences === +// === /referencesForExpressionKeywords.ts === +// class [|C|] { +// static x = 1; +// } +// new [|C|](); +// void [|C|]; +// typeof [|C|]; +// delete [|C|].x; +// async function* f() { +// yield [|C|]; +// await [|C|]; +// } +// "x" in [|C|]; +// undefined /*FIND ALL REFS*/instanceof [|C|]; +// undefined as [|C|]; + + + +// === findAllReferences === +// === /referencesForExpressionKeywords.ts === +// --- (line: 10) skipped --- +// } +// "x" in C; +// undefined instanceof C; +// undefined /*FIND ALL REFS*/as C; + + + +// === findAllReferences === +// === /referencesForExpressionKeywords.ts === +// --- (line: 3) skipped --- +// new C(); +// void C; +// typeof C; +// /*FIND ALL REFS*/delete C.x; +// async function* f() { +// yield C; +// await C; +// // --- (line: 11) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForExternalModuleNames.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForExternalModuleNames.baseline.jsonc new file mode 100644 index 0000000000..6f1cb201fe --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForExternalModuleNames.baseline.jsonc @@ -0,0 +1,33 @@ +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// /*FIND ALL REFS*/declare module "foo" { +// var f: number; +// } + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// declare module "/*FIND ALL REFS*/[|foo|]" { +// var f: number; +// } + +// === /referencesForGlobals_2.ts === +// import f = require("[|foo|]"); + + + +// === findAllReferences === +// === /referencesForGlobals_2.ts === +// /*FIND ALL REFS*/import f = require("foo"); + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// declare module "[|foo|]" { +// var f: number; +// } + +// === /referencesForGlobals_2.ts === +// import f = require("/*FIND ALL REFS*/[|foo|]"); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForFunctionOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForFunctionOverloads.baseline.jsonc new file mode 100644 index 0000000000..86de4ff51c --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForFunctionOverloads.baseline.jsonc @@ -0,0 +1,42 @@ +// === findAllReferences === +// === /referencesForFunctionOverloads.ts === +// /*FIND ALL REFS*/function foo(x: string); +// function foo(x: string, y: number) { +// foo('', 43); +// } + + + +// === findAllReferences === +// === /referencesForFunctionOverloads.ts === +// function /*FIND ALL REFS*/[|foo|](x: string); +// function [|foo|](x: string, y: number) { +// [|foo|]('', 43); +// } + + + +// === findAllReferences === +// === /referencesForFunctionOverloads.ts === +// function foo(x: string); +// /*FIND ALL REFS*/function foo(x: string, y: number) { +// foo('', 43); +// } + + + +// === findAllReferences === +// === /referencesForFunctionOverloads.ts === +// function [|foo|](x: string); +// function /*FIND ALL REFS*/[|foo|](x: string, y: number) { +// [|foo|]('', 43); +// } + + + +// === findAllReferences === +// === /referencesForFunctionOverloads.ts === +// function [|foo|](x: string); +// function [|foo|](x: string, y: number) { +// /*FIND ALL REFS*/[|foo|]('', 43); +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForFunctionParameter.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForFunctionParameter.baseline.jsonc new file mode 100644 index 0000000000..f6c122df92 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForFunctionParameter.baseline.jsonc @@ -0,0 +1,33 @@ +// === findAllReferences === +// === /referencesForFunctionParameter.ts === +// var x; +// var n; +// +// function n(x: number, /*FIND ALL REFS*/[|n|]: number) { +// [|n|] = 32; +// x = [|n|]; +// } + + + +// === findAllReferences === +// === /referencesForFunctionParameter.ts === +// var x; +// var n; +// +// function n(x: number, [|n|]: number) { +// /*FIND ALL REFS*/[|n|] = 32; +// x = [|n|]; +// } + + + +// === findAllReferences === +// === /referencesForFunctionParameter.ts === +// var x; +// var n; +// +// function n(x: number, [|n|]: number) { +// [|n|] = 32; +// x = /*FIND ALL REFS*/[|n|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals.baseline.jsonc new file mode 100644 index 0000000000..54bec186f0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals.baseline.jsonc @@ -0,0 +1,111 @@ +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// /*FIND ALL REFS*/var global = 2; +// +// class foo { +// constructor (public global) { } +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// var /*FIND ALL REFS*/[|global|] = 2; +// +// class foo { +// constructor (public global) { } +// public f(global) { } +// public f2(global) { } +// } +// +// class bar { +// constructor () { +// var n = [|global|]; +// +// var f = new foo(''); +// f.global = ''; +// } +// } +// +// var k = [|global|]; + +// === /referencesForGlobals_2.ts === +// var m = [|global|]; + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// var [|global|] = 2; +// +// class foo { +// constructor (public global) { } +// public f(global) { } +// public f2(global) { } +// } +// +// class bar { +// constructor () { +// var n = /*FIND ALL REFS*/[|global|]; +// +// var f = new foo(''); +// f.global = ''; +// } +// } +// +// var k = [|global|]; + +// === /referencesForGlobals_2.ts === +// var m = [|global|]; + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// var [|global|] = 2; +// +// class foo { +// constructor (public global) { } +// public f(global) { } +// public f2(global) { } +// } +// +// class bar { +// constructor () { +// var n = [|global|]; +// +// var f = new foo(''); +// f.global = ''; +// } +// } +// +// var k = /*FIND ALL REFS*/[|global|]; + +// === /referencesForGlobals_2.ts === +// var m = [|global|]; + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// var [|global|] = 2; +// +// class foo { +// constructor (public global) { } +// public f(global) { } +// public f2(global) { } +// } +// +// class bar { +// constructor () { +// var n = [|global|]; +// +// var f = new foo(''); +// f.global = ''; +// } +// } +// +// var k = [|global|]; + +// === /referencesForGlobals_2.ts === +// var m = /*FIND ALL REFS*/[|global|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals2.baseline.jsonc new file mode 100644 index 0000000000..31467511fe --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals2.baseline.jsonc @@ -0,0 +1,27 @@ +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// /*FIND ALL REFS*/class globalClass { +// public f() { } +// } + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// class /*FIND ALL REFS*/[|globalClass|] { +// public f() { } +// } + +// === /referencesForGlobals_2.ts === +// var c = [|globalClass|](); + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// class [|globalClass|] { +// public f() { } +// } + +// === /referencesForGlobals_2.ts === +// var c = /*FIND ALL REFS*/[|globalClass|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals3.baseline.jsonc new file mode 100644 index 0000000000..79f09ba209 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals3.baseline.jsonc @@ -0,0 +1,27 @@ +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// /*FIND ALL REFS*/interface globalInterface { +// f(); +// } + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// interface /*FIND ALL REFS*/[|globalInterface|] { +// f(); +// } + +// === /referencesForGlobals_2.ts === +// var i: [|globalInterface|]; + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// interface [|globalInterface|] { +// f(); +// } + +// === /referencesForGlobals_2.ts === +// var i: /*FIND ALL REFS*/[|globalInterface|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals4.baseline.jsonc new file mode 100644 index 0000000000..92d11768c4 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals4.baseline.jsonc @@ -0,0 +1,27 @@ +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// /*FIND ALL REFS*/module globalModule { +// export f() { }; +// } + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// module /*FIND ALL REFS*/[|globalModule|] { +// export f() { }; +// } + +// === /referencesForGlobals_2.ts === +// var m = [|globalModule|]; + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// module [|globalModule|] { +// export f() { }; +// } + +// === /referencesForGlobals_2.ts === +// var m = /*FIND ALL REFS*/[|globalModule|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals5.baseline.jsonc new file mode 100644 index 0000000000..1345e76576 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobals5.baseline.jsonc @@ -0,0 +1,33 @@ +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// module globalModule { +// export var x; +// } +// +// /*FIND ALL REFS*/import globalAlias = globalModule; + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// module globalModule { +// export var x; +// } +// +// import /*FIND ALL REFS*/[|globalAlias|] = globalModule; + +// === /referencesForGlobals_2.ts === +// var m = [|globalAlias|]; + + + +// === findAllReferences === +// === /referencesForGlobals_1.ts === +// module globalModule { +// export var x; +// } +// +// import [|globalAlias|] = globalModule; + +// === /referencesForGlobals_2.ts === +// var m = /*FIND ALL REFS*/[|globalAlias|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobalsInExternalModule.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobalsInExternalModule.baseline.jsonc new file mode 100644 index 0000000000..73e1bc6410 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForGlobalsInExternalModule.baseline.jsonc @@ -0,0 +1,159 @@ +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// /*FIND ALL REFS*/var topLevelVar = 2; +// var topLevelVar2 = topLevelVar; +// +// class topLevelClass { } +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// var /*FIND ALL REFS*/[|topLevelVar|] = 2; +// var topLevelVar2 = [|topLevelVar|]; +// +// class topLevelClass { } +// var c = new topLevelClass(); +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// var [|topLevelVar|] = 2; +// var topLevelVar2 = /*FIND ALL REFS*/[|topLevelVar|]; +// +// class topLevelClass { } +// var c = new topLevelClass(); +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// var topLevelVar = 2; +// var topLevelVar2 = topLevelVar; +// +// /*FIND ALL REFS*/class topLevelClass { } +// var c = new topLevelClass(); +// +// interface topLevelInterface { } +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// var topLevelVar = 2; +// var topLevelVar2 = topLevelVar; +// +// class /*FIND ALL REFS*/[|topLevelClass|] { } +// var c = new [|topLevelClass|](); +// +// interface topLevelInterface { } +// var i: topLevelInterface; +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// var topLevelVar = 2; +// var topLevelVar2 = topLevelVar; +// +// class [|topLevelClass|] { } +// var c = new /*FIND ALL REFS*/[|topLevelClass|](); +// +// interface topLevelInterface { } +// var i: topLevelInterface; +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// --- (line: 3) skipped --- +// class topLevelClass { } +// var c = new topLevelClass(); +// +// /*FIND ALL REFS*/interface topLevelInterface { } +// var i: topLevelInterface; +// +// module topLevelModule { +// // --- (line: 11) skipped --- + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// --- (line: 3) skipped --- +// class topLevelClass { } +// var c = new topLevelClass(); +// +// interface /*FIND ALL REFS*/[|topLevelInterface|] { } +// var i: [|topLevelInterface|]; +// +// module topLevelModule { +// export var x; +// // --- (line: 12) skipped --- + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// --- (line: 3) skipped --- +// class topLevelClass { } +// var c = new topLevelClass(); +// +// interface [|topLevelInterface|] { } +// var i: /*FIND ALL REFS*/[|topLevelInterface|]; +// +// module topLevelModule { +// export var x; +// // --- (line: 12) skipped --- + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// --- (line: 6) skipped --- +// interface topLevelInterface { } +// var i: topLevelInterface; +// +// /*FIND ALL REFS*/module topLevelModule { +// export var x; +// } +// var x = topLevelModule.x; +// +// export = x; + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// --- (line: 6) skipped --- +// interface topLevelInterface { } +// var i: topLevelInterface; +// +// module /*FIND ALL REFS*/[|topLevelModule|] { +// export var x; +// } +// var x = [|topLevelModule|].x; +// +// export = x; + + + +// === findAllReferences === +// === /referencesForGlobalsInExternalModule.ts === +// --- (line: 6) skipped --- +// interface topLevelInterface { } +// var i: topLevelInterface; +// +// module [|topLevelModule|] { +// export var x; +// } +// var x = /*FIND ALL REFS*/[|topLevelModule|].x; +// +// export = x; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForIllegalAssignment.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForIllegalAssignment.baseline.jsonc new file mode 100644 index 0000000000..d93532f71d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForIllegalAssignment.baseline.jsonc @@ -0,0 +1,21 @@ +// === findAllReferences === +// === /referencesForIllegalAssignment.ts === +// f/*FIND ALL REFS*/oo = foo; +// var bar = function () { }; +// bar = bar + 1; + + + +// === findAllReferences === +// === /referencesForIllegalAssignment.ts === +// foo = fo/*FIND ALL REFS*/o; +// var bar = function () { }; +// bar = bar + 1; + + + +// === findAllReferences === +// === /referencesForIllegalAssignment.ts === +// foo = foo; +// var /*FIND ALL REFS*/[|bar|] = function () { }; +// [|bar|] = [|bar|] + 1; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForImports.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForImports.baseline.jsonc new file mode 100644 index 0000000000..81aaedb024 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForImports.baseline.jsonc @@ -0,0 +1,53 @@ +// === findAllReferences === +// === /referencesForImports.ts === +// declare module "jquery" { +// function $(s: string): any; +// export = $; +// } +// /*FIND ALL REFS*/import $ = require("jquery"); +// $("a"); +// import $ = require("jquery"); + + + +// === findAllReferences === +// === /referencesForImports.ts === +// declare module "jquery" { +// function $(s: string): any; +// export = $; +// } +// import /*FIND ALL REFS*/[|$|] = require("jquery"); +// [|$|]("a"); +// import $ = require("jquery"); + + + +// === findAllReferences === +// === /referencesForImports.ts === +// declare module "jquery" { +// function $(s: string): any; +// export = $; +// } +// import [|$|] = require("jquery"); +// /*FIND ALL REFS*/[|$|]("a"); +// import $ = require("jquery"); + + + +// === findAllReferences === +// === /referencesForImports.ts === +// --- (line: 3) skipped --- +// } +// import $ = require("jquery"); +// $("a"); +// /*FIND ALL REFS*/import $ = require("jquery"); + + + +// === findAllReferences === +// === /referencesForImports.ts === +// --- (line: 3) skipped --- +// } +// import $ = require("jquery"); +// $("a"); +// import /*FIND ALL REFS*/[|$|] = require("jquery"); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForIndexProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForIndexProperty.baseline.jsonc new file mode 100644 index 0000000000..1ded639d70 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForIndexProperty.baseline.jsonc @@ -0,0 +1,49 @@ +// === findAllReferences === +// === /referencesForIndexProperty.ts === +// class Foo { +// /*FIND ALL REFS*/[|property|]: number; +// method(): void { } +// } +// +// var f: Foo; +// f["[|property|]"]; +// f["method"]; + + + +// === findAllReferences === +// === /referencesForIndexProperty.ts === +// class Foo { +// property: number; +// /*FIND ALL REFS*/[|method|](): void { } +// } +// +// var f: Foo; +// f["property"]; +// f["[|method|]"]; + + + +// === findAllReferences === +// === /referencesForIndexProperty.ts === +// class Foo { +// [|property|]: number; +// method(): void { } +// } +// +// var f: Foo; +// f["/*FIND ALL REFS*/[|property|]"]; +// f["method"]; + + + +// === findAllReferences === +// === /referencesForIndexProperty.ts === +// class Foo { +// property: number; +// [|method|](): void { } +// } +// +// var f: Foo; +// f["property"]; +// f["/*FIND ALL REFS*/[|method|]"]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForIndexProperty2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForIndexProperty2.baseline.jsonc new file mode 100644 index 0000000000..85224ee567 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForIndexProperty2.baseline.jsonc @@ -0,0 +1,4 @@ +// === findAllReferences === +// === /referencesForIndexProperty2.ts === +// var a; +// a["/*FIND ALL REFS*/blah"]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForIndexProperty3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForIndexProperty3.baseline.jsonc new file mode 100644 index 0000000000..682a16fa69 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForIndexProperty3.baseline.jsonc @@ -0,0 +1,39 @@ +// === findAllReferences === +// === /referencesForIndexProperty3.ts === +// interface Object { +// /*FIND ALL REFS*/[|toMyString|](); +// } +// +// var y: Object; +// y.[|toMyString|](); +// +// var x = {}; +// x["[|toMyString|]"](); + + + +// === findAllReferences === +// === /referencesForIndexProperty3.ts === +// interface Object { +// [|toMyString|](); +// } +// +// var y: Object; +// y./*FIND ALL REFS*/[|toMyString|](); +// +// var x = {}; +// x["[|toMyString|]"](); + + + +// === findAllReferences === +// === /referencesForIndexProperty3.ts === +// interface Object { +// [|toMyString|](); +// } +// +// var y: Object; +// y.[|toMyString|](); +// +// var x = {}; +// x["/*FIND ALL REFS*/[|toMyString|]"](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties.baseline.jsonc new file mode 100644 index 0000000000..293d6351e9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties.baseline.jsonc @@ -0,0 +1,97 @@ +// === findAllReferences === +// === /referencesForInheritedProperties.ts === +// interface interface1 { +// /*FIND ALL REFS*/[|doStuff|](): void; +// } +// +// interface interface2 extends interface1{ +// [|doStuff|](): void; +// } +// +// class class1 implements interface2 { +// [|doStuff|]() { +// +// } +// } +// +// class class2 extends class1 { +// +// } +// +// var v: class2; +// v.[|doStuff|](); + + + +// === findAllReferences === +// === /referencesForInheritedProperties.ts === +// interface interface1 { +// [|doStuff|](): void; +// } +// +// interface interface2 extends interface1{ +// /*FIND ALL REFS*/[|doStuff|](): void; +// } +// +// class class1 implements interface2 { +// [|doStuff|]() { +// +// } +// } +// +// class class2 extends class1 { +// +// } +// +// var v: class2; +// v.[|doStuff|](); + + + +// === findAllReferences === +// === /referencesForInheritedProperties.ts === +// interface interface1 { +// [|doStuff|](): void; +// } +// +// interface interface2 extends interface1{ +// [|doStuff|](): void; +// } +// +// class class1 implements interface2 { +// /*FIND ALL REFS*/[|doStuff|]() { +// +// } +// } +// +// class class2 extends class1 { +// +// } +// +// var v: class2; +// v.[|doStuff|](); + + + +// === findAllReferences === +// === /referencesForInheritedProperties.ts === +// interface interface1 { +// [|doStuff|](): void; +// } +// +// interface interface2 extends interface1{ +// [|doStuff|](): void; +// } +// +// class class1 implements interface2 { +// [|doStuff|]() { +// +// } +// } +// +// class class2 extends class1 { +// +// } +// +// var v: class2; +// v./*FIND ALL REFS*/[|doStuff|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties2.baseline.jsonc new file mode 100644 index 0000000000..e34fca6cd0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties2.baseline.jsonc @@ -0,0 +1,25 @@ +// === findAllReferences === +// === /referencesForInheritedProperties2.ts === +// interface interface1 { +// /*FIND ALL REFS*/[|doStuff|](): void; +// } +// +// interface interface2 { +// [|doStuff|](): void; +// } +// +// interface interface2 extends interface1 { +// } +// +// class class1 implements interface2 { +// [|doStuff|]() { +// +// } +// } +// +// class class2 extends class1 { +// +// } +// +// var v: class2; +// v.[|doStuff|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties3.baseline.jsonc new file mode 100644 index 0000000000..19d90b93c7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties3.baseline.jsonc @@ -0,0 +1,49 @@ +// === findAllReferences === +// === /referencesForInheritedProperties3.ts === +// interface interface1 extends interface1 { +// /*FIND ALL REFS*/[|doStuff|](): void; +// propName: string; +// } +// +// var v: interface1; +// v.propName; +// v.[|doStuff|](); + + + +// === findAllReferences === +// === /referencesForInheritedProperties3.ts === +// interface interface1 extends interface1 { +// doStuff(): void; +// /*FIND ALL REFS*/[|propName|]: string; +// } +// +// var v: interface1; +// v.[|propName|]; +// v.doStuff(); + + + +// === findAllReferences === +// === /referencesForInheritedProperties3.ts === +// interface interface1 extends interface1 { +// doStuff(): void; +// [|propName|]: string; +// } +// +// var v: interface1; +// v./*FIND ALL REFS*/[|propName|]; +// v.doStuff(); + + + +// === findAllReferences === +// === /referencesForInheritedProperties3.ts === +// interface interface1 extends interface1 { +// [|doStuff|](): void; +// propName: string; +// } +// +// var v: interface1; +// v.propName; +// v./*FIND ALL REFS*/[|doStuff|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties4.baseline.jsonc new file mode 100644 index 0000000000..3a6c2a0e04 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties4.baseline.jsonc @@ -0,0 +1,49 @@ +// === findAllReferences === +// === /referencesForInheritedProperties4.ts === +// class class1 extends class1 { +// /*FIND ALL REFS*/[|doStuff|]() { } +// propName: string; +// } +// +// var c: class1; +// c.[|doStuff|](); +// c.propName; + + + +// === findAllReferences === +// === /referencesForInheritedProperties4.ts === +// class class1 extends class1 { +// doStuff() { } +// /*FIND ALL REFS*/[|propName|]: string; +// } +// +// var c: class1; +// c.doStuff(); +// c.[|propName|]; + + + +// === findAllReferences === +// === /referencesForInheritedProperties4.ts === +// class class1 extends class1 { +// [|doStuff|]() { } +// propName: string; +// } +// +// var c: class1; +// c./*FIND ALL REFS*/[|doStuff|](); +// c.propName; + + + +// === findAllReferences === +// === /referencesForInheritedProperties4.ts === +// class class1 extends class1 { +// doStuff() { } +// [|propName|]: string; +// } +// +// var c: class1; +// c.doStuff(); +// c./*FIND ALL REFS*/[|propName|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties5.baseline.jsonc new file mode 100644 index 0000000000..3c9123193e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties5.baseline.jsonc @@ -0,0 +1,31 @@ +// === findAllReferences === +// === /referencesForInheritedProperties5.ts === +// interface interface1 extends interface1 { +// /*FIND ALL REFS*/[|doStuff|](): void; +// propName: string; +// } +// interface interface2 extends interface1 { +// [|doStuff|](): void; +// propName: string; +// } +// +// var v: interface1; +// v.propName; +// v.[|doStuff|](); + + + +// === findAllReferences === +// === /referencesForInheritedProperties5.ts === +// interface interface1 extends interface1 { +// doStuff(): void; +// /*FIND ALL REFS*/[|propName|]: string; +// } +// interface interface2 extends interface1 { +// doStuff(): void; +// [|propName|]: string; +// } +// +// var v: interface1; +// v.[|propName|]; +// v.doStuff(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties6.baseline.jsonc new file mode 100644 index 0000000000..7234ace5af --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties6.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /referencesForInheritedProperties6.ts === +// class class1 extends class1 { +// /*FIND ALL REFS*/[|doStuff|]() { } +// } +// class class2 extends class1 { +// [|doStuff|]() { } +// } +// +// var v: class2; +// v.[|doStuff|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties7.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties7.baseline.jsonc new file mode 100644 index 0000000000..78bfa8e7bc --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties7.baseline.jsonc @@ -0,0 +1,121 @@ +// === findAllReferences === +// === /referencesForInheritedProperties7.ts === +// class class1 extends class1 { +// /*FIND ALL REFS*/[|doStuff|]() { } +// propName: string; +// } +// interface interface1 extends interface1 { +// doStuff(): void; +// propName: string; +// } +// class class2 extends class1 implements interface1 { +// [|doStuff|]() { } +// propName: string; +// } +// +// var v: class2; +// v.[|doStuff|](); +// v.propName; + + + +// === findAllReferences === +// === /referencesForInheritedProperties7.ts === +// class class1 extends class1 { +// doStuff() { } +// /*FIND ALL REFS*/[|propName|]: string; +// } +// interface interface1 extends interface1 { +// doStuff(): void; +// propName: string; +// } +// class class2 extends class1 implements interface1 { +// doStuff() { } +// [|propName|]: string; +// } +// +// var v: class2; +// v.doStuff(); +// v.[|propName|]; + + + +// === findAllReferences === +// === /referencesForInheritedProperties7.ts === +// class class1 extends class1 { +// doStuff() { } +// propName: string; +// } +// interface interface1 extends interface1 { +// /*FIND ALL REFS*/[|doStuff|](): void; +// propName: string; +// } +// class class2 extends class1 implements interface1 { +// [|doStuff|]() { } +// propName: string; +// } +// +// var v: class2; +// v.[|doStuff|](); +// v.propName; + + + +// === findAllReferences === +// === /referencesForInheritedProperties7.ts === +// --- (line: 3) skipped --- +// } +// interface interface1 extends interface1 { +// doStuff(): void; +// /*FIND ALL REFS*/[|propName|]: string; +// } +// class class2 extends class1 implements interface1 { +// doStuff() { } +// [|propName|]: string; +// } +// +// var v: class2; +// v.doStuff(); +// v.[|propName|]; + + + +// === findAllReferences === +// === /referencesForInheritedProperties7.ts === +// class class1 extends class1 { +// [|doStuff|]() { } +// propName: string; +// } +// interface interface1 extends interface1 { +// [|doStuff|](): void; +// propName: string; +// } +// class class2 extends class1 implements interface1 { +// /*FIND ALL REFS*/[|doStuff|]() { } +// propName: string; +// } +// +// var v: class2; +// v.[|doStuff|](); +// v.propName; + + + +// === findAllReferences === +// === /referencesForInheritedProperties7.ts === +// class class1 extends class1 { +// doStuff() { } +// [|propName|]: string; +// } +// interface interface1 extends interface1 { +// doStuff(): void; +// [|propName|]: string; +// } +// class class2 extends class1 implements interface1 { +// doStuff() { } +// /*FIND ALL REFS*/[|propName|]: string; +// } +// +// var v: class2; +// v.doStuff(); +// v.[|propName|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties8.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties8.baseline.jsonc new file mode 100644 index 0000000000..972d4a33d9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties8.baseline.jsonc @@ -0,0 +1,27 @@ +// === findAllReferences === +// === /referencesForInheritedProperties8.ts === +// interface C extends D { +// /*FIND ALL REFS*/[|propD|]: number; +// } +// interface D extends C { +// [|propD|]: string; +// propC: number; +// } +// var d: D; +// d.[|propD|]; +// d.propC; + + + +// === findAllReferences === +// === /referencesForInheritedProperties8.ts === +// interface C extends D { +// propD: number; +// } +// interface D extends C { +// propD: string; +// /*FIND ALL REFS*/[|propC|]: number; +// } +// var d: D; +// d.propD; +// d.[|propC|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties9.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties9.baseline.jsonc new file mode 100644 index 0000000000..fa5cd78b48 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForInheritedProperties9.baseline.jsonc @@ -0,0 +1,38 @@ +// === findAllReferences === +// === /referencesForInheritedProperties9.ts === +// class D extends C { +// /*FIND ALL REFS*/[|prop1|]: string; +// } +// +// class C extends D { +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /referencesForInheritedProperties9.ts === +// class D extends C { +// prop1: string; +// } +// +// class C extends D { +// /*FIND ALL REFS*/[|prop1|]: string; +// } +// +// var c: C; +// c.[|prop1|]; + + + +// === findAllReferences === +// === /referencesForInheritedProperties9.ts === +// class D extends C { +// prop1: string; +// } +// +// class C extends D { +// [|prop1|]: string; +// } +// +// var c: C; +// c./*FIND ALL REFS*/[|prop1|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel.baseline.jsonc new file mode 100644 index 0000000000..783462c95b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel.baseline.jsonc @@ -0,0 +1,69 @@ +// === findAllReferences === +// === /referencesForLabel.ts === +// /*FIND ALL REFS*/[|label|]: while (true) { +// if (false) break [|label|]; +// if (true) continue [|label|]; +// } +// +// label: while (false) { } +// var label = "label"; + + + +// === findAllReferences === +// === /referencesForLabel.ts === +// label: while (true) { +// if (false) /*FIND ALL REFS*/break label; +// if (true) continue label; +// } +// +// label: while (false) { } +// var label = "label"; + + + +// === findAllReferences === +// === /referencesForLabel.ts === +// [|label|]: while (true) { +// if (false) break /*FIND ALL REFS*/[|label|]; +// if (true) continue [|label|]; +// } +// +// label: while (false) { } +// var label = "label"; + + + +// === findAllReferences === +// === /referencesForLabel.ts === +// label: while (true) { +// if (false) break label; +// if (true) /*FIND ALL REFS*/continue label; +// } +// +// label: while (false) { } +// var label = "label"; + + + +// === findAllReferences === +// === /referencesForLabel.ts === +// [|label|]: while (true) { +// if (false) break [|label|]; +// if (true) continue /*FIND ALL REFS*/[|label|]; +// } +// +// label: while (false) { } +// var label = "label"; + + + +// === findAllReferences === +// === /referencesForLabel.ts === +// label: while (true) { +// if (false) break label; +// if (true) continue label; +// } +// +// /*FIND ALL REFS*/[|label|]: while (false) { } +// var label = "label"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel2.baseline.jsonc new file mode 100644 index 0000000000..c68d6f1c66 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel2.baseline.jsonc @@ -0,0 +1,7 @@ +// === findAllReferences === +// === /referencesForLabel2.ts === +// var label = "label"; +// while (true) { +// if (false) break /*FIND ALL REFS*/label; +// if (true) continue label; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel3.baseline.jsonc new file mode 100644 index 0000000000..e86a78b6b3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel3.baseline.jsonc @@ -0,0 +1,5 @@ +// === findAllReferences === +// === /referencesForLabel3.ts === +// /*FIND ALL REFS*/[|label|]: while (true) { +// var label = "label"; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel4.baseline.jsonc new file mode 100644 index 0000000000..fc1db350cf --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel4.baseline.jsonc @@ -0,0 +1,27 @@ +// === findAllReferences === +// === /referencesForLabel4.ts === +// /*FIND ALL REFS*/[|label|]: function foo(label) { +// while (true) { +// break [|label|]; +// } +// } + + + +// === findAllReferences === +// === /referencesForLabel4.ts === +// label: function foo(label) { +// while (true) { +// /*FIND ALL REFS*/break label; +// } +// } + + + +// === findAllReferences === +// === /referencesForLabel4.ts === +// [|label|]: function foo(label) { +// while (true) { +// break /*FIND ALL REFS*/[|label|]; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel5.baseline.jsonc new file mode 100644 index 0000000000..4b0e54b03e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel5.baseline.jsonc @@ -0,0 +1,103 @@ +// === findAllReferences === +// === /referencesForLabel5.ts === +// /*FIND ALL REFS*/[|label|]: while (true) { +// if (false) break [|label|]; +// function blah() { +// label: while (true) { +// if (false) break label; +// } +// } +// if (false) break [|label|]; +// } + + + +// === findAllReferences === +// === /referencesForLabel5.ts === +// label: while (true) { +// if (false) /*FIND ALL REFS*/break label; +// function blah() { +// label: while (true) { +// if (false) break label; +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /referencesForLabel5.ts === +// [|label|]: while (true) { +// if (false) break /*FIND ALL REFS*/[|label|]; +// function blah() { +// label: while (true) { +// if (false) break label; +// } +// } +// if (false) break [|label|]; +// } + + + +// === findAllReferences === +// === /referencesForLabel5.ts === +// label: while (true) { +// if (false) break label; +// function blah() { +// /*FIND ALL REFS*/[|label|]: while (true) { +// if (false) break [|label|]; +// } +// } +// if (false) break label; +// } + + + +// === findAllReferences === +// === /referencesForLabel5.ts === +// label: while (true) { +// if (false) break label; +// function blah() { +// label: while (true) { +// if (false) /*FIND ALL REFS*/break label; +// } +// } +// if (false) break label; +// } + + + +// === findAllReferences === +// === /referencesForLabel5.ts === +// label: while (true) { +// if (false) break label; +// function blah() { +// [|label|]: while (true) { +// if (false) break /*FIND ALL REFS*/[|label|]; +// } +// } +// if (false) break label; +// } + + + +// === findAllReferences === +// === /referencesForLabel5.ts === +// --- (line: 4) skipped --- +// if (false) break label; +// } +// } +// if (false) /*FIND ALL REFS*/break label; +// } + + + +// === findAllReferences === +// === /referencesForLabel5.ts === +// [|label|]: while (true) { +// if (false) break [|label|]; +// function blah() { +// label: while (true) { +// if (false) break label; +// } +// } +// if (false) break /*FIND ALL REFS*/[|label|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel6.baseline.jsonc new file mode 100644 index 0000000000..0d9f5a80dc --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForLabel6.baseline.jsonc @@ -0,0 +1,33 @@ +// === findAllReferences === +// === /referencesForLabel6.ts === +// /*FIND ALL REFS*/[|labela|]: while (true) { +// labelb: while (false) { break labelb; } +// break labelc; +// } + + + +// === findAllReferences === +// === /referencesForLabel6.ts === +// labela: while (true) { +// /*FIND ALL REFS*/[|labelb|]: while (false) { break [|labelb|]; } +// break labelc; +// } + + + +// === findAllReferences === +// === /referencesForLabel6.ts === +// labela: while (true) { +// labelb: while (false) { /*FIND ALL REFS*/break labelb; } +// break labelc; +// } + + + +// === findAllReferences === +// === /referencesForLabel6.ts === +// labela: while (true) { +// [|labelb|]: while (false) { break /*FIND ALL REFS*/[|labelb|]; } +// break labelc; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations.baseline.jsonc new file mode 100644 index 0000000000..9a876c8f4b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations.baseline.jsonc @@ -0,0 +1,135 @@ +// === findAllReferences === +// === /referencesForMergedDeclarations.ts === +// /*FIND ALL REFS*/interface Foo { +// } +// +// module Foo { +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /referencesForMergedDeclarations.ts === +// interface /*FIND ALL REFS*/[|Foo|] { +// } +// +// module Foo { +// // --- (line: 5) skipped --- + +// --- (line: 8) skipped --- +// } +// +// var f1: Foo.Bar; +// var f2: [|Foo|]; +// Foo.bind(this); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations.ts === +// interface Foo { +// } +// +// /*FIND ALL REFS*/module Foo { +// export interface Bar { } +// } +// +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /referencesForMergedDeclarations.ts === +// interface Foo { +// } +// +// module /*FIND ALL REFS*/[|Foo|] { +// export interface Bar { } +// } +// +// function Foo(): void { +// } +// +// var f1: [|Foo|].Bar; +// var f2: Foo; +// Foo.bind(this); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations.ts === +// --- (line: 4) skipped --- +// export interface Bar { } +// } +// +// /*FIND ALL REFS*/function Foo(): void { +// } +// +// var f1: Foo.Bar; +// var f2: Foo; +// Foo.bind(this); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations.ts === +// --- (line: 4) skipped --- +// export interface Bar { } +// } +// +// function /*FIND ALL REFS*/[|Foo|](): void { +// } +// +// var f1: Foo.Bar; +// var f2: Foo; +// [|Foo|].bind(this); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations.ts === +// interface Foo { +// } +// +// module [|Foo|] { +// export interface Bar { } +// } +// +// function Foo(): void { +// } +// +// var f1: /*FIND ALL REFS*/[|Foo|].Bar; +// var f2: Foo; +// Foo.bind(this); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations.ts === +// interface [|Foo|] { +// } +// +// module Foo { +// // --- (line: 5) skipped --- + +// --- (line: 8) skipped --- +// } +// +// var f1: Foo.Bar; +// var f2: /*FIND ALL REFS*/[|Foo|]; +// Foo.bind(this); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations.ts === +// --- (line: 4) skipped --- +// export interface Bar { } +// } +// +// function [|Foo|](): void { +// } +// +// var f1: Foo.Bar; +// var f2: Foo; +// /*FIND ALL REFS*/[|Foo|].bind(this); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations2.baseline.jsonc new file mode 100644 index 0000000000..377113b9d1 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations2.baseline.jsonc @@ -0,0 +1,49 @@ +// === findAllReferences === +// === /referencesForMergedDeclarations2.ts === +// --- (line: 3) skipped --- +// +// function ATest() { } +// +// /*FIND ALL REFS*/import alias = ATest; // definition +// +// var a: alias.Bar; // namespace +// alias.call(this); // value + + + +// === findAllReferences === +// === /referencesForMergedDeclarations2.ts === +// --- (line: 3) skipped --- +// +// function ATest() { } +// +// import /*FIND ALL REFS*/[|alias|] = ATest; // definition +// +// var a: [|alias|].Bar; // namespace +// [|alias|].call(this); // value + + + +// === findAllReferences === +// === /referencesForMergedDeclarations2.ts === +// --- (line: 3) skipped --- +// +// function ATest() { } +// +// import [|alias|] = ATest; // definition +// +// var a: /*FIND ALL REFS*/[|alias|].Bar; // namespace +// [|alias|].call(this); // value + + + +// === findAllReferences === +// === /referencesForMergedDeclarations2.ts === +// --- (line: 3) skipped --- +// +// function ATest() { } +// +// import [|alias|] = ATest; // definition +// +// var a: [|alias|].Bar; // namespace +// /*FIND ALL REFS*/[|alias|].call(this); // value \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations3.baseline.jsonc new file mode 100644 index 0000000000..1fc1969780 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations3.baseline.jsonc @@ -0,0 +1,40 @@ +// === findAllReferences === +// === /referencesForMergedDeclarations3.ts === +// class testClass { +// static staticMethod() { } +// method() { } +// } +// +// module /*FIND ALL REFS*/[|testClass|] { +// export interface Bar { +// +// } +// } +// +// var c1: testClass; +// var c2: [|testClass|].Bar; +// testClass.staticMethod(); +// testClass.prototype.method(); +// testClass.bind(this); +// new testClass(); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations3.ts === +// class /*FIND ALL REFS*/[|testClass|] { +// static staticMethod() { } +// method() { } +// } +// // --- (line: 5) skipped --- + +// --- (line: 8) skipped --- +// } +// } +// +// var c1: [|testClass|]; +// var c2: testClass.Bar; +// [|testClass|].staticMethod(); +// [|testClass|].prototype.method(); +// [|testClass|].bind(this); +// new [|testClass|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations4.baseline.jsonc new file mode 100644 index 0000000000..fc54de7f4b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations4.baseline.jsonc @@ -0,0 +1,238 @@ +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// /*FIND ALL REFS*/class testClass { +// static staticMethod() { } +// method() { } +// } +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// class /*FIND ALL REFS*/[|testClass|] { +// static staticMethod() { } +// method() { } +// } +// +// module [|testClass|] { +// export interface Bar { +// +// } +// export var s = 0; +// } +// +// var c1: [|testClass|]; +// var c2: [|testClass|].Bar; +// [|testClass|].staticMethod(); +// [|testClass|].prototype.method(); +// [|testClass|].bind(this); +// [|testClass|].s; +// new [|testClass|](); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// class testClass { +// static staticMethod() { } +// method() { } +// } +// +// /*FIND ALL REFS*/module testClass { +// export interface Bar { +// +// } +// // --- (line: 10) skipped --- + + + +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// class [|testClass|] { +// static staticMethod() { } +// method() { } +// } +// +// module /*FIND ALL REFS*/[|testClass|] { +// export interface Bar { +// +// } +// export var s = 0; +// } +// +// var c1: [|testClass|]; +// var c2: [|testClass|].Bar; +// [|testClass|].staticMethod(); +// [|testClass|].prototype.method(); +// [|testClass|].bind(this); +// [|testClass|].s; +// new [|testClass|](); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// class [|testClass|] { +// static staticMethod() { } +// method() { } +// } +// +// module [|testClass|] { +// export interface Bar { +// +// } +// export var s = 0; +// } +// +// var c1: /*FIND ALL REFS*/[|testClass|]; +// var c2: [|testClass|].Bar; +// [|testClass|].staticMethod(); +// [|testClass|].prototype.method(); +// [|testClass|].bind(this); +// [|testClass|].s; +// new [|testClass|](); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// class [|testClass|] { +// static staticMethod() { } +// method() { } +// } +// +// module [|testClass|] { +// export interface Bar { +// +// } +// export var s = 0; +// } +// +// var c1: [|testClass|]; +// var c2: /*FIND ALL REFS*/[|testClass|].Bar; +// [|testClass|].staticMethod(); +// [|testClass|].prototype.method(); +// [|testClass|].bind(this); +// [|testClass|].s; +// new [|testClass|](); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// class [|testClass|] { +// static staticMethod() { } +// method() { } +// } +// +// module [|testClass|] { +// export interface Bar { +// +// } +// export var s = 0; +// } +// +// var c1: [|testClass|]; +// var c2: [|testClass|].Bar; +// /*FIND ALL REFS*/[|testClass|].staticMethod(); +// [|testClass|].prototype.method(); +// [|testClass|].bind(this); +// [|testClass|].s; +// new [|testClass|](); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// class [|testClass|] { +// static staticMethod() { } +// method() { } +// } +// +// module [|testClass|] { +// export interface Bar { +// +// } +// export var s = 0; +// } +// +// var c1: [|testClass|]; +// var c2: [|testClass|].Bar; +// [|testClass|].staticMethod(); +// /*FIND ALL REFS*/[|testClass|].prototype.method(); +// [|testClass|].bind(this); +// [|testClass|].s; +// new [|testClass|](); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// class [|testClass|] { +// static staticMethod() { } +// method() { } +// } +// +// module [|testClass|] { +// export interface Bar { +// +// } +// export var s = 0; +// } +// +// var c1: [|testClass|]; +// var c2: [|testClass|].Bar; +// [|testClass|].staticMethod(); +// [|testClass|].prototype.method(); +// /*FIND ALL REFS*/[|testClass|].bind(this); +// [|testClass|].s; +// new [|testClass|](); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// class [|testClass|] { +// static staticMethod() { } +// method() { } +// } +// +// module [|testClass|] { +// export interface Bar { +// +// } +// export var s = 0; +// } +// +// var c1: [|testClass|]; +// var c2: [|testClass|].Bar; +// [|testClass|].staticMethod(); +// [|testClass|].prototype.method(); +// [|testClass|].bind(this); +// /*FIND ALL REFS*/[|testClass|].s; +// new [|testClass|](); + + + +// === findAllReferences === +// === /referencesForMergedDeclarations4.ts === +// class [|testClass|] { +// static staticMethod() { } +// method() { } +// } +// +// module [|testClass|] { +// export interface Bar { +// +// } +// export var s = 0; +// } +// +// var c1: [|testClass|]; +// var c2: [|testClass|].Bar; +// [|testClass|].staticMethod(); +// [|testClass|].prototype.method(); +// [|testClass|].bind(this); +// [|testClass|].s; +// new /*FIND ALL REFS*/[|testClass|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations5.baseline.jsonc new file mode 100644 index 0000000000..abf381b396 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations5.baseline.jsonc @@ -0,0 +1,37 @@ +// === findAllReferences === +// === /referencesForMergedDeclarations5.ts === +// interface /*FIND ALL REFS*/[|Foo|] { } +// module Foo { export interface Bar { } } +// function Foo() { } +// +// export = Foo; + + + +// === findAllReferences === +// === /referencesForMergedDeclarations5.ts === +// interface Foo { } +// module /*FIND ALL REFS*/[|Foo|] { export interface Bar { } } +// function Foo() { } +// +// export = Foo; + + + +// === findAllReferences === +// === /referencesForMergedDeclarations5.ts === +// interface Foo { } +// module Foo { export interface Bar { } } +// function /*FIND ALL REFS*/[|Foo|]() { } +// +// export = [|Foo|]; + + + +// === findAllReferences === +// === /referencesForMergedDeclarations5.ts === +// interface Foo { } +// module Foo { export interface Bar { } } +// function [|Foo|]() { } +// +// export = /*FIND ALL REFS*/[|Foo|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations6.baseline.jsonc new file mode 100644 index 0000000000..f7f9fd6965 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations6.baseline.jsonc @@ -0,0 +1,36 @@ +// === findAllReferences === +// === /referencesForMergedDeclarations6.ts === +// interface Foo { } +// /*FIND ALL REFS*/module Foo { +// export interface Bar { } +// export module Bar { export interface Baz { } } +// export function Bar() { } +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /referencesForMergedDeclarations6.ts === +// interface Foo { } +// module /*FIND ALL REFS*/[|Foo|] { +// export interface Bar { } +// export module Bar { export interface Baz { } } +// export function Bar() { } +// } +// +// // module +// import a1 = [|Foo|]; + + + +// === findAllReferences === +// === /referencesForMergedDeclarations6.ts === +// interface Foo { } +// module [|Foo|] { +// export interface Bar { } +// export module Bar { export interface Baz { } } +// export function Bar() { } +// } +// +// // module +// import a1 = /*FIND ALL REFS*/[|Foo|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations7.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations7.baseline.jsonc new file mode 100644 index 0000000000..5f4172f80a --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations7.baseline.jsonc @@ -0,0 +1,51 @@ +// === findAllReferences === +// === /referencesForMergedDeclarations7.ts === +// interface Foo { } +// module Foo { +// export interface /*FIND ALL REFS*/[|Bar|] { } +// export module Bar { export interface Baz { } } +// export function Bar() { } +// } +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /referencesForMergedDeclarations7.ts === +// interface Foo { } +// module Foo { +// export interface Bar { } +// export module /*FIND ALL REFS*/[|Bar|] { export interface Baz { } } +// export function Bar() { } +// } +// +// // module, value and type +// import a2 = Foo.[|Bar|]; + + + +// === findAllReferences === +// === /referencesForMergedDeclarations7.ts === +// interface Foo { } +// module Foo { +// export interface Bar { } +// export module Bar { export interface Baz { } } +// export function /*FIND ALL REFS*/[|Bar|]() { } +// } +// +// // module, value and type +// import a2 = Foo.Bar; + + + +// === findAllReferences === +// === /referencesForMergedDeclarations7.ts === +// interface Foo { } +// module Foo { +// export interface Bar { } +// export module [|Bar|] { export interface Baz { } } +// export function Bar() { } +// } +// +// // module, value and type +// import a2 = Foo./*FIND ALL REFS*/[|Bar|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations8.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations8.baseline.jsonc new file mode 100644 index 0000000000..ce8d974534 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForMergedDeclarations8.baseline.jsonc @@ -0,0 +1,39 @@ +// === findAllReferences === +// === /referencesForMergedDeclarations8.ts === +// interface Foo { } +// module Foo { +// export interface Bar { } +// /*FIND ALL REFS*/export module Bar { export interface Baz { } } +// export function Bar() { } +// } +// +// // module +// import a3 = Foo.Bar.Baz; + + + +// === findAllReferences === +// === /referencesForMergedDeclarations8.ts === +// interface Foo { } +// module Foo { +// export interface Bar { } +// export module /*FIND ALL REFS*/[|Bar|] { export interface Baz { } } +// export function Bar() { } +// } +// +// // module +// import a3 = Foo.[|Bar|].Baz; + + + +// === findAllReferences === +// === /referencesForMergedDeclarations8.ts === +// interface Foo { } +// module Foo { +// export interface [|Bar|] { } +// export module [|Bar|] { export interface Baz { } } +// export function [|Bar|]() { } +// } +// +// // module +// import a3 = Foo./*FIND ALL REFS*/[|Bar|].Baz; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForModifiers.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForModifiers.baseline.jsonc new file mode 100644 index 0000000000..b4505a6fce --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForModifiers.baseline.jsonc @@ -0,0 +1,127 @@ +// === findAllReferences === +// === /referencesForModifiers.ts === +// /*FIND ALL REFS*/declare abstract class C1 { +// static a; +// readonly b; +// public c; +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /referencesForModifiers.ts === +// declare /*FIND ALL REFS*/abstract class C1 { +// static a; +// readonly b; +// public c; +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /referencesForModifiers.ts === +// declare abstract class C1 { +// /*FIND ALL REFS*/static a; +// readonly b; +// public c; +// protected d; +// // --- (line: 6) skipped --- + + + +// === findAllReferences === +// === /referencesForModifiers.ts === +// declare abstract class C1 { +// static a; +// /*FIND ALL REFS*/readonly b; +// public c; +// protected d; +// private e; +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /referencesForModifiers.ts === +// declare abstract class C1 { +// static a; +// readonly b; +// /*FIND ALL REFS*/public c; +// protected d; +// private e; +// } +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /referencesForModifiers.ts === +// declare abstract class C1 { +// static a; +// readonly b; +// public c; +// /*FIND ALL REFS*/protected d; +// private e; +// } +// const enum E { +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /referencesForModifiers.ts === +// declare abstract class C1 { +// static a; +// readonly b; +// public c; +// protected d; +// /*FIND ALL REFS*/private e; +// } +// const enum E { +// } +// async function fn() {} +// export default class C2 {} + + + +// === findAllReferences === +// === /referencesForModifiers.ts === +// --- (line: 4) skipped --- +// protected d; +// private e; +// } +// /*FIND ALL REFS*/const enum E { +// } +// async function fn() {} +// export default class C2 {} + + + +// === findAllReferences === +// === /referencesForModifiers.ts === +// --- (line: 6) skipped --- +// } +// const enum E { +// } +// /*FIND ALL REFS*/async function fn() {} +// export default class C2 {} + + + +// === findAllReferences === +// === /referencesForModifiers.ts === +// --- (line: 7) skipped --- +// const enum E { +// } +// async function fn() {} +// /*FIND ALL REFS*/export default class C2 {} + + + +// === findAllReferences === +// === /referencesForModifiers.ts === +// --- (line: 7) skipped --- +// const enum E { +// } +// async function fn() {} +// export /*FIND ALL REFS*/default class C2 {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForNoContext.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForNoContext.baseline.jsonc new file mode 100644 index 0000000000..e164a992da --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForNoContext.baseline.jsonc @@ -0,0 +1,51 @@ +// === findAllReferences === +// === /referencesForNoContext.ts === +// module modTest { +// //Declare +// export var modVar:number; +// /*FIND ALL REFS*/ +// +// //Increments +// modVar++; +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /referencesForNoContext.ts === +// --- (line: 6) skipped --- +// modVar++; +// +// class testCls{ +// /*FIND ALL REFS*/ +// } +// +// function testFn(){ +// // --- (line: 14) skipped --- + + + +// === findAllReferences === +// === /referencesForNoContext.ts === +// --- (line: 12) skipped --- +// function testFn(){ +// //Increments +// modVar++; +// } /*FIND ALL REFS*/ +// +// module testMod { +// } +// } + + + +// === findAllReferences === +// === /referencesForNoContext.ts === +// --- (line: 13) skipped --- +// //Increments +// modVar++; +// } +// /*FIND ALL REFS*/ +// module testMod { +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForNumericLiteralPropertyNames.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForNumericLiteralPropertyNames.baseline.jsonc new file mode 100644 index 0000000000..a65dea2d3d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForNumericLiteralPropertyNames.baseline.jsonc @@ -0,0 +1,10 @@ +// === findAllReferences === +// === /referencesForNumericLiteralPropertyNames.ts === +// class Foo { +// public /*FIND ALL REFS*/[|12|]: any; +// } +// +// var x: Foo; +// x[[|12|]]; +// x = { "[|12|]": 0 }; +// x = { [|12|]: 0 }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForObjectLiteralProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForObjectLiteralProperties.baseline.jsonc new file mode 100644 index 0000000000..6a699f1bae --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForObjectLiteralProperties.baseline.jsonc @@ -0,0 +1,37 @@ +// === findAllReferences === +// === /referencesForObjectLiteralProperties.ts === +// var x = { /*FIND ALL REFS*/[|add|]: 0, b: "string" }; +// x["[|add|]"]; +// x.[|add|]; +// var y = x; +// y.[|add|]; + + + +// === findAllReferences === +// === /referencesForObjectLiteralProperties.ts === +// var x = { [|add|]: 0, b: "string" }; +// x["/*FIND ALL REFS*/[|add|]"]; +// x.[|add|]; +// var y = x; +// y.[|add|]; + + + +// === findAllReferences === +// === /referencesForObjectLiteralProperties.ts === +// var x = { [|add|]: 0, b: "string" }; +// x["[|add|]"]; +// x./*FIND ALL REFS*/[|add|]; +// var y = x; +// y.[|add|]; + + + +// === findAllReferences === +// === /referencesForObjectLiteralProperties.ts === +// var x = { [|add|]: 0, b: "string" }; +// x["[|add|]"]; +// x.[|add|]; +// var y = x; +// y./*FIND ALL REFS*/[|add|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForOverrides.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForOverrides.baseline.jsonc new file mode 100644 index 0000000000..8925d5d0da --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForOverrides.baseline.jsonc @@ -0,0 +1,160 @@ +// === findAllReferences === +// === /referencesForOverrides.ts === +// module FindRef3 { +// module SimpleClassTest { +// export class Foo { +// public /*FIND ALL REFS*/[|foo|](): void { +// } +// } +// export class Bar extends Foo { +// public [|foo|](): void { +// } +// } +// } +// // --- (line: 12) skipped --- + +// --- (line: 58) skipped --- +// +// function test() { +// var x = new SimpleClassTest.Bar(); +// x.[|foo|](); +// +// var y: SimpleInterfaceTest.IBar = null; +// y.ifoo(); +// // --- (line: 66) skipped --- + + + +// === findAllReferences === +// === /referencesForOverrides.ts === +// --- (line: 11) skipped --- +// +// module SimpleInterfaceTest { +// export interface IFoo { +// /*FIND ALL REFS*/[|ifoo|](): void; +// } +// export interface IBar extends IFoo { +// [|ifoo|](): void; +// } +// } +// +// // --- (line: 22) skipped --- + +// --- (line: 61) skipped --- +// x.foo(); +// +// var y: SimpleInterfaceTest.IBar = null; +// y.[|ifoo|](); +// +// var w: SimpleClassInterfaceTest.Bar = null; +// w.icfoo(); +// // --- (line: 69) skipped --- + + + +// === findAllReferences === +// === /referencesForOverrides.ts === +// --- (line: 20) skipped --- +// +// module SimpleClassInterfaceTest { +// export interface IFoo { +// /*FIND ALL REFS*/[|icfoo|](): void; +// } +// export class Bar implements IFoo { +// public [|icfoo|](): void { +// } +// } +// } +// // --- (line: 31) skipped --- + +// --- (line: 64) skipped --- +// y.ifoo(); +// +// var w: SimpleClassInterfaceTest.Bar = null; +// w.[|icfoo|](); +// +// var z = new Test.BarBlah(); +// z.field = ""; +// // --- (line: 72) skipped --- + + + +// === findAllReferences === +// === /referencesForOverrides.ts === +// --- (line: 30) skipped --- +// +// module Test { +// export interface IBase { +// /*FIND ALL REFS*/[|field|]: string; +// method(): void; +// } +// +// export interface IBlah extends IBase { +// [|field|]: string; +// } +// +// export interface IBlah2 extends IBlah { +// [|field|]: string; +// } +// +// export interface IDerived extends IBlah2 { +// method(): void; +// } +// +// export class Bar implements IDerived { +// public [|field|]: string; +// public method(): void { } +// } +// +// export class BarBlah extends Bar { +// public [|field|]: string; +// } +// } +// +// // --- (line: 60) skipped --- + +// --- (line: 67) skipped --- +// w.icfoo(); +// +// var z = new Test.BarBlah(); +// z.[|field|] = ""; +// z.method(); +// } +// } + + + +// === findAllReferences === +// === /referencesForOverrides.ts === +// --- (line: 31) skipped --- +// module Test { +// export interface IBase { +// field: string; +// /*FIND ALL REFS*/[|method|](): void; +// } +// +// export interface IBlah extends IBase { +// // --- (line: 39) skipped --- + +// --- (line: 43) skipped --- +// } +// +// export interface IDerived extends IBlah2 { +// [|method|](): void; +// } +// +// export class Bar implements IDerived { +// public field: string; +// public [|method|](): void { } +// } +// +// export class BarBlah extends Bar { +// // --- (line: 56) skipped --- + +// --- (line: 68) skipped --- +// +// var z = new Test.BarBlah(); +// z.field = ""; +// z.[|method|](); +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForPropertiesOfGenericType.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForPropertiesOfGenericType.baseline.jsonc new file mode 100644 index 0000000000..1d29d03a3f --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForPropertiesOfGenericType.baseline.jsonc @@ -0,0 +1,39 @@ +// === findAllReferences === +// === /referencesForPropertiesOfGenericType.ts === +// interface IFoo { +// /*FIND ALL REFS*/[|doSomething|](v: T): T; +// } +// +// var x: IFoo; +// x.[|doSomething|]("ss"); +// +// var y: IFoo; +// y.[|doSomething|](12); + + + +// === findAllReferences === +// === /referencesForPropertiesOfGenericType.ts === +// interface IFoo { +// [|doSomething|](v: T): T; +// } +// +// var x: IFoo; +// x./*FIND ALL REFS*/[|doSomething|]("ss"); +// +// var y: IFoo; +// y.[|doSomething|](12); + + + +// === findAllReferences === +// === /referencesForPropertiesOfGenericType.ts === +// interface IFoo { +// [|doSomething|](v: T): T; +// } +// +// var x: IFoo; +// x.[|doSomething|]("ss"); +// +// var y: IFoo; +// y./*FIND ALL REFS*/[|doSomething|](12); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatic.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatic.baseline.jsonc new file mode 100644 index 0000000000..d51eb433e8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStatic.baseline.jsonc @@ -0,0 +1,258 @@ +// === findAllReferences === +// === /referencesOnStatic_1.ts === +// var n = 43; +// +// class foo { +// /*FIND ALL REFS*/static n = ''; +// +// public bar() { +// foo.n = "'"; +// // --- (line: 8) skipped --- + + + +// === findAllReferences === +// === /referencesOnStatic_1.ts === +// var n = 43; +// +// class foo { +// static /*FIND ALL REFS*/[|n|] = ''; +// +// public bar() { +// foo.[|n|] = "'"; +// if(foo.[|n|]) { +// var x = foo.[|n|]; +// } +// } +// } +// +// class foo2 { +// private x = foo.[|n|]; +// constructor() { +// foo.[|n|] = x; +// } +// +// function b(n) { +// n = foo.[|n|]; +// } +// } + +// === /referencesOnStatic_2.ts === +// var q = foo.[|n|]; + + + +// === findAllReferences === +// === /referencesOnStatic_1.ts === +// var n = 43; +// +// class foo { +// static [|n|] = ''; +// +// public bar() { +// foo./*FIND ALL REFS*/[|n|] = "'"; +// if(foo.[|n|]) { +// var x = foo.[|n|]; +// } +// } +// } +// +// class foo2 { +// private x = foo.[|n|]; +// constructor() { +// foo.[|n|] = x; +// } +// +// function b(n) { +// n = foo.[|n|]; +// } +// } + +// === /referencesOnStatic_2.ts === +// var q = foo.[|n|]; + + + +// === findAllReferences === +// === /referencesOnStatic_1.ts === +// var n = 43; +// +// class foo { +// static [|n|] = ''; +// +// public bar() { +// foo.[|n|] = "'"; +// if(foo./*FIND ALL REFS*/[|n|]) { +// var x = foo.[|n|]; +// } +// } +// } +// +// class foo2 { +// private x = foo.[|n|]; +// constructor() { +// foo.[|n|] = x; +// } +// +// function b(n) { +// n = foo.[|n|]; +// } +// } + +// === /referencesOnStatic_2.ts === +// var q = foo.[|n|]; + + + +// === findAllReferences === +// === /referencesOnStatic_1.ts === +// var n = 43; +// +// class foo { +// static [|n|] = ''; +// +// public bar() { +// foo.[|n|] = "'"; +// if(foo.[|n|]) { +// var x = foo./*FIND ALL REFS*/[|n|]; +// } +// } +// } +// +// class foo2 { +// private x = foo.[|n|]; +// constructor() { +// foo.[|n|] = x; +// } +// +// function b(n) { +// n = foo.[|n|]; +// } +// } + +// === /referencesOnStatic_2.ts === +// var q = foo.[|n|]; + + + +// === findAllReferences === +// === /referencesOnStatic_1.ts === +// var n = 43; +// +// class foo { +// static [|n|] = ''; +// +// public bar() { +// foo.[|n|] = "'"; +// if(foo.[|n|]) { +// var x = foo.[|n|]; +// } +// } +// } +// +// class foo2 { +// private x = foo./*FIND ALL REFS*/[|n|]; +// constructor() { +// foo.[|n|] = x; +// } +// +// function b(n) { +// n = foo.[|n|]; +// } +// } + +// === /referencesOnStatic_2.ts === +// var q = foo.[|n|]; + + + +// === findAllReferences === +// === /referencesOnStatic_1.ts === +// var n = 43; +// +// class foo { +// static [|n|] = ''; +// +// public bar() { +// foo.[|n|] = "'"; +// if(foo.[|n|]) { +// var x = foo.[|n|]; +// } +// } +// } +// +// class foo2 { +// private x = foo.[|n|]; +// constructor() { +// foo./*FIND ALL REFS*/[|n|] = x; +// } +// +// function b(n) { +// n = foo.[|n|]; +// } +// } + +// === /referencesOnStatic_2.ts === +// var q = foo.[|n|]; + + + +// === findAllReferences === +// === /referencesOnStatic_1.ts === +// var n = 43; +// +// class foo { +// static [|n|] = ''; +// +// public bar() { +// foo.[|n|] = "'"; +// if(foo.[|n|]) { +// var x = foo.[|n|]; +// } +// } +// } +// +// class foo2 { +// private x = foo.[|n|]; +// constructor() { +// foo.[|n|] = x; +// } +// +// function b(n) { +// n = foo./*FIND ALL REFS*/[|n|]; +// } +// } + +// === /referencesOnStatic_2.ts === +// var q = foo.[|n|]; + + + +// === findAllReferences === +// === /referencesOnStatic_1.ts === +// var n = 43; +// +// class foo { +// static [|n|] = ''; +// +// public bar() { +// foo.[|n|] = "'"; +// if(foo.[|n|]) { +// var x = foo.[|n|]; +// } +// } +// } +// +// class foo2 { +// private x = foo.[|n|]; +// constructor() { +// foo.[|n|] = x; +// } +// +// function b(n) { +// n = foo.[|n|]; +// } +// } + +// === /referencesOnStatic_2.ts === +// var q = foo./*FIND ALL REFS*/[|n|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStaticsAndMembersWithSameNames.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStaticsAndMembersWithSameNames.baseline.jsonc new file mode 100644 index 0000000000..84334b385e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStaticsAndMembersWithSameNames.baseline.jsonc @@ -0,0 +1,223 @@ +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// module FindRef4 { +// module MixedStaticsClassTest { +// export class Foo { +// /*FIND ALL REFS*/[|bar|]: Foo; +// static bar: Foo; +// +// public foo(): void { +// // --- (line: 8) skipped --- + +// --- (line: 14) skipped --- +// // instance function +// var x = new MixedStaticsClassTest.Foo(); +// x.foo(); +// x.[|bar|]; +// +// // static function +// MixedStaticsClassTest.Foo.foo(); +// // --- (line: 22) skipped --- + + + +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// module FindRef4 { +// module MixedStaticsClassTest { +// export class Foo { +// bar: Foo; +// /*FIND ALL REFS*/static bar: Foo; +// +// public foo(): void { +// } +// // --- (line: 9) skipped --- + + + +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// module FindRef4 { +// module MixedStaticsClassTest { +// export class Foo { +// bar: Foo; +// static /*FIND ALL REFS*/[|bar|]: Foo; +// +// public foo(): void { +// } +// // --- (line: 9) skipped --- + +// --- (line: 18) skipped --- +// +// // static function +// MixedStaticsClassTest.Foo.foo(); +// MixedStaticsClassTest.Foo.[|bar|]; +// } +// } + + + +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// --- (line: 3) skipped --- +// bar: Foo; +// static bar: Foo; +// +// /*FIND ALL REFS*/public foo(): void { +// } +// public static foo(): void { +// } +// // --- (line: 11) skipped --- + + + +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// --- (line: 3) skipped --- +// bar: Foo; +// static bar: Foo; +// +// public /*FIND ALL REFS*/[|foo|](): void { +// } +// public static foo(): void { +// } +// } +// } +// +// function test() { +// // instance function +// var x = new MixedStaticsClassTest.Foo(); +// x.[|foo|](); +// x.bar; +// +// // static function +// // --- (line: 21) skipped --- + + + +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// --- (line: 5) skipped --- +// +// public foo(): void { +// } +// /*FIND ALL REFS*/public static foo(): void { +// } +// } +// } +// // --- (line: 13) skipped --- + + + +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// --- (line: 5) skipped --- +// +// public foo(): void { +// } +// public static /*FIND ALL REFS*/[|foo|](): void { +// } +// } +// } +// // --- (line: 13) skipped --- + +// --- (line: 17) skipped --- +// x.bar; +// +// // static function +// MixedStaticsClassTest.Foo.[|foo|](); +// MixedStaticsClassTest.Foo.bar; +// } +// } + + + +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// --- (line: 3) skipped --- +// bar: Foo; +// static bar: Foo; +// +// public [|foo|](): void { +// } +// public static foo(): void { +// } +// } +// } +// +// function test() { +// // instance function +// var x = new MixedStaticsClassTest.Foo(); +// x./*FIND ALL REFS*/[|foo|](); +// x.bar; +// +// // static function +// // --- (line: 21) skipped --- + + + +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// module FindRef4 { +// module MixedStaticsClassTest { +// export class Foo { +// [|bar|]: Foo; +// static bar: Foo; +// +// public foo(): void { +// // --- (line: 8) skipped --- + +// --- (line: 14) skipped --- +// // instance function +// var x = new MixedStaticsClassTest.Foo(); +// x.foo(); +// x./*FIND ALL REFS*/[|bar|]; +// +// // static function +// MixedStaticsClassTest.Foo.foo(); +// // --- (line: 22) skipped --- + + + +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// --- (line: 5) skipped --- +// +// public foo(): void { +// } +// public static [|foo|](): void { +// } +// } +// } +// // --- (line: 13) skipped --- + +// --- (line: 17) skipped --- +// x.bar; +// +// // static function +// MixedStaticsClassTest.Foo./*FIND ALL REFS*/[|foo|](); +// MixedStaticsClassTest.Foo.bar; +// } +// } + + + +// === findAllReferences === +// === /referencesForStaticsAndMembersWithSameNames.ts === +// module FindRef4 { +// module MixedStaticsClassTest { +// export class Foo { +// bar: Foo; +// static [|bar|]: Foo; +// +// public foo(): void { +// } +// // --- (line: 9) skipped --- + +// --- (line: 18) skipped --- +// +// // static function +// MixedStaticsClassTest.Foo.foo(); +// MixedStaticsClassTest.Foo./*FIND ALL REFS*/[|bar|]; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames.baseline.jsonc new file mode 100644 index 0000000000..b7bc9f6564 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames.ts === +// class Foo { +// public "/*FIND ALL REFS*/[|ss|]": any; +// } +// +// var x: Foo; +// x.[|ss|]; +// x["[|ss|]"]; +// x = { "[|ss|]": 0 }; +// x = { [|ss|]: 0 }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames2.baseline.jsonc new file mode 100644 index 0000000000..0233885c6c --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames2.baseline.jsonc @@ -0,0 +1,30 @@ +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames2.ts === +// class Foo { +// /*FIND ALL REFS*/"[|blah|]"() { return 0; } +// } +// +// var x: Foo; +// x.[|blah|]; + + + +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames2.ts === +// class Foo { +// "/*FIND ALL REFS*/[|blah|]"() { return 0; } +// } +// +// var x: Foo; +// x.[|blah|]; + + + +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames2.ts === +// class Foo { +// "[|blah|]"() { return 0; } +// } +// +// var x: Foo; +// x./*FIND ALL REFS*/[|blah|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames3.baseline.jsonc new file mode 100644 index 0000000000..3a61f5954d --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames3.baseline.jsonc @@ -0,0 +1,57 @@ +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames3.ts === +// class Foo2 { +// /*FIND ALL REFS*/get "42"() { return 0; } +// set 42(n) { } +// } +// +// var y: Foo2; +// y[42]; + + + +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames3.ts === +// class Foo2 { +// get "/*FIND ALL REFS*/[|42|]"() { return 0; } +// set [|42|](n) { } +// } +// +// var y: Foo2; +// y[[|42|]]; + + + +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames3.ts === +// class Foo2 { +// get "42"() { return 0; } +// /*FIND ALL REFS*/set 42(n) { } +// } +// +// var y: Foo2; +// y[42]; + + + +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames3.ts === +// class Foo2 { +// get "[|42|]"() { return 0; } +// set /*FIND ALL REFS*/[|42|](n) { } +// } +// +// var y: Foo2; +// y[[|42|]]; + + + +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames3.ts === +// class Foo2 { +// get "[|42|]"() { return 0; } +// set [|42|](n) { } +// } +// +// var y: Foo2; +// y[/*FIND ALL REFS*/[|42|]]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames4.baseline.jsonc new file mode 100644 index 0000000000..15b6266345 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames4.baseline.jsonc @@ -0,0 +1,13 @@ +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames4.ts === +// var x = { "/*FIND ALL REFS*/[|someProperty|]": 0 } +// x["[|someProperty|]"] = 3; +// x.[|someProperty|] = 5; + + + +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames4.ts === +// var x = { "[|someProperty|]": 0 } +// x[/*FIND ALL REFS*/"[|someProperty|]"] = 3; +// x.[|someProperty|] = 5; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames5.baseline.jsonc new file mode 100644 index 0000000000..42967647fb --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames5.baseline.jsonc @@ -0,0 +1,13 @@ +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames5.ts === +// var x = { "/*FIND ALL REFS*/[|someProperty|]": 0 } +// x["[|someProperty|]"] = 3; +// x.[|someProperty|] = 5; + + + +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames5.ts === +// var x = { "[|someProperty|]": 0 } +// x["/*FIND ALL REFS*/[|someProperty|]"] = 3; +// x.[|someProperty|] = 5; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames6.baseline.jsonc new file mode 100644 index 0000000000..ab4c5ebaf1 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames6.baseline.jsonc @@ -0,0 +1,13 @@ +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames6.ts === +// const x = function () { return 111111; } +// x./*FIND ALL REFS*/[|someProperty|] = 5; +// x["[|someProperty|]"] = 3; + + + +// === findAllReferences === +// === /referencesForStringLiteralPropertyNames6.ts === +// const x = function () { return 111111; } +// x.[|someProperty|] = 5; +// x["/*FIND ALL REFS*/[|someProperty|]"] = 3; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames7.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames7.baseline.jsonc new file mode 100644 index 0000000000..497a859d97 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForStringLiteralPropertyNames7.baseline.jsonc @@ -0,0 +1,13 @@ +// === findAllReferences === +// === /foo.js === +// var x = { "/*FIND ALL REFS*/[|someProperty|]": 0 } +// x["[|someProperty|]"] = 3; +// x.[|someProperty|] = 5; + + + +// === findAllReferences === +// === /foo.js === +// var x = { "[|someProperty|]": 0 } +// x["/*FIND ALL REFS*/[|someProperty|]"] = 3; +// x.[|someProperty|] = 5; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForTypeKeywords.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForTypeKeywords.baseline.jsonc new file mode 100644 index 0000000000..e458b9c5e7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForTypeKeywords.baseline.jsonc @@ -0,0 +1,67 @@ +// === findAllReferences === +// === /referencesForTypeKeywords.ts === +// interface I {} +// function f() {} +// type A1 = T extends U ? 1 : 0; +// type A2 = T extends infer U ? 1 : 0; +// type A3 = { [P in keyof T]: 1 }; +// type A4 = keyof T; +// type A5 = readonly T[]; + + + +// === findAllReferences === +// === /referencesForTypeKeywords.ts === +// interface I {} +// function f() {} +// type A1 = T /*FIND ALL REFS*/extends U ? 1 : 0; +// type A2 = T extends infer U ? 1 : 0; +// type A3 = { [P in keyof T]: 1 }; +// type A4 = keyof T; +// type A5 = readonly T[]; + + + +// === findAllReferences === +// === /referencesForTypeKeywords.ts === +// interface I {} +// function f() {} +// type A1 = T extends U ? 1 : 0; +// type A2 = T extends /*FIND ALL REFS*/[|infer|] U ? 1 : 0; +// type A3 = { [P in keyof T]: 1 }; +// type A4 = keyof T; +// type A5 = readonly T[]; + + + +// === findAllReferences === +// === /referencesForTypeKeywords.ts === +// interface I {} +// function f() {} +// type A1 = T extends U ? 1 : 0; +// type A2 = T extends infer U ? 1 : 0; +// type A3 = { [P /*FIND ALL REFS*/in keyof T]: 1 }; +// type A4 = keyof T; +// type A5 = readonly T[]; + + + +// === findAllReferences === +// === /referencesForTypeKeywords.ts === +// interface I {} +// function f() {} +// type A1 = T extends U ? 1 : 0; +// type A2 = T extends infer U ? 1 : 0; +// type A3 = { [P in [|keyof|] T]: 1 }; +// type A4 = /*FIND ALL REFS*/[|keyof|] T; +// type A5 = readonly T[]; + + + +// === findAllReferences === +// === /referencesForTypeKeywords.ts === +// --- (line: 3) skipped --- +// type A2 = T extends infer U ? 1 : 0; +// type A3 = { [P in keyof T]: 1 }; +// type A4 = keyof T; +// type A5 = /*FIND ALL REFS*/[|readonly|] T[]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesForUnionProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesForUnionProperties.baseline.jsonc new file mode 100644 index 0000000000..5a0d495a21 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesForUnionProperties.baseline.jsonc @@ -0,0 +1,66 @@ +// === findAllReferences === +// === /referencesForUnionProperties.ts === +// interface One { +// common: { /*FIND ALL REFS*/[|a|]: number; }; +// } +// +// interface Base { +// // --- (line: 6) skipped --- + +// --- (line: 17) skipped --- +// +// var x : One | Two; +// +// x.common.[|a|]; + + + +// === findAllReferences === +// === /referencesForUnionProperties.ts === +// interface One { +// common: { a: number; }; +// } +// +// interface Base { +// /*FIND ALL REFS*/[|a|]: string; +// b: string; +// } +// +// interface HasAOrB extends Base { +// [|a|]: string; +// b: string; +// } +// +// interface Two { +// common: HasAOrB; +// } +// +// var x : One | Two; +// +// x.common.[|a|]; + + + +// === findAllReferences === +// === /referencesForUnionProperties.ts === +// interface One { +// common: { [|a|]: number; }; +// } +// +// interface Base { +// [|a|]: string; +// b: string; +// } +// +// interface HasAOrB extends Base { +// [|a|]: string; +// b: string; +// } +// +// interface Two { +// common: HasAOrB; +// } +// +// var x : One | Two; +// +// x.common./*FIND ALL REFS*/[|a|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesInConfiguredProject.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesInConfiguredProject.baseline.jsonc new file mode 100644 index 0000000000..a2b4cd66ce --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesInConfiguredProject.baseline.jsonc @@ -0,0 +1,8 @@ +// === findAllReferences === +// === /home/src/workspaces/project/referencesForGlobals_1.ts === +// class [|globalClass|] { +// public f() { } +// } + +// === /home/src/workspaces/project/referencesForGlobals_2.ts === +// var c = /*FIND ALL REFS*/[|globalClass|](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesInEmptyFileWithMultipleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesInEmptyFileWithMultipleProjects.baseline.jsonc new file mode 100644 index 0000000000..e328e284d6 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesInEmptyFileWithMultipleProjects.baseline.jsonc @@ -0,0 +1,10 @@ +// === findAllReferences === +// === /home/src/workspaces/project/a/a.ts === +// /// +// /*FIND ALL REFS*/; + + + +// === findAllReferences === +// === /home/src/workspaces/project/b/b.ts === +// /*FIND ALL REFS*/; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesInStringLiteralValueWithMultipleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesInStringLiteralValueWithMultipleProjects.baseline.jsonc new file mode 100644 index 0000000000..32fab59a1b --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesInStringLiteralValueWithMultipleProjects.baseline.jsonc @@ -0,0 +1,10 @@ +// === findAllReferences === +// === /home/src/workspaces/project/a/a.ts === +// /// +// const str: string = "hello/*FIND ALL REFS*/"; + + + +// === findAllReferences === +// === /home/src/workspaces/project/b/b.ts === +// const str2: string = "hello/*FIND ALL REFS*/"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesToNonPropertyNameStringLiteral.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesToNonPropertyNameStringLiteral.baseline.jsonc new file mode 100644 index 0000000000..ebffcdf9e8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesToNonPropertyNameStringLiteral.baseline.jsonc @@ -0,0 +1,3 @@ +// === findAllReferences === +// === /referencesToNonPropertyNameStringLiteral.ts === +// const str: string = "hello/*FIND ALL REFS*/"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/referencesToStringLiteralValue.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/referencesToStringLiteralValue.baseline.jsonc new file mode 100644 index 0000000000..f9b30892ca --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/referencesToStringLiteralValue.baseline.jsonc @@ -0,0 +1,3 @@ +// === findAllReferences === +// === /referencesToStringLiteralValue.ts === +// const s: string = "some /*FIND ALL REFS*/ string"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/remoteGetReferences.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/remoteGetReferences.baseline.jsonc new file mode 100644 index 0000000000..2515a755e4 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/remoteGetReferences.baseline.jsonc @@ -0,0 +1,1757 @@ +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 82) skipped --- +// +// //Remotes +// //Type test +// var remoteclsTest: /*FIND ALL REFS*/[|remotefooCls|]; +// +// //Arguments +// remoteclsTest = new [|remotefooCls|](remoteglobalVar); +// remotefoo(remoteglobalVar); +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class [|remotefooCls|] { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// [|remotefooCls|].remoteclsSVar++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 82) skipped --- +// +// //Remotes +// //Type test +// var remoteclsTest: [|remotefooCls|]; +// +// //Arguments +// remoteclsTest = new /*FIND ALL REFS*/[|remotefooCls|](remoteglobalVar); +// remotefoo(remoteglobalVar); +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class [|remotefooCls|] { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// [|remotefooCls|].remoteclsSVar++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls(/*FIND ALL REFS*/[|remoteglobalVar|]); +// remotefoo([|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; +// +// //ETC - Other cases +// [|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var [|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// [|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// [|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls([|remoteglobalVar|]); +// remotefoo(/*FIND ALL REFS*/[|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; +// +// //ETC - Other cases +// [|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var [|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// [|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// [|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 82) skipped --- +// +// //Remotes +// //Type test +// var remoteclsTest: [|remotefooCls|]; +// +// //Arguments +// remoteclsTest = new [|remotefooCls|](remoteglobalVar); +// remotefoo(remoteglobalVar); +// +// //Increments +// /*FIND ALL REFS*/[|remotefooCls|].remoteclsSVar++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class [|remotefooCls|] { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// [|remotefooCls|].remoteclsSVar++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 89) skipped --- +// remotefoo(remoteglobalVar); +// +// //Increments +// remotefooCls./*FIND ALL REFS*/[|remoteclsSVar|]++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static [|remoteclsSVar|] = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// remotefooCls.[|remoteclsSVar|]++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// remotefooCls.[|remoteclsSVar|]++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls.[|remoteclsSVar|]++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls.[|remoteclsSVar|]++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls([|remoteglobalVar|]); +// remotefoo([|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// /*FIND ALL REFS*/[|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; +// +// //ETC - Other cases +// [|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var [|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// [|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// [|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls([|remoteglobalVar|]); +// remotefoo([|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// [|remoteglobalVar|] = /*FIND ALL REFS*/[|remoteglobalVar|] + [|remoteglobalVar|]; +// +// //ETC - Other cases +// [|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var [|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// [|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// [|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls([|remoteglobalVar|]); +// remotefoo([|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// [|remoteglobalVar|] = [|remoteglobalVar|] + /*FIND ALL REFS*/[|remoteglobalVar|]; +// +// //ETC - Other cases +// [|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var [|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// [|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// [|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls([|remoteglobalVar|]); +// remotefoo([|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; +// +// //ETC - Other cases +// /*FIND ALL REFS*/[|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var [|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// [|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// [|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_2.ts === +// /*FIND ALL REFS*/var remoteglobalVar: number = 2; +// +// class remotefooCls { +// //Declare +// // --- (line: 5) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls([|remoteglobalVar|]); +// remotefoo([|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; +// +// //ETC - Other cases +// [|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var /*FIND ALL REFS*/[|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// [|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// [|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// /*FIND ALL REFS*/class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// // --- (line: 7) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 82) skipped --- +// +// //Remotes +// //Type test +// var remoteclsTest: [|remotefooCls|]; +// +// //Arguments +// remoteclsTest = new [|remotefooCls|](remoteglobalVar); +// remotefoo(remoteglobalVar); +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class /*FIND ALL REFS*/[|remotefooCls|] { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// [|remotefooCls|].remoteclsSVar++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class remotefooCls { +// //Declare +// /*FIND ALL REFS*/[|remoteclsVar|] = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.[|remoteclsVar|]++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// // --- (line: 15) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// /*FIND ALL REFS*/static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// // --- (line: 10) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 89) skipped --- +// remotefoo(remoteglobalVar); +// +// //Increments +// remotefooCls.[|remoteclsSVar|]++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static /*FIND ALL REFS*/[|remoteclsSVar|] = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// remotefooCls.[|remoteclsSVar|]++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// remotefooCls.[|remoteclsSVar|]++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls.[|remoteclsSVar|]++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls.[|remoteclsSVar|]++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls([|remoteglobalVar|]); +// remotefoo([|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; +// +// //ETC - Other cases +// [|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var [|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// /*FIND ALL REFS*/[|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// [|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class remotefooCls { +// //Declare +// [|remoteclsVar|] = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this./*FIND ALL REFS*/[|remoteclsVar|]++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// // --- (line: 15) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 82) skipped --- +// +// //Remotes +// //Type test +// var remoteclsTest: [|remotefooCls|]; +// +// //Arguments +// remoteclsTest = new [|remotefooCls|](remoteglobalVar); +// remotefoo(remoteglobalVar); +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class [|remotefooCls|] { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// /*FIND ALL REFS*/[|remotefooCls|].remoteclsSVar++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 89) skipped --- +// remotefoo(remoteglobalVar); +// +// //Increments +// remotefooCls.[|remoteclsSVar|]++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static [|remoteclsSVar|] = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// remotefooCls./*FIND ALL REFS*/[|remoteclsSVar|]++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// remotefooCls.[|remoteclsSVar|]++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls.[|remoteclsSVar|]++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls.[|remoteclsSVar|]++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 82) skipped --- +// +// //Remotes +// //Type test +// var remoteclsTest: [|remotefooCls|]; +// +// //Arguments +// remoteclsTest = new [|remotefooCls|](remoteglobalVar); +// remotefoo(remoteglobalVar); +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class [|remotefooCls|] { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// [|remotefooCls|].remoteclsSVar++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// /*FIND ALL REFS*/[|remotefooCls|].remoteclsSVar++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 89) skipped --- +// remotefoo(remoteglobalVar); +// +// //Increments +// remotefooCls.[|remoteclsSVar|]++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static [|remoteclsSVar|] = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// remotefooCls.[|remoteclsSVar|]++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// remotefooCls./*FIND ALL REFS*/[|remoteclsSVar|]++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls.[|remoteclsSVar|]++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls.[|remoteclsSVar|]++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls([|remoteglobalVar|]); +// remotefoo([|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; +// +// //ETC - Other cases +// [|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var [|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// [|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// /*FIND ALL REFS*/[|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls([|remoteglobalVar|]); +// remotefoo([|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; +// +// //ETC - Other cases +// [|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var [|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// [|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// [|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// /*FIND ALL REFS*/[|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 82) skipped --- +// +// //Remotes +// //Type test +// var remoteclsTest: [|remotefooCls|]; +// +// //Arguments +// remoteclsTest = new [|remotefooCls|](remoteglobalVar); +// remotefoo(remoteglobalVar); +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class [|remotefooCls|] { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// [|remotefooCls|].remoteclsSVar++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// /*FIND ALL REFS*/[|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 89) skipped --- +// remotefoo(remoteglobalVar); +// +// //Increments +// remotefooCls.[|remoteclsSVar|]++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static [|remoteclsSVar|] = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// remotefooCls.[|remoteclsSVar|]++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// remotefooCls.[|remoteclsSVar|]++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls./*FIND ALL REFS*/[|remoteclsSVar|]++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls.[|remoteclsSVar|]++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 85) skipped --- +// var remoteclsTest: remotefooCls; +// +// //Arguments +// remoteclsTest = new remotefooCls([|remoteglobalVar|]); +// remotefoo([|remoteglobalVar|]); +// +// //Increments +// remotefooCls.remoteclsSVar++; +// remotemodTest.remotemodVar++; +// [|remoteglobalVar|] = [|remoteglobalVar|] + [|remoteglobalVar|]; +// +// //ETC - Other cases +// [|remoteglobalVar|] = 3; +// +// //Find References misses method param +// var +// // --- (line: 102) skipped --- + +// === /remoteGetReferences_2.ts === +// var [|remoteglobalVar|]: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// [|remoteglobalVar|]++; +// this.remoteclsVar++; +// remotefooCls.remoteclsSVar++; +// this.remoteclsParam++; +// // --- (line: 14) skipped --- + +// --- (line: 20) skipped --- +// +// //Increments +// remotefooCls.remoteclsSVar++; +// [|remoteglobalVar|]++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// +// // --- (line: 28) skipped --- + +// --- (line: 33) skipped --- +// export var remotemodVar: number; +// +// //Increments +// [|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// +// // --- (line: 41) skipped --- + +// --- (line: 45) skipped --- +// static remoteboo = remotefoo; +// +// //Increments +// /*FIND ALL REFS*/[|remoteglobalVar|]++; +// remotefooCls.remoteclsSVar++; +// remotemodVar++; +// } +// // --- (line: 53) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 82) skipped --- +// +// //Remotes +// //Type test +// var remoteclsTest: [|remotefooCls|]; +// +// //Arguments +// remoteclsTest = new [|remotefooCls|](remoteglobalVar); +// remotefoo(remoteglobalVar); +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class [|remotefooCls|] { +// //Declare +// remoteclsVar = 1; +// static remoteclsSVar = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// [|remotefooCls|].remoteclsSVar++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// [|remotefooCls|].remoteclsSVar++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// [|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// /*FIND ALL REFS*/[|remotefooCls|].remoteclsSVar++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- + + + +// === findAllReferences === +// === /remoteGetReferences_1.ts === +// --- (line: 89) skipped --- +// remotefoo(remoteglobalVar); +// +// //Increments +// remotefooCls.[|remoteclsSVar|]++; +// remotemodTest.remotemodVar++; +// remoteglobalVar = remoteglobalVar + remoteglobalVar; +// +// // --- (line: 97) skipped --- + +// === /remoteGetReferences_2.ts === +// var remoteglobalVar: number = 2; +// +// class remotefooCls { +// //Declare +// remoteclsVar = 1; +// static [|remoteclsSVar|] = 1; +// +// constructor(public remoteclsParam: number) { +// //Increments +// remoteglobalVar++; +// this.remoteclsVar++; +// remotefooCls.[|remoteclsSVar|]++; +// this.remoteclsParam++; +// remotemodTest.remotemodVar++; +// } +// // --- (line: 16) skipped --- + +// --- (line: 19) skipped --- +// var remotefnVar = 1; +// +// //Increments +// remotefooCls.[|remoteclsSVar|]++; +// remoteglobalVar++; +// remotemodTest.remotemodVar++; +// remotefnVar++; +// // --- (line: 27) skipped --- + +// --- (line: 34) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls.[|remoteclsSVar|]++; +// remotemodVar++; +// +// class remotetestCls { +// // --- (line: 42) skipped --- + +// --- (line: 46) skipped --- +// +// //Increments +// remoteglobalVar++; +// remotefooCls./*FIND ALL REFS*/[|remoteclsSVar|]++; +// remotemodVar++; +// } +// +// // --- (line: 54) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc new file mode 100644 index 0000000000..8601eca2ac --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameImportAndExportInDiffFiles.baseline.jsonc @@ -0,0 +1,27 @@ +// === findAllReferences === +// === /a.ts === +// export var /*FIND ALL REFS*/[|a|]; + +// === /b.ts === +// import { [|a|] } from './a'; +// export { a }; + + + +// === findAllReferences === +// === /a.ts === +// export var [|a|]; + +// === /b.ts === +// import { /*FIND ALL REFS*/[|a|] } from './a'; +// export { a }; + + + +// === findAllReferences === +// === /a.ts === +// export var [|a|]; + +// === /b.ts === +// import { [|a|] } from './a'; +// export { /*FIND ALL REFS*/a }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc new file mode 100644 index 0000000000..28ba24f606 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameImportOfExportEquals.baseline.jsonc @@ -0,0 +1,68 @@ +// === findAllReferences === +// === /renameImportOfExportEquals.ts === +// declare namespace /*FIND ALL REFS*/[|N|] { +// export var x: number; +// } +// declare module "mod" { +// export = [|N|]; +// } +// declare module "a" { +// import * as [|N|] from "mod"; +// export { N }; // Renaming N here would rename +// } +// declare module "b" { +// // --- (line: 12) skipped --- + + + +// === findAllReferences === +// === /renameImportOfExportEquals.ts === +// declare namespace [|N|] { +// export var x: number; +// } +// declare module "mod" { +// export = [|N|]; +// } +// declare module "a" { +// import * as /*FIND ALL REFS*/[|N|] from "mod"; +// export { N }; // Renaming N here would rename +// } +// declare module "b" { +// // --- (line: 12) skipped --- + + + +// === findAllReferences === +// === /renameImportOfExportEquals.ts === +// declare namespace [|N|] { +// export var x: number; +// } +// declare module "mod" { +// export = [|N|]; +// } +// declare module "a" { +// import * as [|N|] from "mod"; +// export { N }; // Renaming N here would rename +// } +// declare module "b" { +// import { /*FIND ALL REFS*/[|N|] } from "a"; +// export const y: typeof [|N|].x; +// } + + + +// === findAllReferences === +// === /renameImportOfExportEquals.ts === +// declare namespace N { +// export var /*FIND ALL REFS*/[|x|]: number; +// } +// declare module "mod" { +// export = N; +// // --- (line: 6) skipped --- + +// --- (line: 9) skipped --- +// } +// declare module "b" { +// import { N } from "a"; +// export const y: typeof N.[|x|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameJsExports01.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameJsExports01.baseline.jsonc new file mode 100644 index 0000000000..2687093425 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameJsExports01.baseline.jsonc @@ -0,0 +1,7 @@ +// === findAllReferences === +// === /a.js === +// exports.[|area|] = function (r) { return r * r; } + +// === /b.js === +// var mod = require('./a'); +// var t = mod./*FIND ALL REFS*/area(10); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameJsExports02.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameJsExports02.baseline.jsonc new file mode 100644 index 0000000000..eab27fdda9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameJsExports02.baseline.jsonc @@ -0,0 +1,9 @@ +// === findAllReferences === +// === /a.js === +// module.exports = class /*FIND ALL REFS*/[|A|] {} + + + +// === findAllReferences === +// === /b.js === +// const /*FIND ALL REFS*/[|A|] = require("./a"); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/renameJsExports03.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/renameJsExports03.baseline.jsonc new file mode 100644 index 0000000000..e7589d64b6 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/renameJsExports03.baseline.jsonc @@ -0,0 +1,29 @@ +// === findAllReferences === +// === /a.js === +// class /*FIND ALL REFS*/[|A|] { +// constructor() { } +// } +// module.exports = [|A|]; + + + +// === findAllReferences === +// === /a.js === +// class [|A|] { +// /*FIND ALL REFS*/constructor() { } +// } +// module.exports = [|A|]; + + + +// === findAllReferences === +// === /b.js === +// const /*FIND ALL REFS*/[|A|] = require("./a"); +// new [|A|]; + + + +// === findAllReferences === +// === /b.js === +// const [|A|] = require("./a"); +// new /*FIND ALL REFS*/[|A|]; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences1.baseline.jsonc new file mode 100644 index 0000000000..d43435b087 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences1.baseline.jsonc @@ -0,0 +1,39 @@ +// === findAllReferences === +// === /file.tsx === +// declare module JSX { +// interface Element { } +// interface IntrinsicElements { +// /*FIND ALL REFS*/[|div|]: { +// name?: string; +// isOpen?: boolean; +// }; +// span: { n: string; }; +// } +// } +// var x = <[|div|] />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 7) skipped --- +// span: { n: string; }; +// } +// } +// var x = /*FIND ALL REFS*/
; + + + +// === findAllReferences === +// === /file.tsx === +// declare module JSX { +// interface Element { } +// interface IntrinsicElements { +// [|div|]: { +// name?: string; +// isOpen?: boolean; +// }; +// span: { n: string; }; +// } +// } +// var x = ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences10.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences10.baseline.jsonc new file mode 100644 index 0000000000..66169b1bef --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences10.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// className?: string; +// } +// interface ButtonProps extends ClickableProps { +// /*FIND ALL REFS*/[|onClick|](event?: React.MouseEvent): void; +// } +// interface LinkProps extends ClickableProps { +// goTo: string; +// // --- (line: 16) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences11.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences11.baseline.jsonc new file mode 100644 index 0000000000..92dc82ce73 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences11.baseline.jsonc @@ -0,0 +1,7 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 16) skipped --- +// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences2.baseline.jsonc new file mode 100644 index 0000000000..fe81dcc1af --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences2.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /file.tsx === +// declare module JSX { +// interface Element { } +// interface IntrinsicElements { +// div: { +// /*FIND ALL REFS*/[|name|]?: string; +// isOpen?: boolean; +// }; +// span: { n: string; }; +// // --- (line: 9) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences3.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences3.baseline.jsonc new file mode 100644 index 0000000000..8cfb85cc27 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences3.baseline.jsonc @@ -0,0 +1,12 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 5) skipped --- +// } +// class MyClass { +// props: { +// /*FIND ALL REFS*/[|name|]?: string; +// size?: number; +// } +// +// +// var x = ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences4.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences4.baseline.jsonc new file mode 100644 index 0000000000..a65332382e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences4.baseline.jsonc @@ -0,0 +1,72 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 3) skipped --- +// } +// interface ElementAttributesProperty { props } +// } +// /*FIND ALL REFS*/class MyClass { +// props: { +// name?: string; +// size?: number; +// // --- (line: 11) skipped --- + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 3) skipped --- +// } +// interface ElementAttributesProperty { props } +// } +// class /*FIND ALL REFS*/[|MyClass|] { +// props: { +// name?: string; +// size?: number; +// } +// +// +// var x = <[|MyClass|] name='hello'>; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 10) skipped --- +// } +// +// +// var x = /*FIND ALL REFS*/; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 3) skipped --- +// } +// interface ElementAttributesProperty { props } +// } +// class [|MyClass|] { +// props: { +// name?: string; +// size?: number; +// } +// +// +// var x = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 3) skipped --- +// } +// interface ElementAttributesProperty { props } +// } +// class [|MyClass|] { +// props: { +// name?: string; +// size?: number; +// } +// +// +// var x = <[|MyClass|] name='hello'>; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences5.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences5.baseline.jsonc new file mode 100644 index 0000000000..8c15f502a3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences5.baseline.jsonc @@ -0,0 +1,162 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// /*FIND ALL REFS*/declare function Opt(attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; +// let opt4 = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function /*FIND ALL REFS*/[|Opt|](attributes: OptionPropBag): JSX.Element; +// let opt = <[|Opt|] />; +// let opt1 = <[|Opt|] propx={100} propString />; +// let opt2 = <[|Opt|] propx={100} optional/>; +// let opt3 = <[|Opt|] wrong />; +// let opt4 = <[|Opt|] propx={100} propString="hi" />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 9) skipped --- +// optional?: boolean +// } +// declare function Opt(attributes: OptionPropBag): JSX.Element; +// let opt = /*FIND ALL REFS*/; +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; +// let opt4 = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = <[|Opt|] propx={100} propString />; +// let opt2 = <[|Opt|] propx={100} optional/>; +// let opt3 = <[|Opt|] wrong />; +// let opt4 = <[|Opt|] propx={100} propString="hi" />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 10) skipped --- +// } +// declare function Opt(attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = /*FIND ALL REFS*/; +// let opt2 = ; +// let opt3 = ; +// let opt4 = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; +// let opt = <[|Opt|] />; +// let opt1 = ; +// let opt2 = <[|Opt|] propx={100} optional/>; +// let opt3 = <[|Opt|] wrong />; +// let opt4 = <[|Opt|] propx={100} propString="hi" />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 11) skipped --- +// declare function Opt(attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = ; +// let opt2 = /*FIND ALL REFS*/; +// let opt3 = ; +// let opt4 = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; +// let opt = <[|Opt|] />; +// let opt1 = <[|Opt|] propx={100} propString />; +// let opt2 = ; +// let opt3 = <[|Opt|] wrong />; +// let opt4 = <[|Opt|] propx={100} propString="hi" />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 12) skipped --- +// let opt = ; +// let opt1 = ; +// let opt2 = ; +// let opt3 = /*FIND ALL REFS*/; +// let opt4 = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; +// let opt = <[|Opt|] />; +// let opt1 = <[|Opt|] propx={100} propString />; +// let opt2 = <[|Opt|] propx={100} optional/>; +// let opt3 = ; +// let opt4 = <[|Opt|] propx={100} propString="hi" />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; +// let opt4 = /*FIND ALL REFS*/; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; +// let opt = <[|Opt|] />; +// let opt1 = <[|Opt|] propx={100} propString />; +// let opt2 = <[|Opt|] propx={100} optional/>; +// let opt3 = <[|Opt|] wrong />; +// let opt4 = ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences6.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences6.baseline.jsonc new file mode 100644 index 0000000000..1850219dfe --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences6.baseline.jsonc @@ -0,0 +1,7 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 9) skipped --- +// optional?: boolean +// } +// declare function Opt(attributes: OptionPropBag): JSX.Element; +// let opt = ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences7.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences7.baseline.jsonc new file mode 100644 index 0000000000..ec6919e839 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences7.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 4) skipped --- +// interface ElementAttributesProperty { props; } +// } +// interface OptionPropBag { +// /*FIND ALL REFS*/[|propx|]: number +// propString: string +// optional?: boolean +// } +// // --- (line: 12) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences8.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences8.baseline.jsonc new file mode 100644 index 0000000000..4cce5cf782 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences8.baseline.jsonc @@ -0,0 +1,276 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// /*FIND ALL REFS*/declare function MainButton(buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// // --- (line: 21) skipped --- + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function /*FIND ALL REFS*/[|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButton|] />; +// let opt = <[|MainButton|] children="chidlren" />; +// let opt = <[|MainButton|] onClick={()=>{}} />; +// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButton|] goTo="goTo" />; +// let opt = <[|MainButton|] wrong />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 14) skipped --- +// goTo: string; +// } +// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +// /*FIND ALL REFS*/declare function MainButton(linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = ; +// // --- (line: 22) skipped --- + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function /*FIND ALL REFS*/[|MainButton|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButton|] />; +// let opt = <[|MainButton|] children="chidlren" />; +// let opt = <[|MainButton|] onClick={()=>{}} />; +// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButton|] goTo="goTo" />; +// let opt = <[|MainButton|] wrong />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 15) skipped --- +// } +// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// /*FIND ALL REFS*/declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = ; +// let opt = {}} />; +// // --- (line: 23) skipped --- + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; +// declare function /*FIND ALL REFS*/[|MainButton|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButton|] />; +// let opt = <[|MainButton|] children="chidlren" />; +// let opt = <[|MainButton|] onClick={()=>{}} />; +// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButton|] goTo="goTo" />; +// let opt = <[|MainButton|] wrong />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 16) skipped --- +// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = /*FIND ALL REFS*/; +// let opt = ; +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = <[|MainButton|] children="chidlren" />; +// let opt = <[|MainButton|] onClick={()=>{}} />; +// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButton|] goTo="goTo" />; +// let opt = <[|MainButton|] wrong />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 17) skipped --- +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = /*FIND ALL REFS*/; +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButton|] />; +// let opt = ; +// let opt = <[|MainButton|] onClick={()=>{}} />; +// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButton|] goTo="goTo" />; +// let opt = <[|MainButton|] wrong />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 18) skipped --- +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = ; +// let opt = /*FIND ALL REFS*/{}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButton|] />; +// let opt = <[|MainButton|] children="chidlren" />; +// let opt = {}} />; +// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButton|] goTo="goTo" />; +// let opt = <[|MainButton|] wrong />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 19) skipped --- +// let opt = ; +// let opt = ; +// let opt = {}} />; +// let opt = /*FIND ALL REFS*/{}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButton|] />; +// let opt = <[|MainButton|] children="chidlren" />; +// let opt = <[|MainButton|] onClick={()=>{}} />; +// let opt = {}} ignore-prop />; +// let opt = <[|MainButton|] goTo="goTo" />; +// let opt = <[|MainButton|] wrong />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 20) skipped --- +// let opt = ; +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = /*FIND ALL REFS*/; +// let opt = ; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButton|] />; +// let opt = <[|MainButton|] children="chidlren" />; +// let opt = <[|MainButton|] onClick={()=>{}} />; +// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; +// let opt = ; +// let opt = <[|MainButton|] wrong />; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 21) skipped --- +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = /*FIND ALL REFS*/; + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButton|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButton|] />; +// let opt = <[|MainButton|] children="chidlren" />; +// let opt = <[|MainButton|] onClick={()=>{}} />; +// let opt = <[|MainButton|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButton|] goTo="goTo" />; +// let opt = ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences9.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences9.baseline.jsonc new file mode 100644 index 0000000000..41f35bf02e --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferences9.baseline.jsonc @@ -0,0 +1,11 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 11) skipped --- +// onClick(event?: React.MouseEvent): void; +// } +// interface LinkProps extends ClickableProps { +// /*FIND ALL REFS*/[|goTo|]: string; +// } +// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// // --- (line: 19) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferencesUnionElementType1.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferencesUnionElementType1.baseline.jsonc new file mode 100644 index 0000000000..f93c9e0604 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferencesUnionElementType1.baseline.jsonc @@ -0,0 +1,40 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 9) skipped --- +// function SFC2(prop: { x: boolean }) { +// return

World

; +// } +// /*FIND ALL REFS*/var SFCComp = SFC1 || SFC2; +// + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 9) skipped --- +// function SFC2(prop: { x: boolean }) { +// return

World

; +// } +// var /*FIND ALL REFS*/[|SFCComp|] = SFC1 || SFC2; +// <[|SFCComp|] x={ "hi" } /> + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 10) skipped --- +// return

World

; +// } +// var SFCComp = SFC1 || SFC2; +// /*FIND ALL REFS*/ + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 9) skipped --- +// function SFC2(prop: { x: boolean }) { +// return

World

; +// } +// var [|SFCComp|] = SFC1 || SFC2; +// \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferencesUnionElementType2.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferencesUnionElementType2.baseline.jsonc new file mode 100644 index 0000000000..fa4cc25d78 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllReferences/tsxFindAllReferencesUnionElementType2.baseline.jsonc @@ -0,0 +1,40 @@ +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// } +// private method() { } +// } +// /*FIND ALL REFS*/var RCComp = RC1 || RC2; +// + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// } +// private method() { } +// } +// var /*FIND ALL REFS*/[|RCComp|] = RC1 || RC2; +// <[|RCComp|] /> + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 9) skipped --- +// private method() { } +// } +// var RCComp = RC1 || RC2; +// /*FIND ALL REFS*/ + + + +// === findAllReferences === +// === /file.tsx === +// --- (line: 8) skipped --- +// } +// private method() { } +// } +// var [|RCComp|] = RC1 || RC2; +// \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDef/DeclarationMapGoToDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/DeclarationMapGoToDefinition.baseline.jsonc deleted file mode 100644 index 2f6b197efc..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/DeclarationMapGoToDefinition.baseline.jsonc +++ /dev/null @@ -1,17 +0,0 @@ -// === goToDefinition === -// === /indexdef.d.ts === - -// export declare class Foo { -// member: string; -// [|methodName|](propName: SomeType): void; -// otherMethod(): { -// x: number; -// y?: undefined; -// // --- (line: 7) skipped --- - - -// === /mymodule.ts === - -// import * as mod from "./indexdef"; -// const instance = new mod.Foo(); -// instance./*GO TO DEFINITION*/methodName({member: 12}); diff --git a/testdata/baselines/reference/fourslash/goToDef/DeclarationMapsGoToDefinitionRelativeSourceRoot.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/DeclarationMapsGoToDefinitionRelativeSourceRoot.baseline.jsonc deleted file mode 100644 index 222c09c7d5..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/DeclarationMapsGoToDefinitionRelativeSourceRoot.baseline.jsonc +++ /dev/null @@ -1,17 +0,0 @@ -// === goToDefinition === -// === /out/indexdef.d.ts === - -// export declare class Foo { -// member: string; -// [|methodName|](propName: SomeType): void; -// otherMethod(): { -// x: number; -// y?: undefined; -// // --- (line: 7) skipped --- - - -// === /mymodule.ts === - -// import * as mod from "./out/indexdef"; -// const instance = new mod.Foo(); -// instance./*GO TO DEFINITION*/methodName({member: 12}); diff --git a/testdata/baselines/reference/fourslash/goToDef/DeclarationMapsGoToDefinitionSameNameDifferentDirectory.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/DeclarationMapsGoToDefinitionSameNameDifferentDirectory.baseline.jsonc deleted file mode 100644 index 26e09ac286..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/DeclarationMapsGoToDefinitionSameNameDifferentDirectory.baseline.jsonc +++ /dev/null @@ -1,46 +0,0 @@ -// === goToDefinition === -// === /BaseClass/Source.d.ts === - -// declare class [|Control|] { -// constructor(); -// /** this is a super var */ -// myVar: boolean | 'yeah'; -// } -// //# sourceMappingURL=Source.d.ts.map - - -// === /buttonClass/Source.ts === - -// // I cannot F12 navigate to Control -// // vvvvvvv -// class Button extends /*GO TO DEFINITION*/Control { -// public myFunction() { -// // I cannot F12 navigate to myVar -// // vvvvv -// // --- (line: 7) skipped --- - - - - -// === goToDefinition === -// === /BaseClass/Source.d.ts === - -// declare class Control { -// constructor(); -// /** this is a super var */ -// [|myVar|]: boolean | 'yeah'; -// } -// //# sourceMappingURL=Source.d.ts.map - - -// === /buttonClass/Source.ts === - -// --- (line: 3) skipped --- -// public myFunction() { -// // I cannot F12 navigate to myVar -// // vvvvv -// if (typeof this./*GO TO DEFINITION*/myVar === 'boolean') { -// this.myVar; -// } else { -// this.myVar.toLocaleUpperCase(); -// // --- (line: 11) skipped --- diff --git a/testdata/baselines/reference/fourslash/goToDef/DeclarationMapsOutOfDateMapping.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/DeclarationMapsOutOfDateMapping.baseline.jsonc deleted file mode 100644 index 2d1cff1953..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/DeclarationMapsOutOfDateMapping.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === goToDefinition === -// === /home/src/workspaces/project/node_modules/a/dist/index.d.ts === - -// export declare class [|Foo|] { -// bar: any; -// } -// //# sourceMappingURL=index.d.ts.map - - -// === /home/src/workspaces/project/index.ts === - -// import { Foo/*GO TO DEFINITION*/ } from "a"; diff --git a/testdata/baselines/reference/fourslash/goToDef/Definition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/Definition.baseline.jsonc deleted file mode 100644 index 9d628fc271..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/Definition.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// [|export class Foo {}|] - - -// === /b.ts === - -// import n = require('./a/*GO TO DEFINITION*/'); -// var x = new n.Foo(); diff --git a/testdata/baselines/reference/fourslash/goToDef/Definition01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/Definition01.baseline.jsonc deleted file mode 100644 index 9d628fc271..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/Definition01.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// [|export class Foo {}|] - - -// === /b.ts === - -// import n = require('./a/*GO TO DEFINITION*/'); -// var x = new n.Foo(); diff --git a/testdata/baselines/reference/fourslash/goToDef/DefinitionNameOnEnumMember.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/DefinitionNameOnEnumMember.baseline.jsonc deleted file mode 100644 index 79486c0719..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/DefinitionNameOnEnumMember.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /definitionNameOnEnumMember.ts === - -// enum e { -// firstMember, -// secondMember, -// [|thirdMember|] -// } -// var enumMember = e./*GO TO DEFINITION*/thirdMember; diff --git a/testdata/baselines/reference/fourslash/goToDef/FindAllRefsForDefaultExport.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/FindAllRefsForDefaultExport.baseline.jsonc deleted file mode 100644 index f22094d9de..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/FindAllRefsForDefaultExport.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// export default function [|f|]() {} - - -// === /b.ts === - -// import g from "./a"; -// /*GO TO DEFINITION*/g(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAcrossMultipleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAcrossMultipleProjects.baseline.jsonc deleted file mode 100644 index 745522f41c..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAcrossMultipleProjects.baseline.jsonc +++ /dev/null @@ -1,28 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// var [|x|]: number; - - -// === /b.ts === - -// var [|x|]: number; - - -// === /c.ts === - -// var [|x|]: number; - - -// === /d.ts === - -// var [|x|]: number; - - -// === /e.ts === - -// /// -// /// -// /// -// /// -// /*GO TO DEFINITION*/x++; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAlias.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAlias.baseline.jsonc deleted file mode 100644 index 1a93a31da3..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAlias.baseline.jsonc +++ /dev/null @@ -1,72 +0,0 @@ -// === goToDefinition === -// === /b.ts === - -// import [|alias1|] = require("fileb"); -// module Module { -// export import alias2 = alias1; -// } -// -// // Type position -// var t1: /*GO TO DEFINITION*/alias1.IFoo; -// var t2: Module.alias2.IFoo; -// -// // Value posistion -// var v1 = new alias1.Foo(); -// var v2 = new Module.alias2.Foo(); - - - - -// === goToDefinition === -// === /b.ts === - -// import [|alias1|] = require("fileb"); -// module Module { -// export import alias2 = alias1; -// } -// -// // Type position -// var t1: alias1.IFoo; -// var t2: Module.alias2.IFoo; -// -// // Value posistion -// var v1 = new /*GO TO DEFINITION*/alias1.Foo(); -// var v2 = new Module.alias2.Foo(); - - - - -// === goToDefinition === -// === /b.ts === - -// import alias1 = require("fileb"); -// module Module { -// export import [|alias2|] = alias1; -// } -// -// // Type position -// var t1: alias1.IFoo; -// var t2: Module./*GO TO DEFINITION*/alias2.IFoo; -// -// // Value posistion -// var v1 = new alias1.Foo(); -// var v2 = new Module.alias2.Foo(); - - - - -// === goToDefinition === -// === /b.ts === - -// import alias1 = require("fileb"); -// module Module { -// export import [|alias2|] = alias1; -// } -// -// // Type position -// var t1: alias1.IFoo; -// var t2: Module.alias2.IFoo; -// -// // Value posistion -// var v1 = new alias1.Foo(); -// var v2 = new Module./*GO TO DEFINITION*/alias2.Foo(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAmbiants.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAmbiants.baseline.jsonc deleted file mode 100644 index 9573cc52a4..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAmbiants.baseline.jsonc +++ /dev/null @@ -1,96 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionAmbiants.ts === - -// declare var [|ambientVar|]; -// declare function ambientFunction(); -// declare class ambientClass { -// constructor(); -// static method(); -// public method(); -// } -// -// /*GO TO DEFINITION*/ambientVar = 1; -// ambientFunction(); -// var ambientClassVariable = new ambientClass(); -// ambientClass.method(); -// ambientClassVariable.method(); - - - - -// === goToDefinition === -// === /goToDefinitionAmbiants.ts === - -// declare var ambientVar; -// declare function [|ambientFunction|](); -// declare class ambientClass { -// constructor(); -// static method(); -// public method(); -// } -// -// ambientVar = 1; -// /*GO TO DEFINITION*/ambientFunction(); -// var ambientClassVariable = new ambientClass(); -// ambientClass.method(); -// ambientClassVariable.method(); - - - - -// === goToDefinition === -// === /goToDefinitionAmbiants.ts === - -// declare var ambientVar; -// declare function ambientFunction(); -// declare class [|ambientClass|] { -// [|constructor();|] -// static method(); -// public method(); -// } -// -// ambientVar = 1; -// ambientFunction(); -// var ambientClassVariable = new /*GO TO DEFINITION*/ambientClass(); -// ambientClass.method(); -// ambientClassVariable.method(); - - - - -// === goToDefinition === -// === /goToDefinitionAmbiants.ts === - -// declare var ambientVar; -// declare function ambientFunction(); -// declare class ambientClass { -// constructor(); -// static [|method|](); -// public method(); -// } -// -// ambientVar = 1; -// ambientFunction(); -// var ambientClassVariable = new ambientClass(); -// ambientClass./*GO TO DEFINITION*/method(); -// ambientClassVariable.method(); - - - - -// === goToDefinition === -// === /goToDefinitionAmbiants.ts === - -// declare var ambientVar; -// declare function ambientFunction(); -// declare class ambientClass { -// constructor(); -// static method(); -// public [|method|](); -// } -// -// ambientVar = 1; -// ambientFunction(); -// var ambientClassVariable = new ambientClass(); -// ambientClass.method(); -// ambientClassVariable./*GO TO DEFINITION*/method(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionApparentTypeProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionApparentTypeProperties.baseline.jsonc deleted file mode 100644 index ab7da78e2d..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionApparentTypeProperties.baseline.jsonc +++ /dev/null @@ -1,24 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionApparentTypeProperties.ts === - -// interface Number { -// [|myObjectMethod|](): number; -// } -// -// var o = 0; -// o./*GO TO DEFINITION*/myObjectMethod(); -// o["myObjectMethod"](); - - - - -// === goToDefinition === -// === /goToDefinitionApparentTypeProperties.ts === - -// interface Number { -// [|myObjectMethod|](): number; -// } -// -// var o = 0; -// o.myObjectMethod(); -// o["/*GO TO DEFINITION*/myObjectMethod"](); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait1.baseline.jsonc deleted file mode 100644 index 499c50ad50..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait1.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionAwait1.ts === - -// async function [|foo|]() { -// /*GO TO DEFINITION*/await Promise.resolve(0); -// } -// function notAsync() { -// await Promise.resolve(0); -// } - - - - -// === goToDefinition === -// === /goToDefinitionAwait1.ts === - -// async function foo() { -// await Promise.resolve(0); -// } -// function [|notAsync|]() { -// /*GO TO DEFINITION*/await Promise.resolve(0); -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait2.baseline.jsonc deleted file mode 100644 index 47a1ae6bbd..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait2.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionAwait2.ts === - -// /*GO TO DEFINITION*/await Promise.resolve(0); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait3.baseline.jsonc deleted file mode 100644 index 5029797871..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait3.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionAwait3.ts === - -// class C { -// [|notAsync|]() { -// /*GO TO DEFINITION*/await Promise.resolve(0); -// } -// -// async foo() { -// // --- (line: 7) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionAwait3.ts === - -// class C { -// notAsync() { -// await Promise.resolve(0); -// } -// -// async [|foo|]() { -// /*GO TO DEFINITION*/await Promise.resolve(0); -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait4.baseline.jsonc deleted file mode 100644 index 0db32afffa..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionAwait4.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionAwait4.ts === - -// async function outerAsyncFun() { -// let [|af|] = async () => { -// /*GO TO DEFINITION*/await Promise.resolve(0); -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionBuiltInTypes.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionBuiltInTypes.baseline.jsonc deleted file mode 100644 index 0372c7fc8c..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionBuiltInTypes.baseline.jsonc +++ /dev/null @@ -1,40 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionBuiltInTypes.ts === - -// var n: /*GO TO DEFINITION*/number; -// var s: string; -// var b: boolean; -// var v: void; - - - - -// === goToDefinition === -// === /goToDefinitionBuiltInTypes.ts === - -// var n: number; -// var s: /*GO TO DEFINITION*/string; -// var b: boolean; -// var v: void; - - - - -// === goToDefinition === -// === /goToDefinitionBuiltInTypes.ts === - -// var n: number; -// var s: string; -// var b: /*GO TO DEFINITION*/boolean; -// var v: void; - - - - -// === goToDefinition === -// === /goToDefinitionBuiltInTypes.ts === - -// var n: number; -// var s: string; -// var b: boolean; -// var v: /*GO TO DEFINITION*/void; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionBuiltInValues.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionBuiltInValues.baseline.jsonc deleted file mode 100644 index a0f5c84325..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionBuiltInValues.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionBuiltInValues.ts === - -// var u = /*GO TO DEFINITION*/undefined; -// var n = null; -// var a = function() { return arguments; }; -// var t = true; -// var f = false; - - - - -// === goToDefinition === -// === /goToDefinitionBuiltInValues.ts === - -// var u = undefined; -// var n = /*GO TO DEFINITION*/null; -// var a = function() { return arguments; }; -// var t = true; -// var f = false; - - - - -// === goToDefinition === -// === /goToDefinitionBuiltInValues.ts === - -// var u = undefined; -// var n = null; -// var a = function() { return /*GO TO DEFINITION*/arguments; }; -// var t = true; -// var f = false; - - - - -// === goToDefinition === -// === /goToDefinitionBuiltInValues.ts === - -// var u = undefined; -// var n = null; -// var a = function() { return arguments; }; -// var t = /*GO TO DEFINITION*/true; -// var f = false; - - - - -// === goToDefinition === -// === /goToDefinitionBuiltInValues.ts === - -// var u = undefined; -// var n = null; -// var a = function() { return arguments; }; -// var t = true; -// var f = /*GO TO DEFINITION*/false; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionCSSPatternAmbientModule.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionCSSPatternAmbientModule.baseline.jsonc deleted file mode 100644 index 038983e5b0..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionCSSPatternAmbientModule.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === goToDefinition === -// === /types.ts === - -// declare module [|"*.css"|] { -// const styles: any; -// export = styles; -// } - - -// === /index.ts === - -// import styles from /*GO TO DEFINITION*/"./index.css"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionClassConstructors.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionClassConstructors.baseline.jsonc deleted file mode 100644 index 35175ec694..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionClassConstructors.baseline.jsonc +++ /dev/null @@ -1,76 +0,0 @@ -// === goToDefinition === -// === /definitions.ts === - -// export class Base { -// [|constructor(protected readonly cArg: string) {}|] -// } -// -// export class [|Derived|] extends Base { -// readonly email = this.cArg.getByLabel('Email') -// readonly password = this.cArg.getByLabel('Password') -// } - - -// === /main.ts === - -// import { Derived } from './definitions' -// const derived = new /*GO TO DEFINITION*/Derived(cArg) - - - - -// === goToDefinition === -// === /defInSameFile.ts === - -// import { Base } from './definitions' -// class [|SameFile|] extends Base { -// readonly name: string = 'SameFile' -// } -// const SameFile = new /*GO TO DEFINITION*/SameFile(cArg) -// const wrapper = new Base(cArg) - - -// === /definitions.ts === - -// export class Base { -// [|constructor(protected readonly cArg: string) {}|] -// } -// -// export class Derived extends Base { -// // --- (line: 6) skipped --- - - - - -// === goToDefinition === -// === /hasConstructor.ts === - -// import { Base } from './definitions' -// class [|HasConstructor|] extends Base { -// [|constructor() {}|] -// readonly name: string = ''; -// } -// const hasConstructor = new /*GO TO DEFINITION*/HasConstructor(cArg) - - - - -// === goToDefinition === -// === /definitions.ts === - -// export class [|Base|] { -// [|constructor(protected readonly cArg: string) {}|] -// } -// -// export class Derived extends Base { -// // --- (line: 6) skipped --- - - -// === /defInSameFile.ts === - -// import { Base } from './definitions' -// class SameFile extends Base { -// readonly name: string = 'SameFile' -// } -// const SameFile = new SameFile(cArg) -// const wrapper = new /*GO TO DEFINITION*/Base(cArg) diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionClassStaticBlocks.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionClassStaticBlocks.baseline.jsonc deleted file mode 100644 index 330e892f1d..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionClassStaticBlocks.baseline.jsonc +++ /dev/null @@ -1,39 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionClassStaticBlocks.ts === - -// class ClassStaticBocks { -// static x; -// /*GO TO DEFINITION*/static {} -// static y; -// static {} -// static y; -// static {} -// } - - - - -// === goToDefinition === -// === /goToDefinitionClassStaticBlocks.ts === - -// class ClassStaticBocks { -// static x; -// static {} -// static y; -// /*GO TO DEFINITION*/static {} -// static y; -// static {} -// } - - - - -// === goToDefinition === -// === /goToDefinitionClassStaticBlocks.ts === - -// --- (line: 3) skipped --- -// static y; -// static {} -// static y; -// /*GO TO DEFINITION*/static {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionConstructorOfClassExpression01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionConstructorOfClassExpression01.baseline.jsonc deleted file mode 100644 index 190d74c6c4..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionConstructorOfClassExpression01.baseline.jsonc +++ /dev/null @@ -1,152 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionConstructorOfClassExpression01.ts === - -// var x = class [|C|] { -// [|constructor() { -// var other = new /*GO TO DEFINITION*/C; -// }|] -// } -// -// var y = class C extends x { -// // --- (line: 8) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionConstructorOfClassExpression01.ts === - -// --- (line: 3) skipped --- -// } -// } -// -// var y = class [|C|] extends x { -// [|constructor() { -// super(); -// var other = new /*GO TO DEFINITION*/C; -// }|] -// } -// var z = class C extends x { -// m() { -// // --- (line: 15) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionConstructorOfClassExpression01.ts === - -// var x = class C { -// [|constructor() { -// var other = new C; -// }|] -// } -// -// var y = class C extends x { -// constructor() { -// super(); -// var other = new C; -// } -// } -// var z = class [|C|] extends x { -// m() { -// return new /*GO TO DEFINITION*/C; -// } -// } -// -// // --- (line: 19) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionConstructorOfClassExpression01.ts === - -// --- (line: 15) skipped --- -// } -// } -// -// var x1 = new /*GO TO DEFINITION*/C(); -// var x2 = new x(); -// var y1 = new y(); -// var z1 = new z(); - - - - -// === goToDefinition === -// === /goToDefinitionConstructorOfClassExpression01.ts === - -// var [|x|] = class C { -// [|constructor() { -// var other = new C; -// }|] -// } -// -// var y = class C extends x { -// // --- (line: 8) skipped --- - - -// --- (line: 16) skipped --- -// } -// -// var x1 = new C(); -// var x2 = new /*GO TO DEFINITION*/x(); -// var y1 = new y(); -// var z1 = new z(); - - - - -// === goToDefinition === -// === /goToDefinitionConstructorOfClassExpression01.ts === - -// --- (line: 3) skipped --- -// } -// } -// -// var [|y|] = class C extends x { -// [|constructor() { -// super(); -// var other = new C; -// }|] -// } -// var z = class C extends x { -// m() { -// return new C; -// } -// } -// -// var x1 = new C(); -// var x2 = new x(); -// var y1 = new /*GO TO DEFINITION*/y(); -// var z1 = new z(); - - - - -// === goToDefinition === -// === /goToDefinitionConstructorOfClassExpression01.ts === - -// var x = class C { -// [|constructor() { -// var other = new C; -// }|] -// } -// -// var y = class C extends x { -// constructor() { -// super(); -// var other = new C; -// } -// } -// var [|z|] = class C extends x { -// m() { -// return new C; -// } -// } -// -// var x1 = new C(); -// var x2 = new x(); -// var y1 = new y(); -// var z1 = new /*GO TO DEFINITION*/z(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.baseline.jsonc deleted file mode 100644 index 28bc8eeaff..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.baseline.jsonc +++ /dev/null @@ -1,13 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.ts === - -// namespace [|Foo|] { -// export var x; -// } -// -// class [|Foo|] { -// [|constructor() { -// }|] -// } -// -// var x = new /*GO TO DEFINITION*/Foo(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionConstructorOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionConstructorOverloads.baseline.jsonc deleted file mode 100644 index 81d96484f9..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionConstructorOverloads.baseline.jsonc +++ /dev/null @@ -1,90 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionConstructorOverloads.ts === - -// class [|ConstructorOverload|] { -// [|constructor();|] -// constructor(foo: string); -// constructor(foo: any) { } -// } -// -// var constructorOverload = new /*GO TO DEFINITION*/ConstructorOverload(); -// var constructorOverload = new ConstructorOverload("foo"); -// -// class Extended extends ConstructorOverload { -// // --- (line: 11) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionConstructorOverloads.ts === - -// class [|ConstructorOverload|] { -// constructor(); -// [|constructor(foo: string);|] -// constructor(foo: any) { } -// } -// -// var constructorOverload = new ConstructorOverload(); -// var constructorOverload = new /*GO TO DEFINITION*/ConstructorOverload("foo"); -// -// class Extended extends ConstructorOverload { -// readonly name = "extended"; -// // --- (line: 12) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionConstructorOverloads.ts === - -// class ConstructorOverload { -// /*GO TO DEFINITION*/[|constructor();|] -// [|constructor(foo: string);|] -// [|constructor(foo: any) { }|] -// } -// -// var constructorOverload = new ConstructorOverload(); -// // --- (line: 8) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionConstructorOverloads.ts === - -// class ConstructorOverload { -// [|constructor();|] -// constructor(foo: string); -// constructor(foo: any) { } -// } -// -// var constructorOverload = new ConstructorOverload(); -// var constructorOverload = new ConstructorOverload("foo"); -// -// class [|Extended|] extends ConstructorOverload { -// readonly name = "extended"; -// } -// var extended1 = new /*GO TO DEFINITION*/Extended(); -// var extended2 = new Extended("foo"); - - - - -// === goToDefinition === -// === /goToDefinitionConstructorOverloads.ts === - -// class ConstructorOverload { -// constructor(); -// [|constructor(foo: string);|] -// constructor(foo: any) { } -// } -// -// var constructorOverload = new ConstructorOverload(); -// var constructorOverload = new ConstructorOverload("foo"); -// -// class [|Extended|] extends ConstructorOverload { -// readonly name = "extended"; -// } -// var extended1 = new Extended(); -// var extended2 = new /*GO TO DEFINITION*/Extended("foo"); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDecorator.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDecorator.baseline.jsonc deleted file mode 100644 index 093a02279b..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDecorator.baseline.jsonc +++ /dev/null @@ -1,40 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// function [|decorator|](target) { -// return target; -// } -// function decoratorFactory(...args) { -// return target => target; -// } - - -// === /b.ts === - -// @/*GO TO DEFINITION*/decorator -// class C { -// @decoratorFactory(a, "22", true) -// method() {} -// } - - - - -// === goToDefinition === -// === /a.ts === - -// function decorator(target) { -// return target; -// } -// function [|decoratorFactory|](...args) { -// return target => target; -// } - - -// === /b.ts === - -// @decorator -// class C { -// @decora/*GO TO DEFINITION*/torFactory(a, "22", true) -// method() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDecoratorOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDecoratorOverloads.baseline.jsonc deleted file mode 100644 index 230ffee836..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDecoratorOverloads.baseline.jsonc +++ /dev/null @@ -1,32 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionDecoratorOverloads.ts === - -// async function f() {} -// -// function [|dec|](target: any, propertyKey: string): void; -// function dec(target: any, propertyKey: symbol): void; -// function dec(target: any, propertyKey: string | symbol) {} -// -// declare const s: symbol; -// class C { -// @/*GO TO DEFINITION*/dec f() {} -// @dec [s]() {} -// } - - - - -// === goToDefinition === -// === /goToDefinitionDecoratorOverloads.ts === - -// async function f() {} -// -// function dec(target: any, propertyKey: string): void; -// function [|dec|](target: any, propertyKey: symbol): void; -// function dec(target: any, propertyKey: string | symbol) {} -// -// declare const s: symbol; -// class C { -// @dec f() {} -// @/*GO TO DEFINITION*/dec [s]() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDestructuredRequire1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDestructuredRequire1.baseline.jsonc deleted file mode 100644 index 8b68ee5b2a..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDestructuredRequire1.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /util.js === - -// class Util {} -// module.exports = { [|Util|] }; - - -// === /index.js === - -// const { Util } = require('./util'); -// new Util/*GO TO DEFINITION*/() diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDestructuredRequire2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDestructuredRequire2.baseline.jsonc deleted file mode 100644 index f9cf078539..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDestructuredRequire2.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /reexport.js === - -// const { Util } = require('./util'); -// module.exports = { [|Util|] }; - - -// === /index.js === - -// const { Util } = require('./reexport'); -// new Util/*GO TO DEFINITION*/() diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDifferentFile.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDifferentFile.baseline.jsonc deleted file mode 100644 index 73e3c72356..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDifferentFile.baseline.jsonc +++ /dev/null @@ -1,101 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionDifferentFile_Definition.ts === - -// var [|remoteVariable|]; -// function remoteFunction() { } -// class remoteClass { } -// interface remoteInterface{ } -// module remoteModule{ export var foo = 1;} - - -// === /goToDefinitionDifferentFile_Consumption.ts === - -// /*GO TO DEFINITION*/remoteVariable = 1; -// remoteFunction(); -// var foo = new remoteClass(); -// class fooCls implements remoteInterface { } -// var fooVar = remoteModule.foo; - - - - -// === goToDefinition === -// === /goToDefinitionDifferentFile_Definition.ts === - -// var remoteVariable; -// function [|remoteFunction|]() { } -// class remoteClass { } -// interface remoteInterface{ } -// module remoteModule{ export var foo = 1;} - - -// === /goToDefinitionDifferentFile_Consumption.ts === - -// remoteVariable = 1; -// /*GO TO DEFINITION*/remoteFunction(); -// var foo = new remoteClass(); -// class fooCls implements remoteInterface { } -// var fooVar = remoteModule.foo; - - - - -// === goToDefinition === -// === /goToDefinitionDifferentFile_Definition.ts === - -// var remoteVariable; -// function remoteFunction() { } -// class [|remoteClass|] { } -// interface remoteInterface{ } -// module remoteModule{ export var foo = 1;} - - -// === /goToDefinitionDifferentFile_Consumption.ts === - -// remoteVariable = 1; -// remoteFunction(); -// var foo = new /*GO TO DEFINITION*/remoteClass(); -// class fooCls implements remoteInterface { } -// var fooVar = remoteModule.foo; - - - - -// === goToDefinition === -// === /goToDefinitionDifferentFile_Definition.ts === - -// var remoteVariable; -// function remoteFunction() { } -// class remoteClass { } -// interface [|remoteInterface|]{ } -// module remoteModule{ export var foo = 1;} - - -// === /goToDefinitionDifferentFile_Consumption.ts === - -// remoteVariable = 1; -// remoteFunction(); -// var foo = new remoteClass(); -// class fooCls implements /*GO TO DEFINITION*/remoteInterface { } -// var fooVar = remoteModule.foo; - - - - -// === goToDefinition === -// === /goToDefinitionDifferentFile_Definition.ts === - -// var remoteVariable; -// function remoteFunction() { } -// class remoteClass { } -// interface remoteInterface{ } -// module [|remoteModule|]{ export var foo = 1;} - - -// === /goToDefinitionDifferentFile_Consumption.ts === - -// remoteVariable = 1; -// remoteFunction(); -// var foo = new remoteClass(); -// class fooCls implements remoteInterface { } -// var fooVar = /*GO TO DEFINITION*/remoteModule.foo; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDifferentFileIndirectly.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDifferentFileIndirectly.baseline.jsonc deleted file mode 100644 index ca60f48be5..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDifferentFileIndirectly.baseline.jsonc +++ /dev/null @@ -1,101 +0,0 @@ -// === goToDefinition === -// === /Remote2.ts === - -// var [|rem2Var|]; -// function rem2Fn() { } -// class rem2Cls { } -// interface rem2Int{} -// module rem2Mod { export var foo; } - - -// === /Definition.ts === - -// /*GO TO DEFINITION*/rem2Var = 1; -// rem2Fn(); -// var rem2foo = new rem2Cls(); -// class rem2fooCls implements rem2Int { } -// var rem2fooVar = rem2Mod.foo; - - - - -// === goToDefinition === -// === /Remote2.ts === - -// var rem2Var; -// function [|rem2Fn|]() { } -// class rem2Cls { } -// interface rem2Int{} -// module rem2Mod { export var foo; } - - -// === /Definition.ts === - -// rem2Var = 1; -// /*GO TO DEFINITION*/rem2Fn(); -// var rem2foo = new rem2Cls(); -// class rem2fooCls implements rem2Int { } -// var rem2fooVar = rem2Mod.foo; - - - - -// === goToDefinition === -// === /Remote2.ts === - -// var rem2Var; -// function rem2Fn() { } -// class [|rem2Cls|] { } -// interface rem2Int{} -// module rem2Mod { export var foo; } - - -// === /Definition.ts === - -// rem2Var = 1; -// rem2Fn(); -// var rem2foo = new /*GO TO DEFINITION*/rem2Cls(); -// class rem2fooCls implements rem2Int { } -// var rem2fooVar = rem2Mod.foo; - - - - -// === goToDefinition === -// === /Remote2.ts === - -// var rem2Var; -// function rem2Fn() { } -// class rem2Cls { } -// interface [|rem2Int|]{} -// module rem2Mod { export var foo; } - - -// === /Definition.ts === - -// rem2Var = 1; -// rem2Fn(); -// var rem2foo = new rem2Cls(); -// class rem2fooCls implements /*GO TO DEFINITION*/rem2Int { } -// var rem2fooVar = rem2Mod.foo; - - - - -// === goToDefinition === -// === /Remote2.ts === - -// var rem2Var; -// function rem2Fn() { } -// class rem2Cls { } -// interface rem2Int{} -// module [|rem2Mod|] { export var foo; } - - -// === /Definition.ts === - -// rem2Var = 1; -// rem2Fn(); -// var rem2foo = new rem2Cls(); -// class rem2fooCls implements rem2Int { } -// var rem2fooVar = /*GO TO DEFINITION*/rem2Mod.foo; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport1.baseline.jsonc deleted file mode 100644 index 785b36a333..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport1.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === goToDefinition === -// === /foo.ts === - -// [|export function foo() { return "foo"; } -// import("./f/*GO TO DEFINITION*/oo") -// var x = import("./foo")|] - - - - -// === goToDefinition === -// === /foo.ts === - -// [|export function foo() { return "foo"; } -// import("./foo") -// var x = import("./fo/*GO TO DEFINITION*/o")|] diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport2.baseline.jsonc deleted file mode 100644 index a05e56f6f2..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport2.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /foo.ts === - -// export function [|bar|]() { return "bar"; } -// var x = import("./foo"); -// x.then(foo => { -// foo.b/*GO TO DEFINITION*/ar(); -// }) diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport3.baseline.jsonc deleted file mode 100644 index f9336d9e62..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport3.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === goToDefinition === -// === /foo.ts === - -// export function bar() { return "bar"; } -// import('./foo').then(({ [|ba/*GO TO DEFINITION*/r|] }) => undefined); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport4.baseline.jsonc deleted file mode 100644 index f9336d9e62..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionDynamicImport4.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === goToDefinition === -// === /foo.ts === - -// export function bar() { return "bar"; } -// import('./foo').then(({ [|ba/*GO TO DEFINITION*/r|] }) => undefined); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExpandoClass1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExpandoClass1.baseline.jsonc deleted file mode 100644 index a5ff13bab4..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExpandoClass1.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /index.js === - -// const Core = {} -// -// Core.[|Test|] = class { } -// -// Core.Test.prototype.foo = 10 -// -// new Core.Tes/*GO TO DEFINITION*/t() diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExpandoClass2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExpandoClass2.baseline.jsonc deleted file mode 100644 index 0f782f9eab..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExpandoClass2.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === goToDefinition === -// === /index.js === - -// const Core = {} -// -// Core.[|Test|] = class { -// [|constructor() { }|] -// } -// -// Core.Test.prototype.foo = 10 -// -// new Core.Tes/*GO TO DEFINITION*/t() diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExpandoElementAccess.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExpandoElementAccess.baseline.jsonc deleted file mode 100644 index ba7dcf8388..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExpandoElementAccess.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionExpandoElementAccess.ts === - -// function f() {} -// f[[|"x"|]] = 0; -// f[/*GO TO DEFINITION*/[|"x"|]] = 1; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName.baseline.jsonc deleted file mode 100644 index 9d628fc271..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// [|export class Foo {}|] - - -// === /b.ts === - -// import n = require('./a/*GO TO DEFINITION*/'); -// var x = new n.Foo(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName2.baseline.jsonc deleted file mode 100644 index 23babaf566..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName2.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// [|class Foo {} -// export var x = 0;|] - - -// === /b.ts === - -// import n = require('./a/*GO TO DEFINITION*/'); -// var x = new n.Foo(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName3.baseline.jsonc deleted file mode 100644 index 2906c9ba26..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName3.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// declare module [|"e"|] { -// class Foo { } -// } - - -// === /b.ts === - -// import n = require('e/*GO TO DEFINITION*/'); -// var x = new n.Foo(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName4.baseline.jsonc deleted file mode 100644 index a3ad6ce3a9..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName4.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === goToDefinition === -// === /b.ts === - -// import n = require('unknown/*GO TO DEFINITION*/'); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName6.baseline.jsonc deleted file mode 100644 index 3d06c80981..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName6.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// declare module [|"e"|] { -// class Foo { } -// } - - -// === /b.ts === - -// import * from 'e/*GO TO DEFINITION*/'; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName7.baseline.jsonc deleted file mode 100644 index 9d348f7d5f..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName7.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// declare module [|"e"|] { -// class Foo { } -// } - - -// === /b.ts === - -// import {Foo, Bar} from 'e/*GO TO DEFINITION*/'; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName8.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName8.baseline.jsonc deleted file mode 100644 index 040ee5d897..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName8.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// declare module [|"e"|] { -// class Foo { } -// } - - -// === /b.ts === - -// export {Foo, Bar} from 'e/*GO TO DEFINITION*/'; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName9.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName9.baseline.jsonc deleted file mode 100644 index ee436e817e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionExternalModuleName9.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// declare module [|"e"|] { -// class Foo { } -// } - - -// === /b.ts === - -// export * from 'e/*GO TO DEFINITION*/'; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionFunctionOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionFunctionOverloads.baseline.jsonc deleted file mode 100644 index 4c8b8dd881..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionFunctionOverloads.baseline.jsonc +++ /dev/null @@ -1,52 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionFunctionOverloads.ts === - -// function [|functionOverload|](value: number); -// function functionOverload(value: string); -// function functionOverload() {} -// -// /*GO TO DEFINITION*/functionOverload(123); -// functionOverload("123"); -// functionOverload({}); - - - - -// === goToDefinition === -// === /goToDefinitionFunctionOverloads.ts === - -// function functionOverload(value: number); -// function [|functionOverload|](value: string); -// function functionOverload() {} -// -// functionOverload(123); -// /*GO TO DEFINITION*/functionOverload("123"); -// functionOverload({}); - - - - -// === goToDefinition === -// === /goToDefinitionFunctionOverloads.ts === - -// function [|functionOverload|](value: number); -// function functionOverload(value: string); -// function functionOverload() {} -// -// functionOverload(123); -// functionOverload("123"); -// /*GO TO DEFINITION*/functionOverload({}); - - - - -// === goToDefinition === -// === /goToDefinitionFunctionOverloads.ts === - -// function /*GO TO DEFINITION*/[|functionOverload|](value: number); -// function [|functionOverload|](value: string); -// function [|functionOverload|]() {} -// -// functionOverload(123); -// functionOverload("123"); -// functionOverload({}); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionFunctionOverloadsInClass.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionFunctionOverloadsInClass.baseline.jsonc deleted file mode 100644 index 4230a17f0c..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionFunctionOverloadsInClass.baseline.jsonc +++ /dev/null @@ -1,28 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionFunctionOverloadsInClass.ts === - -// class clsInOverload { -// static [|fnOverload|](); -// static /*GO TO DEFINITION*/[|fnOverload|](foo: string); -// static [|fnOverload|](foo: any) { } -// public fnOverload(): any; -// public fnOverload(foo: string); -// public fnOverload(foo: any) { return "foo" } -// // --- (line: 8) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionFunctionOverloadsInClass.ts === - -// class clsInOverload { -// static fnOverload(); -// static fnOverload(foo: string); -// static fnOverload(foo: any) { } -// public /*GO TO DEFINITION*/[|fnOverload|](): any; -// public [|fnOverload|](foo: string); -// public [|fnOverload|](foo: any) { return "foo" } -// -// constructor() { } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionFunctionType.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionFunctionType.baseline.jsonc deleted file mode 100644 index 2560509821..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionFunctionType.baseline.jsonc +++ /dev/null @@ -1,40 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionFunctionType.ts === - -// const [|c|]: () => void; -// /*GO TO DEFINITION*/c(); -// function test(cb: () => void) { -// cb(); -// } -// // --- (line: 6) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionFunctionType.ts === - -// const c: () => void; -// c(); -// function test([|cb|]: () => void) { -// /*GO TO DEFINITION*/cb(); -// } -// class C { -// prop: () => void; -// // --- (line: 8) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionFunctionType.ts === - -// --- (line: 3) skipped --- -// cb(); -// } -// class C { -// [|prop|]: () => void; -// m() { -// this./*GO TO DEFINITION*/prop(); -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImplicitConstructor.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImplicitConstructor.baseline.jsonc deleted file mode 100644 index 8072ce52e3..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImplicitConstructor.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionImplicitConstructor.ts === - -// class [|ImplicitConstructor|] { -// } -// var implicitConstructor = new /*GO TO DEFINITION*/ImplicitConstructor(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImport1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImport1.baseline.jsonc deleted file mode 100644 index 9dc3601368..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImport1.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /b.ts === - -// [|export const foo = 1;|] - - -// === /a.ts === - -// import { foo } from "./b/*GO TO DEFINITION*/"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImport2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImport2.baseline.jsonc deleted file mode 100644 index c62a776d36..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImport2.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// import { foo } from/*GO TO DEFINITION*/ "./b"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImport3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImport3.baseline.jsonc deleted file mode 100644 index 2759540a10..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImport3.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// import { foo } from /*GO TO DEFINITION*/ "./b"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames.baseline.jsonc deleted file mode 100644 index 2282246b5d..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// export module Module { -// } -// export class [|Class|] { -// private f; -// } -// export interface Interface { -// x; -// } - - -// === /b.ts === - -// export {/*GO TO DEFINITION*/Class} from "./a"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames10.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames10.baseline.jsonc deleted file mode 100644 index 81d8e3cf17..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames10.baseline.jsonc +++ /dev/null @@ -1,13 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// class Class { -// f; -// } -// module.exports.[|Class|] = Class; - - -// === /b.js === - -// const { Class } = require("./a"); -// /*GO TO DEFINITION*/Class; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames11.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames11.baseline.jsonc deleted file mode 100644 index 3aea74d06e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames11.baseline.jsonc +++ /dev/null @@ -1,13 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// class Class { -// f; -// } -// module.exports = { [|Class|] }; - - -// === /b.js === - -// const { Class } = require("./a"); -// /*GO TO DEFINITION*/Class; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames2.baseline.jsonc deleted file mode 100644 index d7828b4ce8..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames2.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// export module Module { -// } -// export class [|Class|] { -// private f; -// } -// export interface Interface { -// x; -// } - - -// === /b.ts === - -// import {/*GO TO DEFINITION*/Class} from "./a"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames3.baseline.jsonc deleted file mode 100644 index 71deedc5f3..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames3.baseline.jsonc +++ /dev/null @@ -1,38 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// export module Module { -// } -// export class [|Class|] { -// private f; -// } -// export interface Interface { -// x; -// } - - -// === /e.ts === - -// import {M, C, I} from "./d"; -// var c = new /*GO TO DEFINITION*/C(); - - - - -// === goToDefinition === -// === /a.ts === - -// export module Module { -// } -// export class [|Class|] { -// private f; -// } -// export interface Interface { -// x; -// } - - -// === /e.ts === - -// import {M, /*GO TO DEFINITION*/C, I} from "./d"; -// var c = new C(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames4.baseline.jsonc deleted file mode 100644 index 7a0d40de79..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames4.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// export module Module { -// } -// export class [|Class|] { -// private f; -// } -// export interface Interface { -// x; -// } - - -// === /b.ts === - -// import {Class as /*GO TO DEFINITION*/ClassAlias} from "./a"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames5.baseline.jsonc deleted file mode 100644 index cd091788ce..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames5.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// export module Module { -// } -// export class [|Class|] { -// private f; -// } -// export interface Interface { -// x; -// } - - -// === /b.ts === - -// export {Class as /*GO TO DEFINITION*/ClassAlias} from "./a"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames6.baseline.jsonc deleted file mode 100644 index 8d32931ebc..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames6.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// [|export module Module { -// } -// export class Class { -// private f; -// } -// export interface Interface { -// x; -// }|] - - -// === /b.ts === - -// import /*GO TO DEFINITION*/alias = require("./a"); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames7.baseline.jsonc deleted file mode 100644 index a14ce34c75..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames7.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// class [|Class|] { -// private f; -// } -// export default Class; - - -// === /b.ts === - -// import /*GO TO DEFINITION*/defaultExport from "./a"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames8.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames8.baseline.jsonc deleted file mode 100644 index 9d0450fdf1..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames8.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// class [|Class|] { -// private f; -// } -// export { Class }; - - -// === /b.js === - -// import { /*GO TO DEFINITION*/Class } from "./a"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames9.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames9.baseline.jsonc deleted file mode 100644 index d50fd5d70e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImportedNames9.baseline.jsonc +++ /dev/null @@ -1,13 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// class [|Class|] { -// f; -// } -// export { Class }; - - -// === /b.js === - -// const { Class } = require("./a"); -// /*GO TO DEFINITION*/Class; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImports.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImports.baseline.jsonc deleted file mode 100644 index b1618fc234..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionImports.baseline.jsonc +++ /dev/null @@ -1,70 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// [|export default function f() {} -// export const x = 0;|] - - -// === /b.ts === - -// import f, { x } from "./a"; -// import * as a from "./a"; -// import b = require("./b"); -// f; -// x; -// /*GO TO DEFINITION*/a; -// b; - - - - -// === goToDefinition === -// === /a.ts === - -// export default function [|f|]() {} -// export const x = 0; - - -// === /b.ts === - -// import f, { x } from "./a"; -// import * as a from "./a"; -// import b = require("./b"); -// /*GO TO DEFINITION*/f; -// x; -// a; -// b; - - - - -// === goToDefinition === -// === /a.ts === - -// export default function f() {} -// export const [|x|] = 0; - - -// === /b.ts === - -// import f, { x } from "./a"; -// import * as a from "./a"; -// import b = require("./b"); -// f; -// /*GO TO DEFINITION*/x; -// a; -// b; - - - - -// === goToDefinition === -// === /b.ts === - -// [|import f, { x } from "./a"; -// import * as a from "./a"; -// import b = require("./b"); -// f; -// x; -// a; -// /*GO TO DEFINITION*/b;|] diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInMemberDeclaration.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInMemberDeclaration.baseline.jsonc deleted file mode 100644 index 2152a5ba0a..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInMemberDeclaration.baseline.jsonc +++ /dev/null @@ -1,171 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionInMemberDeclaration.ts === - -// interface [|IFoo|] { method1(): number; } -// -// class Foo implements IFoo { -// public method1(): number { return 0; } -// } -// -// enum Enum { value1, value2 }; -// -// class Bar { -// public _interface: IFo/*GO TO DEFINITION*/o = new Foo(); -// public _class: Foo = new Foo(); -// public _list: IFoo[]=[]; -// public _enum: Enum = Enum.value1; -// // --- (line: 14) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionInMemberDeclaration.ts === - -// interface [|IFoo|] { method1(): number; } -// -// class Foo implements IFoo { -// public method1(): number { return 0; } -// // --- (line: 5) skipped --- - - -// --- (line: 8) skipped --- -// class Bar { -// public _interface: IFoo = new Foo(); -// public _class: Foo = new Foo(); -// public _list: IF/*GO TO DEFINITION*/oo[]=[]; -// public _enum: Enum = Enum.value1; -// public _self: Bar; -// -// // --- (line: 16) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionInMemberDeclaration.ts === - -// interface [|IFoo|] { method1(): number; } -// -// class Foo implements IFoo { -// public method1(): number { return 0; } -// // --- (line: 5) skipped --- - - -// --- (line: 12) skipped --- -// public _enum: Enum = Enum.value1; -// public _self: Bar; -// -// constructor(public _inConstructor: IFo/*GO TO DEFINITION*/o) { -// } -// } - - - - -// === goToDefinition === -// === /goToDefinitionInMemberDeclaration.ts === - -// interface IFoo { method1(): number; } -// -// class [|Foo|] implements IFoo { -// public method1(): number { return 0; } -// } -// -// enum Enum { value1, value2 }; -// -// class Bar { -// public _interface: IFoo = new Foo(); -// public _class: Fo/*GO TO DEFINITION*/o = new Foo(); -// public _list: IFoo[]=[]; -// public _enum: Enum = Enum.value1; -// public _self: Bar; -// // --- (line: 15) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionInMemberDeclaration.ts === - -// interface IFoo { method1(): number; } -// -// class [|Foo|] implements IFoo { -// public method1(): number { return 0; } -// } -// -// enum Enum { value1, value2 }; -// -// class Bar { -// public _interface: IFoo = new Fo/*GO TO DEFINITION*/o(); -// public _class: Foo = new Foo(); -// public _list: IFoo[]=[]; -// public _enum: Enum = Enum.value1; -// // --- (line: 14) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionInMemberDeclaration.ts === - -// --- (line: 3) skipped --- -// public method1(): number { return 0; } -// } -// -// enum [|Enum|] { value1, value2 }; -// -// class Bar { -// public _interface: IFoo = new Foo(); -// public _class: Foo = new Foo(); -// public _list: IFoo[]=[]; -// public _enum: E/*GO TO DEFINITION*/num = Enum.value1; -// public _self: Bar; -// -// constructor(public _inConstructor: IFoo) { -// } -// } - - - - -// === goToDefinition === -// === /goToDefinitionInMemberDeclaration.ts === - -// --- (line: 3) skipped --- -// public method1(): number { return 0; } -// } -// -// enum [|Enum|] { value1, value2 }; -// -// class Bar { -// public _interface: IFoo = new Foo(); -// public _class: Foo = new Foo(); -// public _list: IFoo[]=[]; -// public _enum: Enum = En/*GO TO DEFINITION*/um.value1; -// public _self: Bar; -// -// constructor(public _inConstructor: IFoo) { -// } -// } - - - - -// === goToDefinition === -// === /goToDefinitionInMemberDeclaration.ts === - -// --- (line: 5) skipped --- -// -// enum Enum { value1, value2 }; -// -// class [|Bar|] { -// public _interface: IFoo = new Foo(); -// public _class: Foo = new Foo(); -// public _list: IFoo[]=[]; -// public _enum: Enum = Enum.value1; -// public _self: Ba/*GO TO DEFINITION*/r; -// -// constructor(public _inConstructor: IFoo) { -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInTypeArgument.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInTypeArgument.baseline.jsonc deleted file mode 100644 index dabf7326e3..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInTypeArgument.baseline.jsonc +++ /dev/null @@ -1,20 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionInTypeArgument.ts === - -// class Foo { } -// -// class [|Bar|] { } -// -// var x = new Foo(); - - - - -// === goToDefinition === -// === /goToDefinitionInTypeArgument.ts === - -// class [|Foo|] { } -// -// class Bar { } -// -// var x = new Fo/*GO TO DEFINITION*/o(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionIndexSignature.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionIndexSignature.baseline.jsonc deleted file mode 100644 index f28879d050..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionIndexSignature.baseline.jsonc +++ /dev/null @@ -1,109 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionIndexSignature.ts === - -// interface I { -// [|[x: string]: boolean;|] -// } -// interface J { -// [x: string]: number; -// } -// interface K { -// [x: `a${string}`]: string; -// [x: `${string}b`]: string; -// } -// declare const i: I; -// i./*GO TO DEFINITION*/foo; -// declare const ij: I | J; -// ij.foo; -// declare const k: K; -// // --- (line: 16) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionIndexSignature.ts === - -// interface I { -// [|[x: string]: boolean;|] -// } -// interface J { -// [|[x: string]: number;|] -// } -// interface K { -// [x: `a${string}`]: string; -// [x: `${string}b`]: string; -// } -// declare const i: I; -// i.foo; -// declare const ij: I | J; -// ij./*GO TO DEFINITION*/foo; -// declare const k: K; -// k.a; -// k.b; -// k.ab; - - - - -// === goToDefinition === -// === /goToDefinitionIndexSignature.ts === - -// --- (line: 4) skipped --- -// [x: string]: number; -// } -// interface K { -// [|[x: `a${string}`]: string;|] -// [x: `${string}b`]: string; -// } -// declare const i: I; -// i.foo; -// declare const ij: I | J; -// ij.foo; -// declare const k: K; -// k./*GO TO DEFINITION*/a; -// k.b; -// k.ab; - - - - -// === goToDefinition === -// === /goToDefinitionIndexSignature.ts === - -// --- (line: 5) skipped --- -// } -// interface K { -// [x: `a${string}`]: string; -// [|[x: `${string}b`]: string;|] -// } -// declare const i: I; -// i.foo; -// declare const ij: I | J; -// ij.foo; -// declare const k: K; -// k.a; -// k./*GO TO DEFINITION*/b; -// k.ab; - - - - -// === goToDefinition === -// === /goToDefinitionIndexSignature.ts === - -// --- (line: 4) skipped --- -// [x: string]: number; -// } -// interface K { -// [|[x: `a${string}`]: string;|] -// [|[x: `${string}b`]: string;|] -// } -// declare const i: I; -// i.foo; -// declare const ij: I | J; -// ij.foo; -// declare const k: K; -// k.a; -// k.b; -// k./*GO TO DEFINITION*/ab; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionIndexSignature2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionIndexSignature2.baseline.jsonc deleted file mode 100644 index 248a3b23e5..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionIndexSignature2.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// const o = {}; -// o./*GO TO DEFINITION*/foo; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInstanceof1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInstanceof1.baseline.jsonc deleted file mode 100644 index e515f36374..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInstanceof1.baseline.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionInstanceof1.ts === - -// class [|C|] { -// } -// declare var obj: any; -// obj /*GO TO DEFINITION*/instanceof C; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInstanceof2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInstanceof2.baseline.jsonc deleted file mode 100644 index de16fac690..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInstanceof2.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /main.ts === - -// class C { -// static [|[Symbol.hasInstance]|](value: unknown): boolean { return true; } -// } -// declare var obj: any; -// obj /*GO TO DEFINITION*/instanceof C; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInterfaceAfterImplement.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInterfaceAfterImplement.baseline.jsonc deleted file mode 100644 index 8bdc0bf92f..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionInterfaceAfterImplement.baseline.jsonc +++ /dev/null @@ -1,13 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionInterfaceAfterImplement.ts === - -// interface [|sInt|] { -// sVar: number; -// sFn: () => void; -// } -// -// class iClass implements /*GO TO DEFINITION*/sInt { -// public sVar = 1; -// public sFn() { -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag1.baseline.jsonc deleted file mode 100644 index 12cc4cdcea..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag1.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// /** -// * @import { A } from "./b/*GO TO DEFINITION*/" -// */ diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag2.baseline.jsonc deleted file mode 100644 index c1f8225a90..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag2.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// /** -// * @import { A } from/*GO TO DEFINITION*/ "./b" -// */ diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag3.baseline.jsonc deleted file mode 100644 index b0594c7379..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag3.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// /** -// * @import { A } from /*GO TO DEFINITION*/ "./b"; -// */ diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag5.baseline.jsonc deleted file mode 100644 index 1ead78f336..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsDocImportTag5.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === goToDefinition === -// === /b.ts === - -// export interface [|A|] { } - - -// === /a.js === - -// /** -// * @import { A } from "./b"; -// */ -// -// /** -// * @param { A/*GO TO DEFINITION*/ } a -// */ -// function f(a) {} diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsModuleExports.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsModuleExports.baseline.jsonc deleted file mode 100644 index bf9b945576..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsModuleExports.baseline.jsonc +++ /dev/null @@ -1,18 +0,0 @@ -// === goToDefinition === -// === /foo.js === - -// x.test = () => { } -// x./*GO TO DEFINITION*/test(); -// x.test3 = function () { } -// x.test3(); - - - - -// === goToDefinition === -// === /foo.js === - -// x.test = () => { } -// x.test(); -// x.test3 = function () { } -// x./*GO TO DEFINITION*/test3(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsModuleName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsModuleName.baseline.jsonc deleted file mode 100644 index 36626d0ff8..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsModuleName.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /foo.js === - -// [|module.exports = {};|] - - -// === /bar.js === - -// var x = require(/*GO TO DEFINITION*/"./foo"); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsModuleNameAtImportName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsModuleNameAtImportName.baseline.jsonc deleted file mode 100644 index 24f541fe17..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsModuleNameAtImportName.baseline.jsonc +++ /dev/null @@ -1,68 +0,0 @@ -// === goToDefinition === -// === /foo.js === - -// [|function notExported() { } -// class Blah { -// abc = 123; -// } -// module.exports.Blah = Blah;|] - - -// === /bar.js === - -// const /*GO TO DEFINITION*/BlahModule = require("./foo.js"); -// new BlahModule.Blah() - - - - -// === goToDefinition === -// === /foo.js === - -// [|function notExported() { } -// class Blah { -// abc = 123; -// } -// module.exports.Blah = Blah;|] - - -// === /bar.js === - -// const BlahModule = require("./foo.js"); -// new /*GO TO DEFINITION*/BlahModule.Blah() - - - - -// === goToDefinition === -// === /foo.js === - -// [|function notExported() { } -// class Blah { -// abc = 123; -// } -// module.exports.Blah = Blah;|] - - -// === /barTs.ts === - -// import /*GO TO DEFINITION*/BlahModule = require("./foo.js"); -// new BlahModule.Blah() - - - - -// === goToDefinition === -// === /foo.js === - -// [|function notExported() { } -// class Blah { -// abc = 123; -// } -// module.exports.Blah = Blah;|] - - -// === /barTs.ts === - -// import BlahModule = require("./foo.js"); -// new /*GO TO DEFINITION*/BlahModule.Blah() diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsxCall.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsxCall.baseline.jsonc deleted file mode 100644 index 494b9afbf4..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsxCall.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /test.tsx === - -// interface FC

{ -// [|(props: P, context?: any): string;|] -// } -// -// const [|Thing|]: FC = (props) =>

; -// const HelloWorld = () => ; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsxNotSet.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsxNotSet.baseline.jsonc deleted file mode 100644 index 16279522de..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionJsxNotSet.baseline.jsonc +++ /dev/null @@ -1,13 +0,0 @@ -// === goToDefinition === -// === /foo.jsx === - -// const [|Foo|] = () => ( -//
foo
-// ); -// export default Foo; - - -// === /bar.jsx === - -// import Foo from './foo'; -// const a = diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionLabels.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionLabels.baseline.jsonc deleted file mode 100644 index 834e6a6021..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionLabels.baseline.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionLabels.ts === - -// [|label1|]: while (true) { -// label2: while (true) { -// break /*GO TO DEFINITION*/label1; -// continue label2; -// () => { break label1; } -// continue unknownLabel; -// } -// } - - - - -// === goToDefinition === -// === /goToDefinitionLabels.ts === - -// label1: while (true) { -// [|label2|]: while (true) { -// break label1; -// continue /*GO TO DEFINITION*/label2; -// () => { break label1; } -// continue unknownLabel; -// } -// } - - - - -// === goToDefinition === -// === /goToDefinitionLabels.ts === - -// [|label1|]: while (true) { -// label2: while (true) { -// break label1; -// continue label2; -// () => { break /*GO TO DEFINITION*/label1; } -// continue unknownLabel; -// } -// } - - - - -// === goToDefinition === -// === /goToDefinitionLabels.ts === - -// label1: while (true) { -// label2: while (true) { -// break label1; -// continue label2; -// () => { break label1; } -// continue /*GO TO DEFINITION*/unknownLabel; -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionMetaProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionMetaProperty.baseline.jsonc deleted file mode 100644 index f9420cf118..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionMetaProperty.baseline.jsonc +++ /dev/null @@ -1,59 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// im/*GO TO DEFINITION*/port.meta; -// function f() { new.target; } - - - - -// === goToDefinition === -// === /a.ts === - -// import.met/*GO TO DEFINITION*/a; -// function f() { new.target; } - - - - -// === goToDefinition === -// === /a.ts === - -// import.meta; -// function f() { n/*GO TO DEFINITION*/ew.target; } - - - - -// === goToDefinition === -// === /a.ts === - -// import.meta; -// function [|f|]() { new.t/*GO TO DEFINITION*/arget; } - - - - -// === goToDefinition === -// === /b.ts === - -// im/*GO TO DEFINITION*/port.m; -// class c { constructor() { new.target; } } - - - - -// === goToDefinition === -// === /b.ts === - -// import.m; -// class c { constructor() { n/*GO TO DEFINITION*/ew.target; } } - - - - -// === goToDefinition === -// === /b.ts === - -// import.m; -// class [|c|] { constructor() { new.t/*GO TO DEFINITION*/arget; } } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionMethodOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionMethodOverloads.baseline.jsonc deleted file mode 100644 index 6f294a944d..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionMethodOverloads.baseline.jsonc +++ /dev/null @@ -1,117 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionMethodOverloads.ts === - -// class MethodOverload { -// static [|method|](); -// static method(foo: string); -// static method(foo?: any) { } -// public method(): any; -// public method(foo: string); -// public method(foo?: any) { return "foo" } -// } -// // static method -// MethodOverload./*GO TO DEFINITION*/method(); -// MethodOverload.method("123"); -// // instance method -// var methodOverload = new MethodOverload(); -// methodOverload.method(); -// methodOverload.method("456"); - - - - -// === goToDefinition === -// === /goToDefinitionMethodOverloads.ts === - -// class MethodOverload { -// static method(); -// static [|method|](foo: string); -// static method(foo?: any) { } -// public method(): any; -// public method(foo: string); -// public method(foo?: any) { return "foo" } -// } -// // static method -// MethodOverload.method(); -// MethodOverload./*GO TO DEFINITION*/method("123"); -// // instance method -// var methodOverload = new MethodOverload(); -// methodOverload.method(); -// methodOverload.method("456"); - - - - -// === goToDefinition === -// === /goToDefinitionMethodOverloads.ts === - -// class MethodOverload { -// static method(); -// static method(foo: string); -// static method(foo?: any) { } -// public [|method|](): any; -// public method(foo: string); -// public method(foo?: any) { return "foo" } -// } -// // static method -// MethodOverload.method(); -// MethodOverload.method("123"); -// // instance method -// var methodOverload = new MethodOverload(); -// methodOverload./*GO TO DEFINITION*/method(); -// methodOverload.method("456"); - - - - -// === goToDefinition === -// === /goToDefinitionMethodOverloads.ts === - -// class MethodOverload { -// static method(); -// static method(foo: string); -// static method(foo?: any) { } -// public method(): any; -// public [|method|](foo: string); -// public method(foo?: any) { return "foo" } -// } -// // static method -// MethodOverload.method(); -// MethodOverload.method("123"); -// // instance method -// var methodOverload = new MethodOverload(); -// methodOverload.method(); -// methodOverload./*GO TO DEFINITION*/method("456"); - - - - -// === goToDefinition === -// === /goToDefinitionMethodOverloads.ts === - -// class MethodOverload { -// static /*GO TO DEFINITION*/[|method|](); -// static [|method|](foo: string); -// static [|method|](foo?: any) { } -// public method(): any; -// public method(foo: string); -// public method(foo?: any) { return "foo" } -// // --- (line: 8) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionMethodOverloads.ts === - -// class MethodOverload { -// static method(); -// static method(foo: string); -// static method(foo?: any) { } -// public /*GO TO DEFINITION*/[|method|](): any; -// public [|method|](foo: string); -// public [|method|](foo?: any) { return "foo" } -// } -// // static method -// MethodOverload.method(); -// // --- (line: 11) skipped --- diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionMultipleDefinitions.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionMultipleDefinitions.baseline.jsonc deleted file mode 100644 index ed4abc4b5e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionMultipleDefinitions.baseline.jsonc +++ /dev/null @@ -1,41 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// interface [|IFoo|] { -// instance1: number; -// } - - -// === /b.ts === - -// interface [|IFoo|] { -// instance2: number; -// } -// -// interface [|IFoo|] { -// instance3: number; -// } -// -// var ifoo: IFo/*GO TO DEFINITION*/o; - - - - -// === goToDefinition === -// === /c.ts === - -// module [|Module|] { -// export class c1 { } -// } - - -// === /d.ts === - -// module [|Module|] { -// export class c2 { } -// } - - -// === /e.ts === - -// Modul/*GO TO DEFINITION*/e; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionNewExpressionTargetNotClass.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionNewExpressionTargetNotClass.baseline.jsonc deleted file mode 100644 index 022497479b..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionNewExpressionTargetNotClass.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionNewExpressionTargetNotClass.ts === - -// class C2 { -// } -// let [|I|]: { -// [|new(): C2;|] -// }; -// new /*GO TO DEFINITION*/I(); -// let I2: { -// }; -// new I2(); - - - - -// === goToDefinition === -// === /goToDefinitionNewExpressionTargetNotClass.ts === - -// --- (line: 3) skipped --- -// new(): C2; -// }; -// new I(); -// let [|I2|]: { -// }; -// new /*GO TO DEFINITION*/I2(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectBindingElementPropertyName01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectBindingElementPropertyName01.baseline.jsonc deleted file mode 100644 index 4e1149597e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectBindingElementPropertyName01.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionObjectBindingElementPropertyName01.ts === - -// interface I { -// [|property1|]: number; -// property2: string; -// } -// -// var foo: I; -// var { /*GO TO DEFINITION*/property1: prop1 } = foo; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectLiteralProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectLiteralProperties.baseline.jsonc deleted file mode 100644 index 2e93fea859..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectLiteralProperties.baseline.jsonc +++ /dev/null @@ -1,96 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionObjectLiteralProperties.ts === - -// var o = { -// [|value|]: 0, -// get getter() {return 0 }, -// set setter(v: number) { }, -// method: () => { }, -// es6StyleMethod() { } -// }; -// -// o./*GO TO DEFINITION*/value; -// o.getter; -// o.setter; -// o.method; -// o.es6StyleMethod; - - - - -// === goToDefinition === -// === /goToDefinitionObjectLiteralProperties.ts === - -// var o = { -// value: 0, -// get [|getter|]() {return 0 }, -// set setter(v: number) { }, -// method: () => { }, -// es6StyleMethod() { } -// }; -// -// o.value; -// o./*GO TO DEFINITION*/getter; -// o.setter; -// o.method; -// o.es6StyleMethod; - - - - -// === goToDefinition === -// === /goToDefinitionObjectLiteralProperties.ts === - -// var o = { -// value: 0, -// get getter() {return 0 }, -// set [|setter|](v: number) { }, -// method: () => { }, -// es6StyleMethod() { } -// }; -// -// o.value; -// o.getter; -// o./*GO TO DEFINITION*/setter; -// o.method; -// o.es6StyleMethod; - - - - -// === goToDefinition === -// === /goToDefinitionObjectLiteralProperties.ts === - -// var o = { -// value: 0, -// get getter() {return 0 }, -// set setter(v: number) { }, -// [|method|]: () => { }, -// es6StyleMethod() { } -// }; -// -// o.value; -// o.getter; -// o.setter; -// o./*GO TO DEFINITION*/method; -// o.es6StyleMethod; - - - - -// === goToDefinition === -// === /goToDefinitionObjectLiteralProperties.ts === - -// var o = { -// value: 0, -// get getter() {return 0 }, -// set setter(v: number) { }, -// method: () => { }, -// [|es6StyleMethod|]() { } -// }; -// -// o.value; -// o.getter; -// o.setter; -// o.method; -// o./*GO TO DEFINITION*/es6StyleMethod; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectLiteralProperties1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectLiteralProperties1.baseline.jsonc deleted file mode 100644 index c4154c3905..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectLiteralProperties1.baseline.jsonc +++ /dev/null @@ -1,32 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionObjectLiteralProperties1.ts === - -// interface PropsBag { -// [|propx|]: number -// } -// function foo(arg: PropsBag) {} -// foo({ -// pr/*GO TO DEFINITION*/opx: 10 -// }) -// function bar(firstarg: boolean, secondarg: PropsBag) {} -// bar(true, { -// propx: 10 -// }) - - - - -// === goToDefinition === -// === /goToDefinitionObjectLiteralProperties1.ts === - -// interface PropsBag { -// [|propx|]: number -// } -// function foo(arg: PropsBag) {} -// foo({ -// propx: 10 -// }) -// function bar(firstarg: boolean, secondarg: PropsBag) {} -// bar(true, { -// pr/*GO TO DEFINITION*/opx: 10 -// }) diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectSpread.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectSpread.baseline.jsonc deleted file mode 100644 index afad471272..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionObjectSpread.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionObjectSpread.ts === - -// interface A1 { [|a|]: number }; -// interface A2 { [|a|]?: number }; -// let a1: A1; -// let a2: A2; -// let a12 = { ...a1, ...a2 }; -// a12.a/*GO TO DEFINITION*/; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverloadsInMultiplePropertyAccesses.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverloadsInMultiplePropertyAccesses.baseline.jsonc deleted file mode 100644 index 761a85ba27..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverloadsInMultiplePropertyAccesses.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverloadsInMultiplePropertyAccesses.ts === - -// namespace A { -// export namespace B { -// export function f(value: number): void; -// export function [|f|](value: string): void; -// export function f(value: number | string) {} -// } -// } -// A.B./*GO TO DEFINITION*/f(""); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember1.baseline.jsonc deleted file mode 100644 index ac11d76c79..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember1.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember1.ts === - -// class Foo { -// [|p|] = ''; -// } -// class Bar extends Foo { -// /*GO TO DEFINITION*/override p = ''; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember10.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember10.baseline.jsonc deleted file mode 100644 index 42b1667ea0..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember10.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// class Foo {} -// class Bar extends Foo { -// /** @override/*GO TO DEFINITION*/ */ -// m() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember11.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember11.baseline.jsonc deleted file mode 100644 index 96e1fa6c0b..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember11.baseline.jsonc +++ /dev/null @@ -1,66 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// class Foo { -// m() {} -// } -// class Bar extends Foo { -// /** @over/*GO TO DEFINITION*/ride see {@link https://test.com} description */ -// m() {} -// } - - - - -// === goToDefinition === -// === /a.js === - -// class Foo { -// m() {} -// } -// class Bar extends Foo { -// /** @override se/*GO TO DEFINITION*/e {@link https://test.com} description */ -// m() {} -// } - - - - -// === goToDefinition === -// === /a.js === - -// class Foo { -// m() {} -// } -// class Bar extends Foo { -// /** @override see {@li/*GO TO DEFINITION*/nk https://test.com} description */ -// m() {} -// } - - - - -// === goToDefinition === -// === /a.js === - -// class Foo { -// m() {} -// } -// class Bar extends Foo { -// /** @override see {@link https://test.c/*GO TO DEFINITION*/om} description */ -// m() {} -// } - - - - -// === goToDefinition === -// === /a.js === - -// class Foo { -// m() {} -// } -// class Bar extends Foo { -// /** @override see {@link https://test.com} /*GO TO DEFINITION*/description */ -// m() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember12.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember12.baseline.jsonc deleted file mode 100644 index 715a7cdf94..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember12.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember12.ts === - -// class Foo { -// static [|p|] = ''; -// } -// class Bar extends Foo { -// static /*GO TO DEFINITION*/override p = ''; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember13.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember13.baseline.jsonc deleted file mode 100644 index 7d6233d830..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember13.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember13.ts === - -// class Foo { -// static [|m|]() {} -// } -// class Bar extends Foo { -// static /*GO TO DEFINITION*/override m() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember14.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember14.baseline.jsonc deleted file mode 100644 index 3a62a94263..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember14.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember14.ts === - -// class A { -// [|m|]() {} -// } -// class B extends A {} -// class C extends B { -// /*GO TO DEFINITION*/override m() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember15.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember15.baseline.jsonc deleted file mode 100644 index e14990deea..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember15.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember15.ts === - -// class A { -// static [|m|]() {} -// } -// class B extends A {} -// class C extends B { -// static /*GO TO DEFINITION*/override m() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember16.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember16.baseline.jsonc deleted file mode 100644 index cbbf2a9da3..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember16.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverrideJsdoc.ts === - -// export class C extends CompletelyUndefined { -// /** -// * @override/*GO TO DEFINITION*/ -// * @returns {{}} -// */ -// static foo() { -// // --- (line: 7) skipped --- diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember2.baseline.jsonc deleted file mode 100644 index 07cc95ddef..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember2.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember2.ts === - -// class Foo { -// [|m|]() {} -// } -// -// class Bar extends Foo { -// /*GO TO DEFINITION*/override m() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember3.baseline.jsonc deleted file mode 100644 index 2ed1e9c304..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember3.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember3.ts === - -// abstract class Foo { -// abstract [|m|]() {} -// } -// -// export class Bar extends Foo { -// /*GO TO DEFINITION*/override m() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember4.baseline.jsonc deleted file mode 100644 index addd84eab3..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember4.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember4.ts === - -// class Foo { -// [|m|]() {} -// } -// function f () { -// return class extends Foo { -// /*GO TO DEFINITION*/override m() {} -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember5.baseline.jsonc deleted file mode 100644 index 242dfd2a73..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember5.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember5.ts === - -// class Foo extends (class { -// [|m|]() {} -// }) { -// /*GO TO DEFINITION*/override m() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember6.baseline.jsonc deleted file mode 100644 index 65f53f831e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember6.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember6.ts === - -// class Foo { -// m() {} -// } -// class Bar extends Foo { -// /*GO TO DEFINITION*/override [|m1|]() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember7.baseline.jsonc deleted file mode 100644 index 0a02b0caf7..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember7.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember7.ts === - -// class Foo { -// /*GO TO DEFINITION*/override [|m|]() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember8.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember8.baseline.jsonc deleted file mode 100644 index f7d0b7d83e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember8.baseline.jsonc +++ /dev/null @@ -1,14 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// export class A { -// [|m|]() {} -// } - - -// === /b.ts === - -// import { A } from "./a"; -// class B extends A { -// /*GO TO DEFINITION*/override m() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember9.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember9.baseline.jsonc deleted file mode 100644 index 24f841e86f..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionOverriddenMember9.baseline.jsonc +++ /dev/null @@ -1,12 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionOverriddenMember9.ts === - -// interface I { -// m(): void; -// } -// class A { -// [|m|]() {}; -// } -// class B extends A implements I { -// /*GO TO DEFINITION*/override m() {} -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPartialImplementation.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPartialImplementation.baseline.jsonc deleted file mode 100644 index bc9376f290..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPartialImplementation.baseline.jsonc +++ /dev/null @@ -1,19 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionPartialImplementation_1.ts === - -// module A { -// export interface [|IA|] { -// y: string; -// } -// } - - -// === /goToDefinitionPartialImplementation_2.ts === - -// module A { -// export interface [|IA|] { -// x: number; -// } -// -// var x: /*GO TO DEFINITION*/IA; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPrimitives.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPrimitives.baseline.jsonc deleted file mode 100644 index 60a68757fa..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPrimitives.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionPrimitives.ts === - -// var x: st/*GO TO DEFINITION*/ring; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPrivateName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPrivateName.baseline.jsonc deleted file mode 100644 index 8fea9247a7..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPrivateName.baseline.jsonc +++ /dev/null @@ -1,50 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionPrivateName.ts === - -// class A { -// #method() { } -// [|#foo|] = 3; -// get #prop() { return ""; } -// set #prop(value: string) { } -// constructor() { -// this./*GO TO DEFINITION*/#foo -// this.#method -// this.#prop -// } -// } - - - - -// === goToDefinition === -// === /goToDefinitionPrivateName.ts === - -// class A { -// [|#method|]() { } -// #foo = 3; -// get #prop() { return ""; } -// set #prop(value: string) { } -// constructor() { -// this.#foo -// this./*GO TO DEFINITION*/#method -// this.#prop -// } -// } - - - - -// === goToDefinition === -// === /goToDefinitionPrivateName.ts === - -// class A { -// #method() { } -// #foo = 3; -// get [|#prop|]() { return ""; } -// set [|#prop|](value: string) { } -// constructor() { -// this.#foo -// this.#method -// this./*GO TO DEFINITION*/#prop -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPropertyAssignment.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPropertyAssignment.baseline.jsonc deleted file mode 100644 index f5450b633f..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionPropertyAssignment.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionPropertyAssignment.ts === - -// export const [|Component|] = () => { return "OK"} -// Component.displayName = 'Component' -// -// /*GO TO DEFINITION*/Component -// -// Component.displayName - - - - -// === goToDefinition === -// === /goToDefinitionPropertyAssignment.ts === - -// export const Component = () => { return "OK"} -// Component.[|displayName|] = 'Component' -// -// Component -// -// Component./*GO TO DEFINITION*/displayName diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionRest.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionRest.baseline.jsonc deleted file mode 100644 index 3d68b15f4c..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionRest.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionRest.ts === - -// interface Gen { -// x: number; -// [|parent|]: Gen; -// millenial: string; -// } -// let t: Gen; -// var { x, ...rest } = t; -// rest./*GO TO DEFINITION*/parent; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn1.baseline.jsonc deleted file mode 100644 index 18f1b6b08f..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn1.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionReturn1.ts === - -// function [|foo|]() { -// /*GO TO DEFINITION*/return 10; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn2.baseline.jsonc deleted file mode 100644 index 1ebe526a40..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn2.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionReturn2.ts === - -// function foo() { -// return [|() => { -// /*GO TO DEFINITION*/return 10; -// }|] -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn3.baseline.jsonc deleted file mode 100644 index 5c10796953..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn3.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionReturn3.ts === - -// class C { -// [|m|]() { -// /*GO TO DEFINITION*/return 1; -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn4.baseline.jsonc deleted file mode 100644 index d521835508..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn4.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionReturn4.ts === - -// /*GO TO DEFINITION*/return; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn5.baseline.jsonc deleted file mode 100644 index 0e064e17c1..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn5.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionReturn5.ts === - -// function [|foo|]() { -// class Foo { -// static { /*GO TO DEFINITION*/return; } -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn6.baseline.jsonc deleted file mode 100644 index e0fe0441dd..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn6.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionReturn6.ts === - -// function foo() { -// return [|function () { -// /*GO TO DEFINITION*/return 10; -// }|] -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn7.baseline.jsonc deleted file mode 100644 index 243bfca4ea..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionReturn7.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionReturn7.ts === - -// function foo(a: string, b: string): string; -// function foo(a: number, b: number): number; -// function [|foo|](a: any, b: any): any { -// /*GO TO DEFINITION*/return a + b; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSameFile.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSameFile.baseline.jsonc deleted file mode 100644 index 690de32b27..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSameFile.baseline.jsonc +++ /dev/null @@ -1,91 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionSameFile.ts === - -// var [|localVariable|]; -// function localFunction() { } -// class localClass { } -// interface localInterface{ } -// module localModule{ export var foo = 1;} -// -// -// /*GO TO DEFINITION*/localVariable = 1; -// localFunction(); -// var foo = new localClass(); -// class fooCls implements localInterface { } -// var fooVar = localModule.foo; - - - - -// === goToDefinition === -// === /goToDefinitionSameFile.ts === - -// var localVariable; -// function [|localFunction|]() { } -// class localClass { } -// interface localInterface{ } -// module localModule{ export var foo = 1;} -// -// -// localVariable = 1; -// /*GO TO DEFINITION*/localFunction(); -// var foo = new localClass(); -// class fooCls implements localInterface { } -// var fooVar = localModule.foo; - - - - -// === goToDefinition === -// === /goToDefinitionSameFile.ts === - -// var localVariable; -// function localFunction() { } -// class [|localClass|] { } -// interface localInterface{ } -// module localModule{ export var foo = 1;} -// -// -// localVariable = 1; -// localFunction(); -// var foo = new /*GO TO DEFINITION*/localClass(); -// class fooCls implements localInterface { } -// var fooVar = localModule.foo; - - - - -// === goToDefinition === -// === /goToDefinitionSameFile.ts === - -// var localVariable; -// function localFunction() { } -// class localClass { } -// interface [|localInterface|]{ } -// module localModule{ export var foo = 1;} -// -// -// localVariable = 1; -// localFunction(); -// var foo = new localClass(); -// class fooCls implements /*GO TO DEFINITION*/localInterface { } -// var fooVar = localModule.foo; - - - - -// === goToDefinition === -// === /goToDefinitionSameFile.ts === - -// var localVariable; -// function localFunction() { } -// class localClass { } -// interface localInterface{ } -// module [|localModule|]{ export var foo = 1;} -// -// -// localVariable = 1; -// localFunction(); -// var foo = new localClass(); -// class fooCls implements localInterface { } -// var fooVar = /*GO TO DEFINITION*/localModule.foo; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSatisfiesExpression1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSatisfiesExpression1.baseline.jsonc deleted file mode 100644 index 001af7fa9d..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSatisfiesExpression1.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionSatisfiesExpression1.ts === - -// const STRINGS = { -// /*GO TO DEFINITION*/[|title|]: 'A Title', -// } satisfies Record; -// -// //somewhere in app -// STRINGS.title - - - - -// === goToDefinition === -// === /goToDefinitionSatisfiesExpression1.ts === - -// const STRINGS = { -// [|title|]: 'A Title', -// } satisfies Record; -// -// //somewhere in app -// STRINGS./*GO TO DEFINITION*/title diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionScriptImport.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionScriptImport.baseline.jsonc deleted file mode 100644 index 4b809d76d9..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionScriptImport.baseline.jsonc +++ /dev/null @@ -1,14 +0,0 @@ -// === goToDefinition === -// === /moduleThing.ts === - -// import /*GO TO DEFINITION*/"./scriptThing"; -// import "./stylez.css"; - - - - -// === goToDefinition === -// === /moduleThing.ts === - -// import "./scriptThing"; -// import /*GO TO DEFINITION*/"./stylez.css"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionScriptImportServer.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionScriptImportServer.baseline.jsonc deleted file mode 100644 index c502401d63..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionScriptImportServer.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === goToDefinition === -// === /home/src/workspaces/project/moduleThing.ts === - -// import /*GO TO DEFINITION*/"./scriptThing"; -// import "./stylez.css"; -// import "./foo.txt"; - - - - -// === goToDefinition === -// === /home/src/workspaces/project/moduleThing.ts === - -// import "./scriptThing"; -// import /*GO TO DEFINITION*/"./stylez.css"; -// import "./foo.txt"; - - - - -// === goToDefinition === -// === /home/src/workspaces/project/moduleThing.ts === - -// import "./scriptThing"; -// import "./stylez.css"; -// import /*GO TO DEFINITION*/"./foo.txt"; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShadowVariable.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShadowVariable.baseline.jsonc deleted file mode 100644 index 62cc613c22..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShadowVariable.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionShadowVariable.ts === - -// var shadowVariable = "foo"; -// function shadowVariableTestModule() { -// var [|shadowVariable|]; -// /*GO TO DEFINITION*/shadowVariable = 1; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShadowVariableInsideModule.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShadowVariableInsideModule.baseline.jsonc deleted file mode 100644 index 6a9b66ac86..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShadowVariableInsideModule.baseline.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionShadowVariableInsideModule.ts === - -// module shdModule { -// var [|shdVar|]; -// /*GO TO DEFINITION*/shdVar = 1; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty01.baseline.jsonc deleted file mode 100644 index 998495b181..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty01.baseline.jsonc +++ /dev/null @@ -1,48 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionShorthandProperty01.ts === - -// var name = "hello"; -// var id = 100000; -// declare var id; -// var obj = {/*GO TO DEFINITION*/name, id}; -// obj.name; -// obj.id; - - - - -// === goToDefinition === -// === /goToDefinitionShorthandProperty01.ts === - -// var name = "hello"; -// var [|id|] = 100000; -// declare var [|id|]; -// var obj = {name, /*GO TO DEFINITION*/id}; -// obj.name; -// obj.id; - - - - -// === goToDefinition === -// === /goToDefinitionShorthandProperty01.ts === - -// var name = "hello"; -// var id = 100000; -// declare var id; -// var obj = {[|name|], id}; -// obj./*GO TO DEFINITION*/name; -// obj.id; - - - - -// === goToDefinition === -// === /goToDefinitionShorthandProperty01.ts === - -// var name = "hello"; -// var id = 100000; -// declare var id; -// var obj = {name, [|id|]}; -// obj.name; -// obj./*GO TO DEFINITION*/id; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty02.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty02.baseline.jsonc deleted file mode 100644 index 66e755d602..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty02.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionShorthandProperty02.ts === - -// let x = { -// f/*GO TO DEFINITION*/oo -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty03.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty03.baseline.jsonc deleted file mode 100644 index 93a377f606..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty03.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionShorthandProperty03.ts === - -// var [|x|] = { -// /*GO TO DEFINITION*/x -// } -// let y = { -// y -// } - - - - -// === goToDefinition === -// === /goToDefinitionShorthandProperty03.ts === - -// var x = { -// x -// } -// let [|y|] = { -// /*GO TO DEFINITION*/y -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty04.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty04.baseline.jsonc deleted file mode 100644 index 0dbcc885e5..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty04.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionShorthandProperty04.ts === - -// interface Foo { -// foo(): void -// } -// -// let x: Foo = { -// f/*GO TO DEFINITION*/oo -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty05.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty05.baseline.jsonc deleted file mode 100644 index 32e9dbe162..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty05.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionShorthandProperty05.ts === - -// interface Foo { -// foo(): void -// } -// const [|foo|] = 1; -// let x: Foo = { -// f/*GO TO DEFINITION*/oo -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty06.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty06.baseline.jsonc deleted file mode 100644 index 1b34e6d962..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionShorthandProperty06.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionShorthandProperty06.ts === - -// interface Foo { -// [|foo|](): void -// } -// const foo = 1; -// let x: Foo = { -// f/*GO TO DEFINITION*/oo() -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSignatureAlias_require.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSignatureAlias_require.baseline.jsonc deleted file mode 100644 index c578da7514..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSignatureAlias_require.baseline.jsonc +++ /dev/null @@ -1,24 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// [|module.exports = function [|f|]() {}|] - - -// === /b.js === - -// const f = require("./a"); -// /*GO TO DEFINITION*/f(); - - - - -// === goToDefinition === -// === /a.js === - -// [|module.exports = function [|f|]() {}|] - - -// === /bar.ts === - -// import f = require("./a"); -// /*GO TO DEFINITION*/f(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSimple.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSimple.baseline.jsonc deleted file mode 100644 index 035841e248..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSimple.baseline.jsonc +++ /dev/null @@ -1,24 +0,0 @@ -// === goToDefinition === -// === /Definition.ts === - -// class [|c|] { } - - -// === /Consumption.ts === - -// var n = new /*GO TO DEFINITION*/c(); -// var n = new c(); - - - - -// === goToDefinition === -// === /Definition.ts === - -// class [|c|] { } - - -// === /Consumption.ts === - -// var n = new c(); -// var n = new c/*GO TO DEFINITION*/(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSourceUnit.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSourceUnit.baseline.jsonc deleted file mode 100644 index 7b142582a5..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSourceUnit.baseline.jsonc +++ /dev/null @@ -1,25 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// //MyFile Comments -// //more comments -// /// -// /// -// -// class clsInOverload { -// // --- (line: 7) skipped --- - - - - -// === goToDefinition === -// === /a.ts === - -// //MyFile Comments -// //more comments -// /// -// /// -// -// class clsInOverload { -// static fnOverload(); -// // --- (line: 8) skipped --- diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase1.baseline.jsonc deleted file mode 100644 index fd566d3ed8..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase1.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionSwitchCase1.ts === - -// [|switch|] (null ) { -// /*GO TO DEFINITION*/case null: break; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase2.baseline.jsonc deleted file mode 100644 index 5b5853f1ec..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase2.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionSwitchCase2.ts === - -// [|switch|] (null) { -// /*GO TO DEFINITION*/default: break; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase3.baseline.jsonc deleted file mode 100644 index 746a4c61e0..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase3.baseline.jsonc +++ /dev/null @@ -1,24 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionSwitchCase3.ts === - -// [|switch|] (null) { -// /*GO TO DEFINITION*/default: { -// switch (null) { -// default: break; -// } -// }; -// } - - - - -// === goToDefinition === -// === /goToDefinitionSwitchCase3.ts === - -// switch (null) { -// default: { -// [|switch|] (null) { -// /*GO TO DEFINITION*/default: break; -// } -// }; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase4.baseline.jsonc deleted file mode 100644 index 38d9a577be..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase4.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionSwitchCase4.ts === - -// switch (null) { -// case null: break; -// } -// -// [|switch|] (null) { -// /*GO TO DEFINITION*/case null: break; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase5.baseline.jsonc deleted file mode 100644 index aaafe2addb..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase5.baseline.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionSwitchCase5.ts === - -// export /*GO TO DEFINITION*/default {} diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase6.baseline.jsonc deleted file mode 100644 index 7d19bcdcc4..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase6.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionSwitchCase6.ts === - -// export default { /*GO TO DEFINITION*/[|case|] }; -// default; -// case 42; - - - - -// === goToDefinition === -// === /goToDefinitionSwitchCase6.ts === - -// export default { case }; -// /*GO TO DEFINITION*/default; -// case 42; - - - - -// === goToDefinition === -// === /goToDefinitionSwitchCase6.ts === - -// export default { case }; -// default; -// /*GO TO DEFINITION*/case 42; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase7.baseline.jsonc deleted file mode 100644 index e62291a379..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionSwitchCase7.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionSwitchCase7.ts === - -// switch (null) { -// case null: -// export /*GO TO DEFINITION*/default 123; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTaggedTemplateOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTaggedTemplateOverloads.baseline.jsonc deleted file mode 100644 index 0e0f59e55b..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTaggedTemplateOverloads.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionTaggedTemplateOverloads.ts === - -// function [|f|](strs: TemplateStringsArray, x: number): void; -// function f(strs: TemplateStringsArray, x: boolean): void; -// function f(strs: TemplateStringsArray, x: number | boolean) {} -// -// /*GO TO DEFINITION*/f`${0}`; -// f`${false}`; - - - - -// === goToDefinition === -// === /goToDefinitionTaggedTemplateOverloads.ts === - -// function f(strs: TemplateStringsArray, x: number): void; -// function [|f|](strs: TemplateStringsArray, x: boolean): void; -// function f(strs: TemplateStringsArray, x: number | boolean) {} -// -// f`${0}`; -// /*GO TO DEFINITION*/f`${false}`; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionThis.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionThis.baseline.jsonc deleted file mode 100644 index d0f6ad2f1e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionThis.baseline.jsonc +++ /dev/null @@ -1,38 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionThis.ts === - -// function f([|this|]: number) { -// return /*GO TO DEFINITION*/this; -// } -// class C { -// constructor() { return this; } -// get self(this: number) { return this; } -// } - - - - -// === goToDefinition === -// === /goToDefinitionThis.ts === - -// function f(this: number) { -// return this; -// } -// class [|C|] { -// constructor() { return /*GO TO DEFINITION*/this; } -// get self(this: number) { return this; } -// } - - - - -// === goToDefinition === -// === /goToDefinitionThis.ts === - -// function f(this: number) { -// return this; -// } -// class C { -// constructor() { return this; } -// get self([|this|]: number) { return /*GO TO DEFINITION*/this; } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypeOnlyImport.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypeOnlyImport.baseline.jsonc deleted file mode 100644 index c8789a193a..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypeOnlyImport.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// enum [|SyntaxKind|] { SourceFile } -// export type { SyntaxKind } - - -// === /c.ts === - -// import type { SyntaxKind } from './b'; -// let kind: /*GO TO DEFINITION*/SyntaxKind; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypePredicate.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypePredicate.baseline.jsonc deleted file mode 100644 index 06030ad664..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypePredicate.baseline.jsonc +++ /dev/null @@ -1,18 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionTypePredicate.ts === - -// class A {} -// function f([|parameter|]: any): /*GO TO DEFINITION*/parameter is A { -// return typeof parameter === "string"; -// } - - - - -// === goToDefinition === -// === /goToDefinitionTypePredicate.ts === - -// class [|A|] {} -// function f(parameter: any): parameter is /*GO TO DEFINITION*/A { -// return typeof parameter === "string"; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypeReferenceDirective.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypeReferenceDirective.baseline.jsonc deleted file mode 100644 index cebefaba91..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypeReferenceDirective.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === goToDefinition === -// === /src/app.ts === - -// /// -// $.x; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypeofThis.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypeofThis.baseline.jsonc deleted file mode 100644 index 03a7182e97..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionTypeofThis.baseline.jsonc +++ /dev/null @@ -1,38 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionTypeofThis.ts === - -// function f([|this|]: number) { -// type X = typeof /*GO TO DEFINITION*/this; -// } -// class C { -// constructor() { type X = typeof this; } -// get self(this: number) { type X = typeof this; } -// } - - - - -// === goToDefinition === -// === /goToDefinitionTypeofThis.ts === - -// function f(this: number) { -// type X = typeof this; -// } -// class [|C|] { -// constructor() { type X = typeof /*GO TO DEFINITION*/this; } -// get self(this: number) { type X = typeof this; } -// } - - - - -// === goToDefinition === -// === /goToDefinitionTypeofThis.ts === - -// function f(this: number) { -// type X = typeof this; -// } -// class C { -// constructor() { type X = typeof this; } -// get self([|this|]: number) { type X = typeof /*GO TO DEFINITION*/this; } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUndefinedSymbols.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUndefinedSymbols.baseline.jsonc deleted file mode 100644 index ca9d8f39db..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUndefinedSymbols.baseline.jsonc +++ /dev/null @@ -1,40 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionUndefinedSymbols.ts === - -// some/*GO TO DEFINITION*/Variable; -// var a: someType; -// var x = {}; x.someProperty; -// var a: any; a.someProperty; - - - - -// === goToDefinition === -// === /goToDefinitionUndefinedSymbols.ts === - -// someVariable; -// var a: some/*GO TO DEFINITION*/Type; -// var x = {}; x.someProperty; -// var a: any; a.someProperty; - - - - -// === goToDefinition === -// === /goToDefinitionUndefinedSymbols.ts === - -// someVariable; -// var a: someType; -// var x = {}; x.some/*GO TO DEFINITION*/Property; -// var a: any; a.someProperty; - - - - -// === goToDefinition === -// === /goToDefinitionUndefinedSymbols.ts === - -// someVariable; -// var a: someType; -// var x = {}; x.someProperty; -// var a: any; a.some/*GO TO DEFINITION*/Property; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty1.baseline.jsonc deleted file mode 100644 index 29d630ae11..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty1.baseline.jsonc +++ /dev/null @@ -1,17 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionUnionTypeProperty1.ts === - -// interface One { -// [|commonProperty|]: number; -// commonFunction(): number; -// } -// -// interface Two { -// [|commonProperty|]: string -// commonFunction(): number; -// } -// -// var x : One | Two; -// -// x./*GO TO DEFINITION*/commonProperty; -// x.commonFunction; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty2.baseline.jsonc deleted file mode 100644 index 5e619d1172..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty2.baseline.jsonc +++ /dev/null @@ -1,19 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionUnionTypeProperty2.ts === - -// interface HasAOrB { -// [|a|]: string; -// b: string; -// } -// -// interface One { -// common: { [|a|] : number; }; -// } -// -// interface Two { -// common: HasAOrB; -// } -// -// var x : One | Two; -// -// x.common./*GO TO DEFINITION*/a; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty3.baseline.jsonc deleted file mode 100644 index 782208d88d..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty3.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionUnionTypeProperty3.ts === - -// interface Array { -// [|specialPop|](): T -// } -// -// var strings: string[]; -// var numbers: number[]; -// -// var x = (strings || numbers)./*GO TO DEFINITION*/specialPop() diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty4.baseline.jsonc deleted file mode 100644 index 606d1d677b..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty4.baseline.jsonc +++ /dev/null @@ -1,20 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionUnionTypeProperty4.ts === - -// interface SnapCrackle { -// [|pop|](): string; -// } -// -// interface Magnitude { -// [|pop|](): number; -// } -// -// interface Art { -// [|pop|](): boolean; -// } -// -// var art: Art; -// var magnitude: Magnitude; -// var snapcrackle: SnapCrackle; -// -// var x = (snapcrackle || magnitude || art)./*GO TO DEFINITION*/pop; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty_discriminated.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty_discriminated.baseline.jsonc deleted file mode 100644 index 16520ef58b..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionUnionTypeProperty_discriminated.baseline.jsonc +++ /dev/null @@ -1,102 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionUnionTypeProperty_discriminated.ts === - -// type U = A | B; -// -// interface A { -// [|kind|]: "a"; -// prop: number; -// }; -// -// interface B { -// kind: "b"; -// prop: string; -// } -// -// const u: U = { -// /*GO TO DEFINITION*/kind: "a", -// prop: 0, -// }; -// const u2: U = { -// // --- (line: 18) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionUnionTypeProperty_discriminated.ts === - -// type U = A | B; -// -// interface A { -// kind: "a"; -// [|prop|]: number; -// }; -// -// interface B { -// kind: "b"; -// prop: string; -// } -// -// const u: U = { -// kind: "a", -// /*GO TO DEFINITION*/prop: 0, -// }; -// const u2: U = { -// kind: "bogus", -// prop: 0, -// }; - - - - -// === goToDefinition === -// === /goToDefinitionUnionTypeProperty_discriminated.ts === - -// type U = A | B; -// -// interface A { -// [|kind|]: "a"; -// prop: number; -// }; -// -// interface B { -// [|kind|]: "b"; -// prop: string; -// } -// -// const u: U = { -// kind: "a", -// prop: 0, -// }; -// const u2: U = { -// /*GO TO DEFINITION*/kind: "bogus", -// prop: 0, -// }; - - - - -// === goToDefinition === -// === /goToDefinitionUnionTypeProperty_discriminated.ts === - -// type U = A | B; -// -// interface A { -// kind: "a"; -// [|prop|]: number; -// }; -// -// interface B { -// kind: "b"; -// [|prop|]: string; -// } -// -// const u: U = { -// kind: "a", -// prop: 0, -// }; -// const u2: U = { -// kind: "bogus", -// /*GO TO DEFINITION*/prop: 0, -// }; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment.baseline.jsonc deleted file mode 100644 index 873fed0335..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment.baseline.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -// === goToDefinition === -// === /foo.js === - -// const Bar; -// const [|Foo|] = [|Bar|] = function () {} -// Foo.prototype.bar = function() {} -// new Foo/*GO TO DEFINITION*/(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment1.baseline.jsonc deleted file mode 100644 index 76b6e818f8..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment1.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /foo.js === - -// const [|Foo|] = module.[|exports|] = function () {} -// Foo.prototype.bar = function() {} -// new Foo/*GO TO DEFINITION*/(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment2.baseline.jsonc deleted file mode 100644 index 170e6358ac..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment2.baseline.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -// === goToDefinition === -// === /foo.ts === - -// const Bar; -// const [|Foo|] = [|Bar|] = function () {} -// Foo.prototype.bar = function() {} -// new Foo/*GO TO DEFINITION*/(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment3.baseline.jsonc deleted file mode 100644 index de3dc88da8..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionVariableAssignment3.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /foo.ts === - -// const [|Foo|] = module.[|exports|] = function () {} -// Foo.prototype.bar = function() {} -// new Foo/*GO TO DEFINITION*/(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield1.baseline.jsonc deleted file mode 100644 index 07180e5168..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield1.baseline.jsonc +++ /dev/null @@ -1,24 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionYield1.ts === - -// function* [|gen|]() { -// /*GO TO DEFINITION*/yield 0; -// } -// -// const genFunction = function*() { -// yield 0; -// } - - - - -// === goToDefinition === -// === /goToDefinitionYield1.ts === - -// function* gen() { -// yield 0; -// } -// -// const [|genFunction|] = function*() { -// /*GO TO DEFINITION*/yield 0; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield2.baseline.jsonc deleted file mode 100644 index eebbcc45cb..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield2.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionYield2.ts === - -// function* outerGen() { -// function* [|gen|]() { -// /*GO TO DEFINITION*/yield 0; -// } -// return gen -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield3.baseline.jsonc deleted file mode 100644 index 9511a8d4bd..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield3.baseline.jsonc +++ /dev/null @@ -1,26 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionYield3.ts === - -// class C { -// [|notAGenerator|]() { -// /*GO TO DEFINITION*/yield 0; -// } -// -// foo*() { -// // --- (line: 7) skipped --- - - - - -// === goToDefinition === -// === /goToDefinitionYield3.ts === - -// class C { -// notAGenerator() { -// yield 0; -// } -// -// foo*[||]() { -// /*GO TO DEFINITION*/yield 0; -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield4.baseline.jsonc deleted file mode 100644 index 624d2127a2..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinitionYield4.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinitionYield4.ts === - -// function* gen() { -// class C { [|[/*GO TO DEFINITION*/yield 10]|]() {} } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_filteringGenericMappedType.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_filteringGenericMappedType.baseline.jsonc deleted file mode 100644 index 35aab26fd3..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_filteringGenericMappedType.baseline.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -// === goToDefinition === -// === /goToDefinition_filteringGenericMappedType.ts === - -// const obj = { -// get [|id|]() { -// return 1; -// }, -// name: "test", -// // --- (line: 6) skipped --- - - -// --- (line: 17) skipped --- -// name: true, -// }); -// -// obj2./*GO TO DEFINITION*/id; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_filteringMappedType.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_filteringMappedType.baseline.jsonc deleted file mode 100644 index 477bd810e2..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_filteringMappedType.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinition_filteringMappedType.ts === - -// const obj = { [|a|]: 1, b: 2 }; -// const filtered: { [P in keyof typeof obj as P extends 'b' ? never : P]: 0; } = { a: 0 }; -// filtered./*GO TO DEFINITION*/a; diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_mappedType.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_mappedType.baseline.jsonc deleted file mode 100644 index 0657c65923..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_mappedType.baseline.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -// === goToDefinition === -// === /goToDefinition_mappedType.ts === - -// interface I { [|m|](): void; }; -// declare const i: { [K in "m"]: I[K] }; -// i./*GO TO DEFINITION*/m(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_super.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_super.baseline.jsonc deleted file mode 100644 index 285f2e5a82..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_super.baseline.jsonc +++ /dev/null @@ -1,51 +0,0 @@ -// === goToDefinition === -// === /goToDefinition_super.ts === - -// class A { -// [|constructor() {}|] -// x() {} -// } -// class [|B|] extends A {} -// class C extends B { -// constructor() { -// /*GO TO DEFINITION*/super(); -// } -// method() { -// super.x(); -// // --- (line: 12) skipped --- - - - - -// === goToDefinition === -// === /goToDefinition_super.ts === - -// class A { -// constructor() {} -// x() {} -// } -// class [|B|] extends A {} -// class C extends B { -// constructor() { -// super(); -// } -// method() { -// /*GO TO DEFINITION*/super.x(); -// } -// } -// class D { -// // --- (line: 15) skipped --- - - - - -// === goToDefinition === -// === /goToDefinition_super.ts === - -// --- (line: 12) skipped --- -// } -// class D { -// constructor() { -// /*GO TO DEFINITION*/super(); -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_untypedModule.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_untypedModule.baseline.jsonc deleted file mode 100644 index 6ab5f34f4b..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToDefinition_untypedModule.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// import { [|f|] } from "foo"; -// /*GO TO DEFINITION*/f(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GoToModuleAliasDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GoToModuleAliasDefinition.baseline.jsonc deleted file mode 100644 index f9f31e6589..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GoToModuleAliasDefinition.baseline.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -// === goToDefinition === -// === /b.ts === - -// import [|n|] = require('a'); -// var x = new /*GO TO DEFINITION*/n.Foo(); diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionConstructorFunction.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionConstructorFunction.baseline.jsonc deleted file mode 100644 index b355f41fa4..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionConstructorFunction.baseline.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -// === goToDefinition === -// === /gotoDefinitionConstructorFunction.js === - -// function [|StringStreamm|]() { -// } -// StringStreamm.prototype = { -// }; -// -// function runMode () { -// new /*GO TO DEFINITION*/StringStreamm() -// }; diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionInObjectBindingPattern1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionInObjectBindingPattern1.baseline.jsonc deleted file mode 100644 index 0421bd3223..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionInObjectBindingPattern1.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /gotoDefinitionInObjectBindingPattern1.ts === - -// --- (line: 3) skipped --- -// interface Test { -// prop2: number -// } -// bar(({[|pr/*GO TO DEFINITION*/op2|]})=>{}); diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionInObjectBindingPattern2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionInObjectBindingPattern2.baseline.jsonc deleted file mode 100644 index f39402524e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionInObjectBindingPattern2.baseline.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// === goToDefinition === -// === /gotoDefinitionInObjectBindingPattern2.ts === - -// var p0 = ({[|a/*GO TO DEFINITION*/a|]}) => {console.log(aa)}; -// function f2({ a1, b1 }: { a1: number, b1: number } = { a1: 0, b1: 0 }) {} - - - - -// === goToDefinition === -// === /gotoDefinitionInObjectBindingPattern2.ts === - -// var p0 = ({aa}) => {console.log(aa)}; -// function f2({ [|a/*GO TO DEFINITION*/1|], b1 }: { a1: number, b1: number } = { a1: 0, b1: 0 }) {} - - - - -// === goToDefinition === -// === /gotoDefinitionInObjectBindingPattern2.ts === - -// var p0 = ({aa}) => {console.log(aa)}; -// function f2({ a1, [|b/*GO TO DEFINITION*/1|] }: { a1: number, b1: number } = { a1: 0, b1: 0 }) {} diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag1.baseline.jsonc deleted file mode 100644 index df64d9d0da..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag1.baseline.jsonc +++ /dev/null @@ -1,142 +0,0 @@ -// === goToDefinition === -// === /foo.ts === - -// interface [|Foo|] { -// foo: string -// } -// namespace NS { -// export interface Bar { -// baz: Foo -// } -// } -// /** {@link /*GO TO DEFINITION*/Foo} foooo*/ -// const a = "" -// /** {@link NS.Bar} ns.bar*/ -// const b = "" -// // --- (line: 13) skipped --- - - - - -// === goToDefinition === -// === /foo.ts === - -// interface Foo { -// foo: string -// } -// namespace NS { -// export interface [|Bar|] { -// baz: Foo -// } -// } -// /** {@link Foo} foooo*/ -// const a = "" -// /** {@link NS./*GO TO DEFINITION*/Bar} ns.bar*/ -// const b = "" -// /** {@link Foo f1}*/ -// const c = "" -// // --- (line: 15) skipped --- - - - - -// === goToDefinition === -// === /foo.ts === - -// interface [|Foo|] { -// foo: string -// } -// namespace NS { -// // --- (line: 5) skipped --- - - -// --- (line: 9) skipped --- -// const a = "" -// /** {@link NS.Bar} ns.bar*/ -// const b = "" -// /** {@link /*GO TO DEFINITION*/Foo f1}*/ -// const c = "" -// /** {@link NS.Bar ns.bar}*/ -// const d = "" -// // --- (line: 17) skipped --- - - - - -// === goToDefinition === -// === /foo.ts === - -// interface Foo { -// foo: string -// } -// namespace NS { -// export interface [|Bar|] { -// baz: Foo -// } -// } -// /** {@link Foo} foooo*/ -// const a = "" -// /** {@link NS.Bar} ns.bar*/ -// const b = "" -// /** {@link Foo f1}*/ -// const c = "" -// /** {@link NS./*GO TO DEFINITION*/Bar ns.bar}*/ -// const d = "" -// /** {@link d }dd*/ -// const e = "" -// /** @param x {@link Foo} */ -// function foo(x) { } - - - - -// === goToDefinition === -// === /foo.ts === - -// --- (line: 12) skipped --- -// /** {@link Foo f1}*/ -// const c = "" -// /** {@link NS.Bar ns.bar}*/ -// const [|d|] = "" -// /** {@link /*GO TO DEFINITION*/d }dd*/ -// const e = "" -// /** @param x {@link Foo} */ -// function foo(x) { } - - - - -// === goToDefinition === -// === /foo.ts === - -// interface [|Foo|] { -// foo: string -// } -// namespace NS { -// // --- (line: 5) skipped --- - - -// --- (line: 15) skipped --- -// const d = "" -// /** {@link d }dd*/ -// const e = "" -// /** @param x {@link /*GO TO DEFINITION*/Foo} */ -// function foo(x) { } - - - - -// === goToDefinition === -// === /foo.ts === - -// interface [|Foo|] { -// foo: string -// } -// namespace NS { -// // --- (line: 5) skipped --- - - -// === /bar.ts === - -// /** {@link /*GO TO DEFINITION*/Foo }dd*/ -// const f = "" diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag2.baseline.jsonc deleted file mode 100644 index 85a54a4873..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag2.baseline.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -// === goToDefinition === -// === /gotoDefinitionLinkTag2.ts === - -// enum E { -// /** {@link /*GO TO DEFINITION*/A} */ -// [|A|] -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag3.baseline.jsonc deleted file mode 100644 index 7da06310b0..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag3.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /a.ts === - -// enum E { -// /** {@link /*GO TO DEFINITION*/Foo} */ -// [|Foo|] -// } -// interface Foo { -// foo: E.Foo; -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag4.baseline.jsonc deleted file mode 100644 index e2544a7456..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag4.baseline.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -// === goToDefinition === -// === /b.ts === - -// enum E { -// /** {@link /*GO TO DEFINITION*/Foo} */ -// [|Foo|] -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag5.baseline.jsonc deleted file mode 100644 index 92dcc5f1e4..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag5.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /gotoDefinitionLinkTag5.ts === - -// enum E { -// /** {@link /*GO TO DEFINITION*/B} */ -// A, -// [|B|] -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag6.baseline.jsonc deleted file mode 100644 index d8119d134b..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionLinkTag6.baseline.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -// === goToDefinition === -// === /gotoDefinitionLinkTag6.ts === - -// enum E { -// /** {@link E./*GO TO DEFINITION*/A} */ -// [|A|] -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionPropertyAccessExpressionHeritageClause.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionPropertyAccessExpressionHeritageClause.baseline.jsonc deleted file mode 100644 index 62ca3f6e95..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionPropertyAccessExpressionHeritageClause.baseline.jsonc +++ /dev/null @@ -1,22 +0,0 @@ -// === goToDefinition === -// === /gotoDefinitionPropertyAccessExpressionHeritageClause.ts === - -// class B {} -// function foo() { -// return {[|B|]: B}; -// } -// class C extends (foo())./*GO TO DEFINITION*/B {} -// class C1 extends foo().B {} - - - - -// === goToDefinition === -// === /gotoDefinitionPropertyAccessExpressionHeritageClause.ts === - -// class B {} -// function foo() { -// return {[|B|]: B}; -// } -// class C extends (foo()).B {} -// class C1 extends foo()./*GO TO DEFINITION*/B {} diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionSatisfiesTag.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionSatisfiesTag.baseline.jsonc deleted file mode 100644 index 7f02562f3d..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionSatisfiesTag.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /a.js === - -// /** -// * @typedef {Object} [|T|] -// * @property {number} a -// */ -// -// /** @satisfies {/*GO TO DEFINITION*/T} comment */ -// const foo = { a: 1 }; diff --git a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionThrowsTag.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionThrowsTag.baseline.jsonc deleted file mode 100644 index 2c0e4a15c2..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/GotoDefinitionThrowsTag.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /gotoDefinitionThrowsTag.ts === - -// class E extends Error {} -// -// /** -// * @throws {/*GO TO DEFINITION*/E} -// */ -// function f() {} diff --git a/testdata/baselines/reference/fourslash/goToDef/ImportTypeNodeGoToDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/ImportTypeNodeGoToDefinition.baseline.jsonc deleted file mode 100644 index 0f9c93a1f4..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/ImportTypeNodeGoToDefinition.baseline.jsonc +++ /dev/null @@ -1,122 +0,0 @@ -// === goToDefinition === -// === /ns.ts === - -// [|export namespace Foo { -// export namespace Bar { -// export class Baz {} -// } -// }|] - - -// === /usage.ts === - -// type A = typeof import(/*GO TO DEFINITION*/"./ns").Foo.Bar; -// type B = import("./ns").Foo.Bar.Baz; - - - - -// === goToDefinition === -// === /ns.ts === - -// export namespace [|Foo|] { -// export namespace Bar { -// export class Baz {} -// } -// } - - -// === /usage.ts === - -// type A = typeof import("./ns")./*GO TO DEFINITION*/Foo.Bar; -// type B = import("./ns").Foo.Bar.Baz; - - - - -// === goToDefinition === -// === /ns.ts === - -// export namespace Foo { -// export namespace [|Bar|] { -// export class Baz {} -// } -// } - - -// === /usage.ts === - -// type A = typeof import("./ns").Foo./*GO TO DEFINITION*/Bar; -// type B = import("./ns").Foo.Bar.Baz; - - - - -// === goToDefinition === -// === /ns.ts === - -// [|export namespace Foo { -// export namespace Bar { -// export class Baz {} -// } -// }|] - - -// === /usage.ts === - -// type A = typeof import("./ns").Foo.Bar; -// type B = import(/*GO TO DEFINITION*/"./ns").Foo.Bar.Baz; - - - - -// === goToDefinition === -// === /ns.ts === - -// export namespace [|Foo|] { -// export namespace Bar { -// export class Baz {} -// } -// } - - -// === /usage.ts === - -// type A = typeof import("./ns").Foo.Bar; -// type B = import("./ns")./*GO TO DEFINITION*/Foo.Bar.Baz; - - - - -// === goToDefinition === -// === /ns.ts === - -// export namespace Foo { -// export namespace [|Bar|] { -// export class Baz {} -// } -// } - - -// === /usage.ts === - -// type A = typeof import("./ns").Foo.Bar; -// type B = import("./ns").Foo./*GO TO DEFINITION*/Bar.Baz; - - - - -// === goToDefinition === -// === /ns.ts === - -// export namespace Foo { -// export namespace Bar { -// export class [|Baz|] {} -// } -// } - - -// === /usage.ts === - -// type A = typeof import("./ns").Foo.Bar; -// type B = import("./ns").Foo.Bar./*GO TO DEFINITION*/Baz; diff --git a/testdata/baselines/reference/fourslash/goToDef/JavaScriptClass3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/JavaScriptClass3.baseline.jsonc deleted file mode 100644 index a25b5dc7cc..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/JavaScriptClass3.baseline.jsonc +++ /dev/null @@ -1,30 +0,0 @@ -// === goToDefinition === -// === /Foo.js === - -// class Foo { -// constructor() { -// this.[|alpha|] = 10; -// this.beta = 'gamma'; -// } -// method() { return this.alpha; } -// } -// var x = new Foo(); -// x.alpha/*GO TO DEFINITION*/; -// x.beta; - - - - -// === goToDefinition === -// === /Foo.js === - -// class Foo { -// constructor() { -// this.alpha = 10; -// this.[|beta|] = 'gamma'; -// } -// method() { return this.alpha; } -// } -// var x = new Foo(); -// x.alpha; -// x.beta/*GO TO DEFINITION*/; diff --git a/testdata/baselines/reference/fourslash/goToDef/JsDocSee1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/JsDocSee1.baseline.jsonc deleted file mode 100644 index 1fb40f844d..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/JsDocSee1.baseline.jsonc +++ /dev/null @@ -1,101 +0,0 @@ -// === goToDefinition === -// === /jsDocSee1.ts === - -// interface [|Foo|] { -// foo: string -// } -// namespace NS { -// export interface Bar { -// baz: Foo -// } -// } -// /** @see {/*GO TO DEFINITION*/Foo} foooo*/ -// const a = "" -// /** @see {NS.Bar} ns.bar*/ -// const b = "" -// // --- (line: 13) skipped --- - - - - -// === goToDefinition === -// === /jsDocSee1.ts === - -// interface Foo { -// foo: string -// } -// namespace NS { -// export interface [|Bar|] { -// baz: Foo -// } -// } -// /** @see {Foo} foooo*/ -// const a = "" -// /** @see {NS./*GO TO DEFINITION*/Bar} ns.bar*/ -// const b = "" -// /** @see Foo f1*/ -// const c = "" -// // --- (line: 15) skipped --- - - - - -// === goToDefinition === -// === /jsDocSee1.ts === - -// interface [|Foo|] { -// foo: string -// } -// namespace NS { -// // --- (line: 5) skipped --- - - -// --- (line: 9) skipped --- -// const a = "" -// /** @see {NS.Bar} ns.bar*/ -// const b = "" -// /** @see /*GO TO DEFINITION*/Foo f1*/ -// const c = "" -// /** @see NS.Bar ns.bar*/ -// const d = "" -// /** @see d dd*/ -// const e = "" - - - - -// === goToDefinition === -// === /jsDocSee1.ts === - -// interface Foo { -// foo: string -// } -// namespace NS { -// export interface [|Bar|] { -// baz: Foo -// } -// } -// /** @see {Foo} foooo*/ -// const a = "" -// /** @see {NS.Bar} ns.bar*/ -// const b = "" -// /** @see Foo f1*/ -// const c = "" -// /** @see NS./*GO TO DEFINITION*/Bar ns.bar*/ -// const d = "" -// /** @see d dd*/ -// const e = "" - - - - -// === goToDefinition === -// === /jsDocSee1.ts === - -// --- (line: 12) skipped --- -// /** @see Foo f1*/ -// const c = "" -// /** @see NS.Bar ns.bar*/ -// const [|d|] = "" -// /** @see /*GO TO DEFINITION*/d dd*/ -// const e = "" diff --git a/testdata/baselines/reference/fourslash/goToDef/JsDocSee2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/JsDocSee2.baseline.jsonc deleted file mode 100644 index da9d0b8a69..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/JsDocSee2.baseline.jsonc +++ /dev/null @@ -1,100 +0,0 @@ -// === goToDefinition === -// === /jsDocSee2.ts === - -// /** @see {/*GO TO DEFINITION*/foooo} unknown reference*/ -// const a = "" -// /** @see {@bar} invalid tag*/ -// const b = "" -// // --- (line: 5) skipped --- - - - - -// === goToDefinition === -// === /jsDocSee2.ts === - -// /** @see {foooo} unknown reference*/ -// const a = "" -// /** @see {/*GO TO DEFINITION*/@bar} invalid tag*/ -// const b = "" -// /** @see foooo unknown reference without brace*/ -// const c = "" -// // --- (line: 7) skipped --- - - - - -// === goToDefinition === -// === /jsDocSee2.ts === - -// /** @see {foooo} unknown reference*/ -// const a = "" -// /** @see {@bar} invalid tag*/ -// const b = "" -// /** @see /*GO TO DEFINITION*/foooo unknown reference without brace*/ -// const c = "" -// /** @see @bar invalid tag without brace*/ -// const d = "" -// // --- (line: 9) skipped --- - - - - -// === goToDefinition === -// === /jsDocSee2.ts === - -// --- (line: 3) skipped --- -// const b = "" -// /** @see foooo unknown reference without brace*/ -// const c = "" -// /** @see /*GO TO DEFINITION*/@bar invalid tag without brace*/ -// const d = "" -// /** @see {d@fff} partial reference */ -// const e = "" -// // --- (line: 11) skipped --- - - - - -// === goToDefinition === -// === /jsDocSee2.ts === - -// --- (line: 4) skipped --- -// /** @see foooo unknown reference without brace*/ -// const c = "" -// /** @see @bar invalid tag without brace*/ -// const [|d|] = "" -// /** @see {/*GO TO DEFINITION*/d@fff} partial reference */ -// const e = "" -// /** @see @@@@@@ total invalid tag*/ -// const f = "" -// /** @see d@{fff} partial reference */ -// const g = "" - - - - -// === goToDefinition === -// === /jsDocSee2.ts === - -// --- (line: 7) skipped --- -// const d = "" -// /** @see {d@fff} partial reference */ -// const e = "" -// /** @see /*GO TO DEFINITION*/@@@@@@ total invalid tag*/ -// const f = "" -// /** @see d@{fff} partial reference */ -// const g = "" - - - - -// === goToDefinition === -// === /jsDocSee2.ts === - -// --- (line: 9) skipped --- -// const e = "" -// /** @see @@@@@@ total invalid tag*/ -// const f = "" -// /** @see d@{/*GO TO DEFINITION*/fff} partial reference */ -// const g = "" diff --git a/testdata/baselines/reference/fourslash/goToDef/JsDocSee3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/JsDocSee3.baseline.jsonc deleted file mode 100644 index 5f19999ed3..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/JsDocSee3.baseline.jsonc +++ /dev/null @@ -1,10 +0,0 @@ -// === goToDefinition === -// === /jsDocSee3.ts === - -// function foo ([|a|]: string) { -// /** -// * @see {/*GO TO DEFINITION*/a} -// */ -// function bar (a: string) { -// } -// } diff --git a/testdata/baselines/reference/fourslash/goToDef/JsDocSee4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/JsDocSee4.baseline.jsonc deleted file mode 100644 index 2f1e4985d6..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/JsDocSee4.baseline.jsonc +++ /dev/null @@ -1,57 +0,0 @@ -// === goToDefinition === -// === /jsDocSee4.ts === - -// class [|A|] { -// foo () { } -// } -// declare const a: A; -// /** -// * @see {/*GO TO DEFINITION*/A#foo} -// */ -// const t1 = 1 -// /** -// // --- (line: 10) skipped --- - - - - -// === goToDefinition === -// === /jsDocSee4.ts === - -// class A { -// foo () { } -// } -// declare const [|a|]: A; -// /** -// * @see {A#foo} -// */ -// const t1 = 1 -// /** -// * @see {/*GO TO DEFINITION*/a.foo()} -// */ -// const t2 = 1 -// /** -// // --- (line: 14) skipped --- - - - - -// === goToDefinition === -// === /jsDocSee4.ts === - -// class A { -// foo () { } -// } -// declare const [|a|]: A; -// /** -// * @see {A#foo} -// */ -// const t1 = 1 -// /** -// * @see {a.foo()} -// */ -// const t2 = 1 -// /** -// * @see {@link /*GO TO DEFINITION*/a.foo()} -// */ -// const t3 = 1 diff --git a/testdata/baselines/reference/fourslash/goToDef/JsdocTypedefTagGoToDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/JsdocTypedefTagGoToDefinition.baseline.jsonc deleted file mode 100644 index 3697dc9d8e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/JsdocTypedefTagGoToDefinition.baseline.jsonc +++ /dev/null @@ -1,37 +0,0 @@ -// === goToDefinition === -// === /jsdocCompletion_typedef.js === - -// /** -// * @typedef {Object} Person -// * @property {string} [|personName|] -// * @property {number} personAge -// */ -// -// /** -// * @typedef {{ animalName: string, animalAge: number }} Animal -// */ -// -// /** @type {Person} */ -// var person; person.personName/*GO TO DEFINITION*/ -// -// /** @type {Animal} */ -// var animal; animal.animalName - - - - -// === goToDefinition === -// === /jsdocCompletion_typedef.js === - -// --- (line: 4) skipped --- -// */ -// -// /** -// * @typedef {{ [|animalName|]: string, animalAge: number }} Animal -// */ -// -// /** @type {Person} */ -// var person; person.personName -// -// /** @type {Animal} */ -// var animal; animal.animalName/*GO TO DEFINITION*/ diff --git a/testdata/baselines/reference/fourslash/goToDef/ReallyLargeFile.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/ReallyLargeFile.baseline.jsonc deleted file mode 100644 index 13ba87bdbc..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/ReallyLargeFile.baseline.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -// === goToDefinition === -// === /file.d.ts === - -// namespace /*GO TO DEFINITION*/[|Foo|] { -// -// -// -// // --- (line: 5) skipped --- diff --git a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionClasses.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionClasses.baseline.jsonc deleted file mode 100644 index eb2a326717..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionClasses.baseline.jsonc +++ /dev/null @@ -1,53 +0,0 @@ -// === goToDefinition === -// === /file.tsx === - -// declare module JSX { -// interface Element { } -// interface IntrinsicElements { } -// interface ElementAttributesProperty { props; } -// } -// class [|MyClass|] { -// props: { -// foo: string; -// } -// } -// var x = ; -// var y = ; -// var z = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 4) skipped --- -// } -// class MyClass { -// props: { -// [|foo|]: string; -// } -// } -// var x = ; -// var y = ; -// var z = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// declare module JSX { -// interface Element { } -// interface IntrinsicElements { } -// interface ElementAttributesProperty { props; } -// } -// class [|MyClass|] { -// props: { -// foo: string; -// } -// } -// var x = ; -// var y = ; -// var z = ; diff --git a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionIntrinsics.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionIntrinsics.baseline.jsonc deleted file mode 100644 index 4d2fb8c68d..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionIntrinsics.baseline.jsonc +++ /dev/null @@ -1,53 +0,0 @@ -// === goToDefinition === -// === /file.tsx === - -// declare module JSX { -// interface Element { } -// interface IntrinsicElements { -// [|div|]: { -// name?: string; -// isOpen?: boolean; -// }; -// span: { n: string; }; -// } -// } -// var x = ; -// var y = ; -// var z =
; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 4) skipped --- -// name?: string; -// isOpen?: boolean; -// }; -// [|span|]: { n: string; }; -// } -// } -// var x =
; -// var y = ; -// var z =
; - - - - -// === goToDefinition === -// === /file.tsx === - -// declare module JSX { -// interface Element { } -// interface IntrinsicElements { -// div: { -// [|name|]?: string; -// isOpen?: boolean; -// }; -// span: { n: string; }; -// } -// } -// var x =
; -// var y = ; -// var z =
; diff --git a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionStatelessFunction1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionStatelessFunction1.baseline.jsonc deleted file mode 100644 index 9e4d44a42d..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionStatelessFunction1.baseline.jsonc +++ /dev/null @@ -1,98 +0,0 @@ -// === goToDefinition === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: "hell" -// optional?: boolean -// } -// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; -// let opt = ; -// let opt1 = ; -// let opt2 = ; -// let opt3 = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: "hell" -// optional?: boolean -// } -// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; -// let opt = ; -// let opt1 = ; -// let opt2 = ; -// let opt3 = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: "hell" -// optional?: boolean -// } -// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; -// let opt = ; -// let opt1 = ; -// let opt2 = ; -// let opt3 = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 8) skipped --- -// propString: "hell" -// optional?: boolean -// } -// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; -// let opt = ; -// let opt1 = ; -// let opt2 = ; -// let opt3 = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 4) skipped --- -// interface ElementAttributesProperty { props; } -// } -// interface OptionPropBag { -// [|propx|]: number -// propString: "hell" -// optional?: boolean -// } -// declare function Opt(attributes: OptionPropBag): JSX.Element; -// let opt = ; -// let opt1 = ; -// let opt2 = ; -// let opt3 = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 6) skipped --- -// interface OptionPropBag { -// propx: number -// propString: "hell" -// [|optional|]?: boolean -// } -// declare function Opt(attributes: OptionPropBag): JSX.Element; -// let opt = ; -// let opt1 = ; -// let opt2 = ; -// let opt3 = ; diff --git a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionStatelessFunction2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionStatelessFunction2.baseline.jsonc deleted file mode 100644 index e32802af73..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionStatelessFunction2.baseline.jsonc +++ /dev/null @@ -1,115 +0,0 @@ -// === goToDefinition === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt =
; -// let opt = ; -// let opt = {}} />; -// let opt = {}} ignore-prop />; -// let opt = ; -// let opt = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// let opt =
; -// let opt = {}} />; -// let opt = {}} ignore-prop />; -// let opt = ; -// let opt = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// let opt = ; -// let opt =
{}} />; -// let opt = {}} ignore-prop />; -// let opt = ; -// let opt = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// let opt = ; -// let opt = {}} />; -// let opt =
{}} ignore-prop />; -// let opt = ; -// let opt = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 14) skipped --- -// goTo: string; -// } -// declare function MainButton(buttonProps: ButtonProps): JSX.Element; -// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// let opt = ; -// let opt = {}} />; -// let opt = {}} ignore-prop />; -// let opt =
; -// let opt = ; - - - - -// === goToDefinition === -// === /file.tsx === - -// --- (line: 13) skipped --- -// interface LinkProps extends ClickableProps { -// goTo: string; -// } -// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; -// declare function MainButton(linkProps: LinkProps): JSX.Element; -// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; -// let opt = ; -// let opt = ; -// let opt = {}} />; -// let opt = {}} ignore-prop />; -// let opt = ; -// let opt =
; diff --git a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionUnionElementType1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionUnionElementType1.baseline.jsonc deleted file mode 100644 index 365fd3d34e..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionUnionElementType1.baseline.jsonc +++ /dev/null @@ -1,15 +0,0 @@ -// === goToDefinition === -// === /file.tsx === - -// --- (line: 3) skipped --- -// } -// interface ElementAttributesProperty { props; } -// } -// function [|SFC1|](prop: { x: number }) { -// return
hello
; -// }; -// function SFC2(prop: { x: boolean }) { -// return

World

; -// } -// var [|SFCComp|] = SFC1 || SFC2; -// diff --git a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionUnionElementType2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionUnionElementType2.baseline.jsonc deleted file mode 100644 index e0dde11950..0000000000 --- a/testdata/baselines/reference/fourslash/goToDef/TsxGoToDefinitionUnionElementType2.baseline.jsonc +++ /dev/null @@ -1,9 +0,0 @@ -// === goToDefinition === -// === /file.tsx === - -// --- (line: 8) skipped --- -// } -// private method() { } -// } -// var [|RCComp|] = RC1 || RC2; -// diff --git a/testdata/baselines/reference/fourslash/goToDefinition/declarationMapGoToDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapGoToDefinition.baseline.jsonc new file mode 100644 index 0000000000..a12955d6fa --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapGoToDefinition.baseline.jsonc @@ -0,0 +1,14 @@ +// === goToDefinition === +// === /indexdef.d.ts === +// export declare class Foo { +// member: string; +// [|methodName|](propName: SomeType): void; +// otherMethod(): { +// x: number; +// y?: undefined; +// // --- (line: 7) skipped --- + +// === /mymodule.ts === +// import * as mod from "./indexdef"; +// const instance = new mod.Foo(); +// instance./*GOTO DEF*/methodName({member: 12}); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionRelativeSourceRoot.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionRelativeSourceRoot.baseline.jsonc new file mode 100644 index 0000000000..5a4c9e8859 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionRelativeSourceRoot.baseline.jsonc @@ -0,0 +1,14 @@ +// === goToDefinition === +// === /out/indexdef.d.ts === +// export declare class Foo { +// member: string; +// [|methodName|](propName: SomeType): void; +// otherMethod(): { +// x: number; +// y?: undefined; +// // --- (line: 7) skipped --- + +// === /mymodule.ts === +// import * as mod from "./out/indexdef"; +// const instance = new mod.Foo(); +// instance./*GOTO DEF*/methodName({member: 12}); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionSameNameDifferentDirectory.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionSameNameDifferentDirectory.baseline.jsonc new file mode 100644 index 0000000000..bd7f38ec57 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsGoToDefinitionSameNameDifferentDirectory.baseline.jsonc @@ -0,0 +1,39 @@ +// === goToDefinition === +// === /BaseClass/Source.d.ts === +// declare class [|Control|] { +// constructor(); +// /** this is a super var */ +// myVar: boolean | 'yeah'; +// } +// //# sourceMappingURL=Source.d.ts.map + +// === /buttonClass/Source.ts === +// // I cannot F12 navigate to Control +// // vvvvvvv +// class Button extends /*GOTO DEF*/Control { +// public myFunction() { +// // I cannot F12 navigate to myVar +// // vvvvv +// // --- (line: 7) skipped --- + + + +// === goToDefinition === +// === /BaseClass/Source.d.ts === +// declare class Control { +// constructor(); +// /** this is a super var */ +// [|myVar|]: boolean | 'yeah'; +// } +// //# sourceMappingURL=Source.d.ts.map + +// === /buttonClass/Source.ts === +// --- (line: 3) skipped --- +// public myFunction() { +// // I cannot F12 navigate to myVar +// // vvvvv +// if (typeof this./*GOTO DEF*/myVar === 'boolean') { +// this.myVar; +// } else { +// this.myVar.toLocaleUpperCase(); +// // --- (line: 11) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsOutOfDateMapping.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsOutOfDateMapping.baseline.jsonc new file mode 100644 index 0000000000..66e44c10de --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/declarationMapsOutOfDateMapping.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /home/src/workspaces/project/node_modules/a/dist/index.d.ts === +// export declare class [|Foo|] { +// bar: any; +// } +// //# sourceMappingURL=index.d.ts.map + +// === /home/src/workspaces/project/index.ts === +// import { Foo/*GOTO DEF*/ } from "a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/definition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/definition.baseline.jsonc new file mode 100644 index 0000000000..90392f6142 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/definition.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /a.ts === +// [|export class Foo {}|] + +// === /b.ts === +// import n = require('./a/*GOTO DEF*/'); +// var x = new n.Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/definition01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/definition01.baseline.jsonc new file mode 100644 index 0000000000..90392f6142 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/definition01.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /a.ts === +// [|export class Foo {}|] + +// === /b.ts === +// import n = require('./a/*GOTO DEF*/'); +// var x = new n.Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/definitionNameOnEnumMember.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/definitionNameOnEnumMember.baseline.jsonc new file mode 100644 index 0000000000..087c1a678f --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/definitionNameOnEnumMember.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /definitionNameOnEnumMember.ts === +// enum e { +// firstMember, +// secondMember, +// [|thirdMember|] +// } +// var enumMember = e./*GOTO DEF*/thirdMember; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/findAllRefsForDefaultExport.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/findAllRefsForDefaultExport.baseline.jsonc new file mode 100644 index 0000000000..4b94a0a31b --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/findAllRefsForDefaultExport.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /a.ts === +// export default function [|f|]() {} + +// === /b.ts === +// import g from "./a"; +// /*GOTO DEF*/g(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAcrossMultipleProjects.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAcrossMultipleProjects.baseline.jsonc new file mode 100644 index 0000000000..5759a9945b --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAcrossMultipleProjects.baseline.jsonc @@ -0,0 +1,19 @@ +// === goToDefinition === +// === /a.ts === +// var [|x|]: number; + +// === /b.ts === +// var [|x|]: number; + +// === /c.ts === +// var [|x|]: number; + +// === /d.ts === +// var [|x|]: number; + +// === /e.ts === +// /// +// /// +// /// +// /// +// /*GOTO DEF*/x++; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAlias.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAlias.baseline.jsonc new file mode 100644 index 0000000000..327d98ff29 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAlias.baseline.jsonc @@ -0,0 +1,65 @@ +// === goToDefinition === +// === /b.ts === +// import [|alias1|] = require("fileb"); +// module Module { +// export import alias2 = alias1; +// } +// +// // Type position +// var t1: /*GOTO DEF*/alias1.IFoo; +// var t2: Module.alias2.IFoo; +// +// // Value posistion +// var v1 = new alias1.Foo(); +// var v2 = new Module.alias2.Foo(); + + + +// === goToDefinition === +// === /b.ts === +// import [|alias1|] = require("fileb"); +// module Module { +// export import alias2 = alias1; +// } +// +// // Type position +// var t1: alias1.IFoo; +// var t2: Module.alias2.IFoo; +// +// // Value posistion +// var v1 = new /*GOTO DEF*/alias1.Foo(); +// var v2 = new Module.alias2.Foo(); + + + +// === goToDefinition === +// === /b.ts === +// import alias1 = require("fileb"); +// module Module { +// export import [|alias2|] = alias1; +// } +// +// // Type position +// var t1: alias1.IFoo; +// var t2: Module./*GOTO DEF*/alias2.IFoo; +// +// // Value posistion +// var v1 = new alias1.Foo(); +// var v2 = new Module.alias2.Foo(); + + + +// === goToDefinition === +// === /b.ts === +// import alias1 = require("fileb"); +// module Module { +// export import [|alias2|] = alias1; +// } +// +// // Type position +// var t1: alias1.IFoo; +// var t2: Module.alias2.IFoo; +// +// // Value posistion +// var v1 = new alias1.Foo(); +// var v2 = new Module./*GOTO DEF*/alias2.Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAmbiants.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAmbiants.baseline.jsonc new file mode 100644 index 0000000000..c6ec5cc560 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAmbiants.baseline.jsonc @@ -0,0 +1,87 @@ +// === goToDefinition === +// === /goToDefinitionAmbiants.ts === +// declare var [|ambientVar|]; +// declare function ambientFunction(); +// declare class ambientClass { +// constructor(); +// static method(); +// public method(); +// } +// +// /*GOTO DEF*/ambientVar = 1; +// ambientFunction(); +// var ambientClassVariable = new ambientClass(); +// ambientClass.method(); +// ambientClassVariable.method(); + + + +// === goToDefinition === +// === /goToDefinitionAmbiants.ts === +// declare var ambientVar; +// declare function [|ambientFunction|](); +// declare class ambientClass { +// constructor(); +// static method(); +// public method(); +// } +// +// ambientVar = 1; +// /*GOTO DEF*/ambientFunction(); +// var ambientClassVariable = new ambientClass(); +// ambientClass.method(); +// ambientClassVariable.method(); + + + +// === goToDefinition === +// === /goToDefinitionAmbiants.ts === +// declare var ambientVar; +// declare function ambientFunction(); +// declare class [|ambientClass|] { +// [|constructor();|] +// static method(); +// public method(); +// } +// +// ambientVar = 1; +// ambientFunction(); +// var ambientClassVariable = new /*GOTO DEF*/ambientClass(); +// ambientClass.method(); +// ambientClassVariable.method(); + + + +// === goToDefinition === +// === /goToDefinitionAmbiants.ts === +// declare var ambientVar; +// declare function ambientFunction(); +// declare class ambientClass { +// constructor(); +// static [|method|](); +// public method(); +// } +// +// ambientVar = 1; +// ambientFunction(); +// var ambientClassVariable = new ambientClass(); +// ambientClass./*GOTO DEF*/method(); +// ambientClassVariable.method(); + + + +// === goToDefinition === +// === /goToDefinitionAmbiants.ts === +// declare var ambientVar; +// declare function ambientFunction(); +// declare class ambientClass { +// constructor(); +// static method(); +// public [|method|](); +// } +// +// ambientVar = 1; +// ambientFunction(); +// var ambientClassVariable = new ambientClass(); +// ambientClass.method(); +// ambientClassVariable./*GOTO DEF*/method(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionApparentTypeProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionApparentTypeProperties.baseline.jsonc new file mode 100644 index 0000000000..5fc2e2ca45 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionApparentTypeProperties.baseline.jsonc @@ -0,0 +1,21 @@ +// === goToDefinition === +// === /goToDefinitionApparentTypeProperties.ts === +// interface Number { +// [|myObjectMethod|](): number; +// } +// +// var o = 0; +// o./*GOTO DEF*/myObjectMethod(); +// o["myObjectMethod"](); + + + +// === goToDefinition === +// === /goToDefinitionApparentTypeProperties.ts === +// interface Number { +// [|myObjectMethod|](): number; +// } +// +// var o = 0; +// o.myObjectMethod(); +// o["/*GOTO DEF*/myObjectMethod"](); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait1.baseline.jsonc new file mode 100644 index 0000000000..85494107dd --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait1.baseline.jsonc @@ -0,0 +1,19 @@ +// === goToDefinition === +// === /goToDefinitionAwait1.ts === +// async function [|foo|]() { +// /*GOTO DEF*/await Promise.resolve(0); +// } +// function notAsync() { +// await Promise.resolve(0); +// } + + + +// === goToDefinition === +// === /goToDefinitionAwait1.ts === +// async function foo() { +// await Promise.resolve(0); +// } +// function [|notAsync|]() { +// /*GOTO DEF*/await Promise.resolve(0); +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait2.baseline.jsonc new file mode 100644 index 0000000000..43b882974f --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait2.baseline.jsonc @@ -0,0 +1,3 @@ +// === goToDefinition === +// === /goToDefinitionAwait2.ts === +// /*GOTO DEF*/await Promise.resolve(0); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait3.baseline.jsonc new file mode 100644 index 0000000000..8367930473 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait3.baseline.jsonc @@ -0,0 +1,23 @@ +// === goToDefinition === +// === /goToDefinitionAwait3.ts === +// class C { +// [|notAsync|]() { +// /*GOTO DEF*/await Promise.resolve(0); +// } +// +// async foo() { +// // --- (line: 7) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionAwait3.ts === +// class C { +// notAsync() { +// await Promise.resolve(0); +// } +// +// async [|foo|]() { +// /*GOTO DEF*/await Promise.resolve(0); +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait4.baseline.jsonc new file mode 100644 index 0000000000..5976587ef6 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionAwait4.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /goToDefinitionAwait4.ts === +// async function outerAsyncFun() { +// let [|af|] = async () => { +// /*GOTO DEF*/await Promise.resolve(0); +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionBuiltInTypes.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionBuiltInTypes.baseline.jsonc new file mode 100644 index 0000000000..20ae582e13 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionBuiltInTypes.baseline.jsonc @@ -0,0 +1,33 @@ +// === goToDefinition === +// === /goToDefinitionBuiltInTypes.ts === +// var n: /*GOTO DEF*/number; +// var s: string; +// var b: boolean; +// var v: void; + + + +// === goToDefinition === +// === /goToDefinitionBuiltInTypes.ts === +// var n: number; +// var s: /*GOTO DEF*/string; +// var b: boolean; +// var v: void; + + + +// === goToDefinition === +// === /goToDefinitionBuiltInTypes.ts === +// var n: number; +// var s: string; +// var b: /*GOTO DEF*/boolean; +// var v: void; + + + +// === goToDefinition === +// === /goToDefinitionBuiltInTypes.ts === +// var n: number; +// var s: string; +// var b: boolean; +// var v: /*GOTO DEF*/void; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionBuiltInValues.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionBuiltInValues.baseline.jsonc new file mode 100644 index 0000000000..ff62e8f2e0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionBuiltInValues.baseline.jsonc @@ -0,0 +1,47 @@ +// === goToDefinition === +// === /goToDefinitionBuiltInValues.ts === +// var u = /*GOTO DEF*/undefined; +// var n = null; +// var a = function() { return arguments; }; +// var t = true; +// var f = false; + + + +// === goToDefinition === +// === /goToDefinitionBuiltInValues.ts === +// var u = undefined; +// var n = /*GOTO DEF*/null; +// var a = function() { return arguments; }; +// var t = true; +// var f = false; + + + +// === goToDefinition === +// === /goToDefinitionBuiltInValues.ts === +// var u = undefined; +// var n = null; +// var a = function() { return /*GOTO DEF*/arguments; }; +// var t = true; +// var f = false; + + + +// === goToDefinition === +// === /goToDefinitionBuiltInValues.ts === +// var u = undefined; +// var n = null; +// var a = function() { return arguments; }; +// var t = /*GOTO DEF*/true; +// var f = false; + + + +// === goToDefinition === +// === /goToDefinitionBuiltInValues.ts === +// var u = undefined; +// var n = null; +// var a = function() { return arguments; }; +// var t = true; +// var f = /*GOTO DEF*/false; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc new file mode 100644 index 0000000000..3a900298ab --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionCSSPatternAmbientModule.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /types.ts === +// declare module [|"*.css"|] { +// const styles: any; +// export = styles; +// } + +// === /index.ts === +// import styles from /*GOTO DEF*/"./index.css"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionClassConstructors.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionClassConstructors.baseline.jsonc new file mode 100644 index 0000000000..9d9d23db29 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionClassConstructors.baseline.jsonc @@ -0,0 +1,63 @@ +// === goToDefinition === +// === /definitions.ts === +// export class Base { +// [|constructor(protected readonly cArg: string) {}|] +// } +// +// export class [|Derived|] extends Base { +// readonly email = this.cArg.getByLabel('Email') +// readonly password = this.cArg.getByLabel('Password') +// } + +// === /main.ts === +// import { Derived } from './definitions' +// const derived = new /*GOTO DEF*/Derived(cArg) + + + +// === goToDefinition === +// === /defInSameFile.ts === +// import { Base } from './definitions' +// class [|SameFile|] extends Base { +// readonly name: string = 'SameFile' +// } +// const SameFile = new /*GOTO DEF*/SameFile(cArg) +// const wrapper = new Base(cArg) + +// === /definitions.ts === +// export class Base { +// [|constructor(protected readonly cArg: string) {}|] +// } +// +// export class Derived extends Base { +// // --- (line: 6) skipped --- + + + +// === goToDefinition === +// === /hasConstructor.ts === +// import { Base } from './definitions' +// class [|HasConstructor|] extends Base { +// [|constructor() {}|] +// readonly name: string = ''; +// } +// const hasConstructor = new /*GOTO DEF*/HasConstructor(cArg) + + + +// === goToDefinition === +// === /definitions.ts === +// export class [|Base|] { +// [|constructor(protected readonly cArg: string) {}|] +// } +// +// export class Derived extends Base { +// // --- (line: 6) skipped --- + +// === /defInSameFile.ts === +// import { Base } from './definitions' +// class SameFile extends Base { +// readonly name: string = 'SameFile' +// } +// const SameFile = new SameFile(cArg) +// const wrapper = new /*GOTO DEF*/Base(cArg) \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionClassStaticBlocks.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionClassStaticBlocks.baseline.jsonc new file mode 100644 index 0000000000..2658fa5840 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionClassStaticBlocks.baseline.jsonc @@ -0,0 +1,34 @@ +// === goToDefinition === +// === /goToDefinitionClassStaticBlocks.ts === +// class ClassStaticBocks { +// static x; +// /*GOTO DEF*/static {} +// static y; +// static {} +// static y; +// static {} +// } + + + +// === goToDefinition === +// === /goToDefinitionClassStaticBlocks.ts === +// class ClassStaticBocks { +// static x; +// static {} +// static y; +// /*GOTO DEF*/static {} +// static y; +// static {} +// } + + + +// === goToDefinition === +// === /goToDefinitionClassStaticBlocks.ts === +// --- (line: 3) skipped --- +// static y; +// static {} +// static y; +// /*GOTO DEF*/static {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionConstructorOfClassExpression01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionConstructorOfClassExpression01.baseline.jsonc new file mode 100644 index 0000000000..4acbe4f97b --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionConstructorOfClassExpression01.baseline.jsonc @@ -0,0 +1,138 @@ +// === goToDefinition === +// === /goToDefinitionConstructorOfClassExpression01.ts === +// var x = class [|C|] { +// [|constructor() { +// var other = new /*GOTO DEF*/C; +// }|] +// } +// +// var y = class C extends x { +// // --- (line: 8) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionConstructorOfClassExpression01.ts === +// --- (line: 3) skipped --- +// } +// } +// +// var y = class [|C|] extends x { +// [|constructor() { +// super(); +// var other = new /*GOTO DEF*/C; +// }|] +// } +// var z = class C extends x { +// m() { +// // --- (line: 15) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionConstructorOfClassExpression01.ts === +// var x = class C { +// [|constructor() { +// var other = new C; +// }|] +// } +// +// var y = class C extends x { +// constructor() { +// super(); +// var other = new C; +// } +// } +// var z = class [|C|] extends x { +// m() { +// return new /*GOTO DEF*/C; +// } +// } +// +// // --- (line: 19) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionConstructorOfClassExpression01.ts === +// --- (line: 15) skipped --- +// } +// } +// +// var x1 = new /*GOTO DEF*/C(); +// var x2 = new x(); +// var y1 = new y(); +// var z1 = new z(); + + + +// === goToDefinition === +// === /goToDefinitionConstructorOfClassExpression01.ts === +// var [|x|] = class C { +// [|constructor() { +// var other = new C; +// }|] +// } +// +// var y = class C extends x { +// // --- (line: 8) skipped --- + +// --- (line: 16) skipped --- +// } +// +// var x1 = new C(); +// var x2 = new /*GOTO DEF*/x(); +// var y1 = new y(); +// var z1 = new z(); + + + +// === goToDefinition === +// === /goToDefinitionConstructorOfClassExpression01.ts === +// --- (line: 3) skipped --- +// } +// } +// +// var [|y|] = class C extends x { +// [|constructor() { +// super(); +// var other = new C; +// }|] +// } +// var z = class C extends x { +// m() { +// return new C; +// } +// } +// +// var x1 = new C(); +// var x2 = new x(); +// var y1 = new /*GOTO DEF*/y(); +// var z1 = new z(); + + + +// === goToDefinition === +// === /goToDefinitionConstructorOfClassExpression01.ts === +// var x = class C { +// [|constructor() { +// var other = new C; +// }|] +// } +// +// var y = class C extends x { +// constructor() { +// super(); +// var other = new C; +// } +// } +// var [|z|] = class C extends x { +// m() { +// return new C; +// } +// } +// +// var x1 = new C(); +// var x2 = new x(); +// var y1 = new y(); +// var z1 = new /*GOTO DEF*/z(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.baseline.jsonc new file mode 100644 index 0000000000..a8830b8eaa --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.baseline.jsonc @@ -0,0 +1,12 @@ +// === goToDefinition === +// === /goToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.ts === +// namespace [|Foo|] { +// export var x; +// } +// +// class [|Foo|] { +// [|constructor() { +// }|] +// } +// +// var x = new /*GOTO DEF*/Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionConstructorOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionConstructorOverloads.baseline.jsonc new file mode 100644 index 0000000000..ff9c7c772a --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionConstructorOverloads.baseline.jsonc @@ -0,0 +1,81 @@ +// === goToDefinition === +// === /goToDefinitionConstructorOverloads.ts === +// class [|ConstructorOverload|] { +// [|constructor();|] +// constructor(foo: string); +// constructor(foo: any) { } +// } +// +// var constructorOverload = new /*GOTO DEF*/ConstructorOverload(); +// var constructorOverload = new ConstructorOverload("foo"); +// +// class Extended extends ConstructorOverload { +// // --- (line: 11) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionConstructorOverloads.ts === +// class [|ConstructorOverload|] { +// constructor(); +// [|constructor(foo: string);|] +// constructor(foo: any) { } +// } +// +// var constructorOverload = new ConstructorOverload(); +// var constructorOverload = new /*GOTO DEF*/ConstructorOverload("foo"); +// +// class Extended extends ConstructorOverload { +// readonly name = "extended"; +// // --- (line: 12) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionConstructorOverloads.ts === +// class ConstructorOverload { +// /*GOTO DEF*/[|constructor();|] +// [|constructor(foo: string);|] +// [|constructor(foo: any) { }|] +// } +// +// var constructorOverload = new ConstructorOverload(); +// // --- (line: 8) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionConstructorOverloads.ts === +// class ConstructorOverload { +// [|constructor();|] +// constructor(foo: string); +// constructor(foo: any) { } +// } +// +// var constructorOverload = new ConstructorOverload(); +// var constructorOverload = new ConstructorOverload("foo"); +// +// class [|Extended|] extends ConstructorOverload { +// readonly name = "extended"; +// } +// var extended1 = new /*GOTO DEF*/Extended(); +// var extended2 = new Extended("foo"); + + + +// === goToDefinition === +// === /goToDefinitionConstructorOverloads.ts === +// class ConstructorOverload { +// constructor(); +// [|constructor(foo: string);|] +// constructor(foo: any) { } +// } +// +// var constructorOverload = new ConstructorOverload(); +// var constructorOverload = new ConstructorOverload("foo"); +// +// class [|Extended|] extends ConstructorOverload { +// readonly name = "extended"; +// } +// var extended1 = new Extended(); +// var extended2 = new /*GOTO DEF*/Extended("foo"); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDecorator.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDecorator.baseline.jsonc new file mode 100644 index 0000000000..0ebd8c5a1e --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDecorator.baseline.jsonc @@ -0,0 +1,33 @@ +// === goToDefinition === +// === /a.ts === +// function [|decorator|](target) { +// return target; +// } +// function decoratorFactory(...args) { +// return target => target; +// } + +// === /b.ts === +// @/*GOTO DEF*/decorator +// class C { +// @decoratorFactory(a, "22", true) +// method() {} +// } + + + +// === goToDefinition === +// === /a.ts === +// function decorator(target) { +// return target; +// } +// function [|decoratorFactory|](...args) { +// return target => target; +// } + +// === /b.ts === +// @decorator +// class C { +// @decora/*GOTO DEF*/torFactory(a, "22", true) +// method() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDecoratorOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDecoratorOverloads.baseline.jsonc new file mode 100644 index 0000000000..f3f2413078 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDecoratorOverloads.baseline.jsonc @@ -0,0 +1,29 @@ +// === goToDefinition === +// === /goToDefinitionDecoratorOverloads.ts === +// async function f() {} +// +// function [|dec|](target: any, propertyKey: string): void; +// function dec(target: any, propertyKey: symbol): void; +// function dec(target: any, propertyKey: string | symbol) {} +// +// declare const s: symbol; +// class C { +// @/*GOTO DEF*/dec f() {} +// @dec [s]() {} +// } + + + +// === goToDefinition === +// === /goToDefinitionDecoratorOverloads.ts === +// async function f() {} +// +// function dec(target: any, propertyKey: string): void; +// function [|dec|](target: any, propertyKey: symbol): void; +// function dec(target: any, propertyKey: string | symbol) {} +// +// declare const s: symbol; +// class C { +// @dec f() {} +// @/*GOTO DEF*/dec [s]() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire1.baseline.jsonc new file mode 100644 index 0000000000..5b50609eda --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire1.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /util.js === +// class Util {} +// module.exports = { [|Util|] }; + +// === /index.js === +// const { Util } = require('./util'); +// new Util/*GOTO DEF*/() \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire2.baseline.jsonc new file mode 100644 index 0000000000..d6658fec1e --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDestructuredRequire2.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /reexport.js === +// const { Util } = require('./util'); +// module.exports = { [|Util|] }; + +// === /index.js === +// const { Util } = require('./reexport'); +// new Util/*GOTO DEF*/() \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDifferentFile.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDifferentFile.baseline.jsonc new file mode 100644 index 0000000000..8bb9b0bdb2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDifferentFile.baseline.jsonc @@ -0,0 +1,82 @@ +// === goToDefinition === +// === /goToDefinitionDifferentFile_Definition.ts === +// var [|remoteVariable|]; +// function remoteFunction() { } +// class remoteClass { } +// interface remoteInterface{ } +// module remoteModule{ export var foo = 1;} + +// === /goToDefinitionDifferentFile_Consumption.ts === +// /*GOTO DEF*/remoteVariable = 1; +// remoteFunction(); +// var foo = new remoteClass(); +// class fooCls implements remoteInterface { } +// var fooVar = remoteModule.foo; + + + +// === goToDefinition === +// === /goToDefinitionDifferentFile_Definition.ts === +// var remoteVariable; +// function [|remoteFunction|]() { } +// class remoteClass { } +// interface remoteInterface{ } +// module remoteModule{ export var foo = 1;} + +// === /goToDefinitionDifferentFile_Consumption.ts === +// remoteVariable = 1; +// /*GOTO DEF*/remoteFunction(); +// var foo = new remoteClass(); +// class fooCls implements remoteInterface { } +// var fooVar = remoteModule.foo; + + + +// === goToDefinition === +// === /goToDefinitionDifferentFile_Definition.ts === +// var remoteVariable; +// function remoteFunction() { } +// class [|remoteClass|] { } +// interface remoteInterface{ } +// module remoteModule{ export var foo = 1;} + +// === /goToDefinitionDifferentFile_Consumption.ts === +// remoteVariable = 1; +// remoteFunction(); +// var foo = new /*GOTO DEF*/remoteClass(); +// class fooCls implements remoteInterface { } +// var fooVar = remoteModule.foo; + + + +// === goToDefinition === +// === /goToDefinitionDifferentFile_Definition.ts === +// var remoteVariable; +// function remoteFunction() { } +// class remoteClass { } +// interface [|remoteInterface|]{ } +// module remoteModule{ export var foo = 1;} + +// === /goToDefinitionDifferentFile_Consumption.ts === +// remoteVariable = 1; +// remoteFunction(); +// var foo = new remoteClass(); +// class fooCls implements /*GOTO DEF*/remoteInterface { } +// var fooVar = remoteModule.foo; + + + +// === goToDefinition === +// === /goToDefinitionDifferentFile_Definition.ts === +// var remoteVariable; +// function remoteFunction() { } +// class remoteClass { } +// interface remoteInterface{ } +// module [|remoteModule|]{ export var foo = 1;} + +// === /goToDefinitionDifferentFile_Consumption.ts === +// remoteVariable = 1; +// remoteFunction(); +// var foo = new remoteClass(); +// class fooCls implements remoteInterface { } +// var fooVar = /*GOTO DEF*/remoteModule.foo; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDifferentFileIndirectly.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDifferentFileIndirectly.baseline.jsonc new file mode 100644 index 0000000000..4a1334801b --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDifferentFileIndirectly.baseline.jsonc @@ -0,0 +1,82 @@ +// === goToDefinition === +// === /Remote2.ts === +// var [|rem2Var|]; +// function rem2Fn() { } +// class rem2Cls { } +// interface rem2Int{} +// module rem2Mod { export var foo; } + +// === /Definition.ts === +// /*GOTO DEF*/rem2Var = 1; +// rem2Fn(); +// var rem2foo = new rem2Cls(); +// class rem2fooCls implements rem2Int { } +// var rem2fooVar = rem2Mod.foo; + + + +// === goToDefinition === +// === /Remote2.ts === +// var rem2Var; +// function [|rem2Fn|]() { } +// class rem2Cls { } +// interface rem2Int{} +// module rem2Mod { export var foo; } + +// === /Definition.ts === +// rem2Var = 1; +// /*GOTO DEF*/rem2Fn(); +// var rem2foo = new rem2Cls(); +// class rem2fooCls implements rem2Int { } +// var rem2fooVar = rem2Mod.foo; + + + +// === goToDefinition === +// === /Remote2.ts === +// var rem2Var; +// function rem2Fn() { } +// class [|rem2Cls|] { } +// interface rem2Int{} +// module rem2Mod { export var foo; } + +// === /Definition.ts === +// rem2Var = 1; +// rem2Fn(); +// var rem2foo = new /*GOTO DEF*/rem2Cls(); +// class rem2fooCls implements rem2Int { } +// var rem2fooVar = rem2Mod.foo; + + + +// === goToDefinition === +// === /Remote2.ts === +// var rem2Var; +// function rem2Fn() { } +// class rem2Cls { } +// interface [|rem2Int|]{} +// module rem2Mod { export var foo; } + +// === /Definition.ts === +// rem2Var = 1; +// rem2Fn(); +// var rem2foo = new rem2Cls(); +// class rem2fooCls implements /*GOTO DEF*/rem2Int { } +// var rem2fooVar = rem2Mod.foo; + + + +// === goToDefinition === +// === /Remote2.ts === +// var rem2Var; +// function rem2Fn() { } +// class rem2Cls { } +// interface rem2Int{} +// module [|rem2Mod|] { export var foo; } + +// === /Definition.ts === +// rem2Var = 1; +// rem2Fn(); +// var rem2foo = new rem2Cls(); +// class rem2fooCls implements rem2Int { } +// var rem2fooVar = /*GOTO DEF*/rem2Mod.foo; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport1.baseline.jsonc new file mode 100644 index 0000000000..5398cf1c12 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport1.baseline.jsonc @@ -0,0 +1,13 @@ +// === goToDefinition === +// === /foo.ts === +// [|export function foo() { return "foo"; } +// import("./f/*GOTO DEF*/oo") +// var x = import("./foo")|] + + + +// === goToDefinition === +// === /foo.ts === +// [|export function foo() { return "foo"; } +// import("./foo") +// var x = import("./fo/*GOTO DEF*/o")|] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport2.baseline.jsonc new file mode 100644 index 0000000000..d6519e3300 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport2.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /foo.ts === +// export function [|bar|]() { return "bar"; } +// var x = import("./foo"); +// x.then(foo => { +// foo.b/*GOTO DEF*/ar(); +// }) \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport3.baseline.jsonc new file mode 100644 index 0000000000..80f46261ba --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport3.baseline.jsonc @@ -0,0 +1,4 @@ +// === goToDefinition === +// === /foo.ts === +// export function bar() { return "bar"; } +// import('./foo').then(({ [|ba/*GOTO DEF*/r|] }) => undefined); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport4.baseline.jsonc new file mode 100644 index 0000000000..80f46261ba --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionDynamicImport4.baseline.jsonc @@ -0,0 +1,4 @@ +// === goToDefinition === +// === /foo.ts === +// export function bar() { return "bar"; } +// import('./foo').then(({ [|ba/*GOTO DEF*/r|] }) => undefined); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExpandoClass1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExpandoClass1.baseline.jsonc new file mode 100644 index 0000000000..4932b11ced --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExpandoClass1.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /index.js === +// const Core = {} +// +// Core.[|Test|] = class { } +// +// Core.Test.prototype.foo = 10 +// +// new Core.Tes/*GOTO DEF*/t() \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExpandoClass2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExpandoClass2.baseline.jsonc new file mode 100644 index 0000000000..aea5b85d31 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExpandoClass2.baseline.jsonc @@ -0,0 +1,11 @@ +// === goToDefinition === +// === /index.js === +// const Core = {} +// +// Core.[|Test|] = class { +// [|constructor() { }|] +// } +// +// Core.Test.prototype.foo = 10 +// +// new Core.Tes/*GOTO DEF*/t() \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExpandoElementAccess.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExpandoElementAccess.baseline.jsonc new file mode 100644 index 0000000000..d4ecb56a09 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExpandoElementAccess.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinitionExpandoElementAccess.ts === +// function f() {} +// f[[|"x"|]] = 0; +// f[/*GOTO DEF*/[|"x"|]] = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc new file mode 100644 index 0000000000..90392f6142 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /a.ts === +// [|export class Foo {}|] + +// === /b.ts === +// import n = require('./a/*GOTO DEF*/'); +// var x = new n.Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc new file mode 100644 index 0000000000..4453ae5b73 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName2.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /a.ts === +// [|class Foo {} +// export var x = 0;|] + +// === /b.ts === +// import n = require('./a/*GOTO DEF*/'); +// var x = new n.Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName3.baseline.jsonc new file mode 100644 index 0000000000..28f4ba1fd3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName3.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /a.ts === +// declare module [|"e"|] { +// class Foo { } +// } + +// === /b.ts === +// import n = require('e/*GOTO DEF*/'); +// var x = new n.Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName4.baseline.jsonc new file mode 100644 index 0000000000..5b7bf8a1c6 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName4.baseline.jsonc @@ -0,0 +1,3 @@ +// === goToDefinition === +// === /b.ts === +// import n = require('unknown/*GOTO DEF*/'); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName5.baseline.jsonc new file mode 100644 index 0000000000..a9336821ec --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName5.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /a.ts === +// declare module [|"external/*GOTO DEF*/"|] { +// class Foo { } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName6.baseline.jsonc new file mode 100644 index 0000000000..236ff22c0f --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName6.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /a.ts === +// declare module [|"e"|] { +// class Foo { } +// } + +// === /b.ts === +// import * from 'e/*GOTO DEF*/'; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName7.baseline.jsonc new file mode 100644 index 0000000000..ebcad5e2ab --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName7.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /a.ts === +// declare module [|"e"|] { +// class Foo { } +// } + +// === /b.ts === +// import {Foo, Bar} from 'e/*GOTO DEF*/'; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName8.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName8.baseline.jsonc new file mode 100644 index 0000000000..8d0abed4ba --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName8.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /a.ts === +// declare module [|"e"|] { +// class Foo { } +// } + +// === /b.ts === +// export {Foo, Bar} from 'e/*GOTO DEF*/'; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName9.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName9.baseline.jsonc new file mode 100644 index 0000000000..bc11061813 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionExternalModuleName9.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /a.ts === +// declare module [|"e"|] { +// class Foo { } +// } + +// === /b.ts === +// export * from 'e/*GOTO DEF*/'; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionFunctionOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionFunctionOverloads.baseline.jsonc new file mode 100644 index 0000000000..d7038b1f61 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionFunctionOverloads.baseline.jsonc @@ -0,0 +1,45 @@ +// === goToDefinition === +// === /goToDefinitionFunctionOverloads.ts === +// function [|functionOverload|](value: number); +// function functionOverload(value: string); +// function functionOverload() {} +// +// /*GOTO DEF*/functionOverload(123); +// functionOverload("123"); +// functionOverload({}); + + + +// === goToDefinition === +// === /goToDefinitionFunctionOverloads.ts === +// function functionOverload(value: number); +// function [|functionOverload|](value: string); +// function functionOverload() {} +// +// functionOverload(123); +// /*GOTO DEF*/functionOverload("123"); +// functionOverload({}); + + + +// === goToDefinition === +// === /goToDefinitionFunctionOverloads.ts === +// function [|functionOverload|](value: number); +// function functionOverload(value: string); +// function functionOverload() {} +// +// functionOverload(123); +// functionOverload("123"); +// /*GOTO DEF*/functionOverload({}); + + + +// === goToDefinition === +// === /goToDefinitionFunctionOverloads.ts === +// function /*GOTO DEF*/[|functionOverload|](value: number); +// function [|functionOverload|](value: string); +// function [|functionOverload|]() {} +// +// functionOverload(123); +// functionOverload("123"); +// functionOverload({}); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionFunctionOverloadsInClass.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionFunctionOverloadsInClass.baseline.jsonc new file mode 100644 index 0000000000..1acfdd2dfc --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionFunctionOverloadsInClass.baseline.jsonc @@ -0,0 +1,25 @@ +// === goToDefinition === +// === /goToDefinitionFunctionOverloadsInClass.ts === +// class clsInOverload { +// static [|fnOverload|](); +// static /*GOTO DEF*/[|fnOverload|](foo: string); +// static [|fnOverload|](foo: any) { } +// public fnOverload(): any; +// public fnOverload(foo: string); +// public fnOverload(foo: any) { return "foo" } +// // --- (line: 8) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionFunctionOverloadsInClass.ts === +// class clsInOverload { +// static fnOverload(); +// static fnOverload(foo: string); +// static fnOverload(foo: any) { } +// public /*GOTO DEF*/[|fnOverload|](): any; +// public [|fnOverload|](foo: string); +// public [|fnOverload|](foo: any) { return "foo" } +// +// constructor() { } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionFunctionType.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionFunctionType.baseline.jsonc new file mode 100644 index 0000000000..cac8a22add --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionFunctionType.baseline.jsonc @@ -0,0 +1,35 @@ +// === goToDefinition === +// === /goToDefinitionFunctionType.ts === +// const [|c|]: () => void; +// /*GOTO DEF*/c(); +// function test(cb: () => void) { +// cb(); +// } +// // --- (line: 6) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionFunctionType.ts === +// const c: () => void; +// c(); +// function test([|cb|]: () => void) { +// /*GOTO DEF*/cb(); +// } +// class C { +// prop: () => void; +// // --- (line: 8) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionFunctionType.ts === +// --- (line: 3) skipped --- +// cb(); +// } +// class C { +// [|prop|]: () => void; +// m() { +// this./*GOTO DEF*/prop(); +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImplicitConstructor.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImplicitConstructor.baseline.jsonc new file mode 100644 index 0000000000..87e205beb0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImplicitConstructor.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinitionImplicitConstructor.ts === +// class [|ImplicitConstructor|] { +// } +// var implicitConstructor = new /*GOTO DEF*/ImplicitConstructor(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc new file mode 100644 index 0000000000..b9281b2a4d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport1.baseline.jsonc @@ -0,0 +1,6 @@ +// === goToDefinition === +// === /b.ts === +// [|export const foo = 1;|] + +// === /a.ts === +// import { foo } from "./b/*GOTO DEF*/"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport2.baseline.jsonc new file mode 100644 index 0000000000..458dd91a4e --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport2.baseline.jsonc @@ -0,0 +1,3 @@ +// === goToDefinition === +// === /a.ts === +// import { foo } from/*GOTO DEF*/ "./b"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport3.baseline.jsonc new file mode 100644 index 0000000000..c1b20b0557 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImport3.baseline.jsonc @@ -0,0 +1,3 @@ +// === goToDefinition === +// === /a.ts === +// import { foo } from /*GOTO DEF*/ "./b"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames.baseline.jsonc new file mode 100644 index 0000000000..5aa9446edb --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames.baseline.jsonc @@ -0,0 +1,13 @@ +// === goToDefinition === +// === /a.ts === +// export module Module { +// } +// export class [|Class|] { +// private f; +// } +// export interface Interface { +// x; +// } + +// === /b.ts === +// export {/*GOTO DEF*/Class} from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc new file mode 100644 index 0000000000..91440f77d1 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames10.baseline.jsonc @@ -0,0 +1,10 @@ +// === goToDefinition === +// === /a.js === +// class Class { +// f; +// } +// module.exports.[|Class|] = Class; + +// === /b.js === +// const { Class } = require("./a"); +// /*GOTO DEF*/Class; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc new file mode 100644 index 0000000000..7c4739fa58 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames11.baseline.jsonc @@ -0,0 +1,10 @@ +// === goToDefinition === +// === /a.js === +// class Class { +// f; +// } +// module.exports = { [|Class|] }; + +// === /b.js === +// const { Class } = require("./a"); +// /*GOTO DEF*/Class; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames2.baseline.jsonc new file mode 100644 index 0000000000..e78479c07d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames2.baseline.jsonc @@ -0,0 +1,13 @@ +// === goToDefinition === +// === /a.ts === +// export module Module { +// } +// export class [|Class|] { +// private f; +// } +// export interface Interface { +// x; +// } + +// === /b.ts === +// import {/*GOTO DEF*/Class} from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc new file mode 100644 index 0000000000..e203d7d28d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames3.baseline.jsonc @@ -0,0 +1,31 @@ +// === goToDefinition === +// === /a.ts === +// export module Module { +// } +// export class [|Class|] { +// private f; +// } +// export interface Interface { +// x; +// } + +// === /e.ts === +// import {M, C, I} from "./d"; +// var c = new /*GOTO DEF*/C(); + + + +// === goToDefinition === +// === /a.ts === +// export module Module { +// } +// export class [|Class|] { +// private f; +// } +// export interface Interface { +// x; +// } + +// === /e.ts === +// import {M, /*GOTO DEF*/C, I} from "./d"; +// var c = new C(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames4.baseline.jsonc new file mode 100644 index 0000000000..55509a2511 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames4.baseline.jsonc @@ -0,0 +1,13 @@ +// === goToDefinition === +// === /a.ts === +// export module Module { +// } +// export class [|Class|] { +// private f; +// } +// export interface Interface { +// x; +// } + +// === /b.ts === +// import {Class as /*GOTO DEF*/ClassAlias} from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames5.baseline.jsonc new file mode 100644 index 0000000000..0c0a65ec64 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames5.baseline.jsonc @@ -0,0 +1,13 @@ +// === goToDefinition === +// === /a.ts === +// export module Module { +// } +// export class [|Class|] { +// private f; +// } +// export interface Interface { +// x; +// } + +// === /b.ts === +// export {Class as /*GOTO DEF*/ClassAlias} from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames6.baseline.jsonc new file mode 100644 index 0000000000..af308bf7cf --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames6.baseline.jsonc @@ -0,0 +1,13 @@ +// === goToDefinition === +// === /a.ts === +// [|export module Module { +// } +// export class Class { +// private f; +// } +// export interface Interface { +// x; +// }|] + +// === /b.ts === +// import /*GOTO DEF*/alias = require("./a"); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames7.baseline.jsonc new file mode 100644 index 0000000000..204b6ef767 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames7.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /a.ts === +// class [|Class|] { +// private f; +// } +// export default Class; + +// === /b.ts === +// import /*GOTO DEF*/defaultExport from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames8.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames8.baseline.jsonc new file mode 100644 index 0000000000..438a28cd46 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames8.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /a.js === +// class [|Class|] { +// private f; +// } +// export { Class }; + +// === /b.js === +// import { /*GOTO DEF*/Class } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames9.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames9.baseline.jsonc new file mode 100644 index 0000000000..54c06f70e2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImportedNames9.baseline.jsonc @@ -0,0 +1,10 @@ +// === goToDefinition === +// === /a.js === +// class [|Class|] { +// f; +// } +// export { Class }; + +// === /b.js === +// const { Class } = require("./a"); +// /*GOTO DEF*/Class; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImports.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImports.baseline.jsonc new file mode 100644 index 0000000000..ca6cb45455 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionImports.baseline.jsonc @@ -0,0 +1,57 @@ +// === goToDefinition === +// === /a.ts === +// [|export default function f() {} +// export const x = 0;|] + +// === /b.ts === +// import f, { x } from "./a"; +// import * as a from "./a"; +// import b = require("./b"); +// f; +// x; +// /*GOTO DEF*/a; +// b; + + + +// === goToDefinition === +// === /a.ts === +// export default function [|f|]() {} +// export const x = 0; + +// === /b.ts === +// import f, { x } from "./a"; +// import * as a from "./a"; +// import b = require("./b"); +// /*GOTO DEF*/f; +// x; +// a; +// b; + + + +// === goToDefinition === +// === /a.ts === +// export default function f() {} +// export const [|x|] = 0; + +// === /b.ts === +// import f, { x } from "./a"; +// import * as a from "./a"; +// import b = require("./b"); +// f; +// /*GOTO DEF*/x; +// a; +// b; + + + +// === goToDefinition === +// === /b.ts === +// [|import f, { x } from "./a"; +// import * as a from "./a"; +// import b = require("./b"); +// f; +// x; +// a; +// /*GOTO DEF*/b;|] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInMemberDeclaration.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInMemberDeclaration.baseline.jsonc new file mode 100644 index 0000000000..9b92030eb2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInMemberDeclaration.baseline.jsonc @@ -0,0 +1,154 @@ +// === goToDefinition === +// === /goToDefinitionInMemberDeclaration.ts === +// interface [|IFoo|] { method1(): number; } +// +// class Foo implements IFoo { +// public method1(): number { return 0; } +// } +// +// enum Enum { value1, value2 }; +// +// class Bar { +// public _interface: IFo/*GOTO DEF*/o = new Foo(); +// public _class: Foo = new Foo(); +// public _list: IFoo[]=[]; +// public _enum: Enum = Enum.value1; +// // --- (line: 14) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionInMemberDeclaration.ts === +// interface [|IFoo|] { method1(): number; } +// +// class Foo implements IFoo { +// public method1(): number { return 0; } +// // --- (line: 5) skipped --- + +// --- (line: 8) skipped --- +// class Bar { +// public _interface: IFoo = new Foo(); +// public _class: Foo = new Foo(); +// public _list: IF/*GOTO DEF*/oo[]=[]; +// public _enum: Enum = Enum.value1; +// public _self: Bar; +// +// // --- (line: 16) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionInMemberDeclaration.ts === +// interface [|IFoo|] { method1(): number; } +// +// class Foo implements IFoo { +// public method1(): number { return 0; } +// // --- (line: 5) skipped --- + +// --- (line: 12) skipped --- +// public _enum: Enum = Enum.value1; +// public _self: Bar; +// +// constructor(public _inConstructor: IFo/*GOTO DEF*/o) { +// } +// } + + + +// === goToDefinition === +// === /goToDefinitionInMemberDeclaration.ts === +// interface IFoo { method1(): number; } +// +// class [|Foo|] implements IFoo { +// public method1(): number { return 0; } +// } +// +// enum Enum { value1, value2 }; +// +// class Bar { +// public _interface: IFoo = new Foo(); +// public _class: Fo/*GOTO DEF*/o = new Foo(); +// public _list: IFoo[]=[]; +// public _enum: Enum = Enum.value1; +// public _self: Bar; +// // --- (line: 15) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionInMemberDeclaration.ts === +// interface IFoo { method1(): number; } +// +// class [|Foo|] implements IFoo { +// public method1(): number { return 0; } +// } +// +// enum Enum { value1, value2 }; +// +// class Bar { +// public _interface: IFoo = new Fo/*GOTO DEF*/o(); +// public _class: Foo = new Foo(); +// public _list: IFoo[]=[]; +// public _enum: Enum = Enum.value1; +// // --- (line: 14) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionInMemberDeclaration.ts === +// --- (line: 3) skipped --- +// public method1(): number { return 0; } +// } +// +// enum [|Enum|] { value1, value2 }; +// +// class Bar { +// public _interface: IFoo = new Foo(); +// public _class: Foo = new Foo(); +// public _list: IFoo[]=[]; +// public _enum: E/*GOTO DEF*/num = Enum.value1; +// public _self: Bar; +// +// constructor(public _inConstructor: IFoo) { +// } +// } + + + +// === goToDefinition === +// === /goToDefinitionInMemberDeclaration.ts === +// --- (line: 3) skipped --- +// public method1(): number { return 0; } +// } +// +// enum [|Enum|] { value1, value2 }; +// +// class Bar { +// public _interface: IFoo = new Foo(); +// public _class: Foo = new Foo(); +// public _list: IFoo[]=[]; +// public _enum: Enum = En/*GOTO DEF*/um.value1; +// public _self: Bar; +// +// constructor(public _inConstructor: IFoo) { +// } +// } + + + +// === goToDefinition === +// === /goToDefinitionInMemberDeclaration.ts === +// --- (line: 5) skipped --- +// +// enum Enum { value1, value2 }; +// +// class [|Bar|] { +// public _interface: IFoo = new Foo(); +// public _class: Foo = new Foo(); +// public _list: IFoo[]=[]; +// public _enum: Enum = Enum.value1; +// public _self: Ba/*GOTO DEF*/r; +// +// constructor(public _inConstructor: IFoo) { +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInTypeArgument.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInTypeArgument.baseline.jsonc new file mode 100644 index 0000000000..db5eff1b7a --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInTypeArgument.baseline.jsonc @@ -0,0 +1,17 @@ +// === goToDefinition === +// === /goToDefinitionInTypeArgument.ts === +// class Foo { } +// +// class [|Bar|] { } +// +// var x = new Foo(); + + + +// === goToDefinition === +// === /goToDefinitionInTypeArgument.ts === +// class [|Foo|] { } +// +// class Bar { } +// +// var x = new Fo/*GOTO DEF*/o(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionIndexSignature.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionIndexSignature.baseline.jsonc new file mode 100644 index 0000000000..6bd0439d00 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionIndexSignature.baseline.jsonc @@ -0,0 +1,100 @@ +// === goToDefinition === +// === /goToDefinitionIndexSignature.ts === +// interface I { +// [|[x: string]: boolean;|] +// } +// interface J { +// [x: string]: number; +// } +// interface K { +// [x: `a${string}`]: string; +// [x: `${string}b`]: string; +// } +// declare const i: I; +// i./*GOTO DEF*/foo; +// declare const ij: I | J; +// ij.foo; +// declare const k: K; +// // --- (line: 16) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionIndexSignature.ts === +// interface I { +// [|[x: string]: boolean;|] +// } +// interface J { +// [|[x: string]: number;|] +// } +// interface K { +// [x: `a${string}`]: string; +// [x: `${string}b`]: string; +// } +// declare const i: I; +// i.foo; +// declare const ij: I | J; +// ij./*GOTO DEF*/foo; +// declare const k: K; +// k.a; +// k.b; +// k.ab; + + + +// === goToDefinition === +// === /goToDefinitionIndexSignature.ts === +// --- (line: 4) skipped --- +// [x: string]: number; +// } +// interface K { +// [|[x: `a${string}`]: string;|] +// [x: `${string}b`]: string; +// } +// declare const i: I; +// i.foo; +// declare const ij: I | J; +// ij.foo; +// declare const k: K; +// k./*GOTO DEF*/a; +// k.b; +// k.ab; + + + +// === goToDefinition === +// === /goToDefinitionIndexSignature.ts === +// --- (line: 5) skipped --- +// } +// interface K { +// [x: `a${string}`]: string; +// [|[x: `${string}b`]: string;|] +// } +// declare const i: I; +// i.foo; +// declare const ij: I | J; +// ij.foo; +// declare const k: K; +// k.a; +// k./*GOTO DEF*/b; +// k.ab; + + + +// === goToDefinition === +// === /goToDefinitionIndexSignature.ts === +// --- (line: 4) skipped --- +// [x: string]: number; +// } +// interface K { +// [|[x: `a${string}`]: string;|] +// [|[x: `${string}b`]: string;|] +// } +// declare const i: I; +// i.foo; +// declare const ij: I | J; +// ij.foo; +// declare const k: K; +// k.a; +// k.b; +// k./*GOTO DEF*/ab; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionIndexSignature2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionIndexSignature2.baseline.jsonc new file mode 100644 index 0000000000..7abd22b554 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionIndexSignature2.baseline.jsonc @@ -0,0 +1,4 @@ +// === goToDefinition === +// === /a.js === +// const o = {}; +// o./*GOTO DEF*/foo; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInstanceof1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInstanceof1.baseline.jsonc new file mode 100644 index 0000000000..1dfebe238c --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInstanceof1.baseline.jsonc @@ -0,0 +1,6 @@ +// === goToDefinition === +// === /goToDefinitionInstanceof1.ts === +// class [|C|] { +// } +// declare var obj: any; +// obj /*GOTO DEF*/instanceof C; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInstanceof2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInstanceof2.baseline.jsonc new file mode 100644 index 0000000000..899d642468 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInstanceof2.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /main.ts === +// class C { +// static [|[Symbol.hasInstance]|](value: unknown): boolean { return true; } +// } +// declare var obj: any; +// obj /*GOTO DEF*/instanceof C; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInterfaceAfterImplement.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInterfaceAfterImplement.baseline.jsonc new file mode 100644 index 0000000000..9e4567449e --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionInterfaceAfterImplement.baseline.jsonc @@ -0,0 +1,12 @@ +// === goToDefinition === +// === /goToDefinitionInterfaceAfterImplement.ts === +// interface [|sInt|] { +// sVar: number; +// sFn: () => void; +// } +// +// class iClass implements /*GOTO DEF*/sInt { +// public sVar = 1; +// public sFn() { +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag1.baseline.jsonc new file mode 100644 index 0000000000..6b0fb3966d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag1.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /a.js === +// /** +// * @import { A } from "./b/*GOTO DEF*/" +// */ \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag2.baseline.jsonc new file mode 100644 index 0000000000..70db19f1b2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag2.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /a.js === +// /** +// * @import { A } from/*GOTO DEF*/ "./b" +// */ \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag3.baseline.jsonc new file mode 100644 index 0000000000..443b3ca3d9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag3.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /a.js === +// /** +// * @import { A } from /*GOTO DEF*/ "./b"; +// */ \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag4.baseline.jsonc new file mode 100644 index 0000000000..ec17a66f3c --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag4.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /b.ts === +// export interface [|A|] { } + +// === /a.js === +// /** +// * @import { A/*GOTO DEF*/ } from "./b"; +// */ \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag5.baseline.jsonc new file mode 100644 index 0000000000..7e27cfb656 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsDocImportTag5.baseline.jsonc @@ -0,0 +1,13 @@ +// === goToDefinition === +// === /b.ts === +// export interface [|A|] { } + +// === /a.js === +// /** +// * @import { A } from "./b"; +// */ +// +// /** +// * @param { A/*GOTO DEF*/ } a +// */ +// function f(a) {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleExports.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleExports.baseline.jsonc new file mode 100644 index 0000000000..5ba2bcd18c --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleExports.baseline.jsonc @@ -0,0 +1,15 @@ +// === goToDefinition === +// === /foo.js === +// x.test = () => { } +// x./*GOTO DEF*/test(); +// x.test3 = function () { } +// x.test3(); + + + +// === goToDefinition === +// === /foo.js === +// x.test = () => { } +// x.test(); +// x.test3 = function () { } +// x./*GOTO DEF*/test3(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc new file mode 100644 index 0000000000..b8416519af --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleName.baseline.jsonc @@ -0,0 +1,6 @@ +// === goToDefinition === +// === /foo.js === +// [|module.exports = {};|] + +// === /bar.js === +// var x = require(/*GOTO DEF*/"./foo"); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc new file mode 100644 index 0000000000..7470cbd268 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsModuleNameAtImportName.baseline.jsonc @@ -0,0 +1,53 @@ +// === goToDefinition === +// === /foo.js === +// [|function notExported() { } +// class Blah { +// abc = 123; +// } +// module.exports.Blah = Blah;|] + +// === /bar.js === +// const /*GOTO DEF*/BlahModule = require("./foo.js"); +// new BlahModule.Blah() + + + +// === goToDefinition === +// === /foo.js === +// [|function notExported() { } +// class Blah { +// abc = 123; +// } +// module.exports.Blah = Blah;|] + +// === /bar.js === +// const BlahModule = require("./foo.js"); +// new /*GOTO DEF*/BlahModule.Blah() + + + +// === goToDefinition === +// === /foo.js === +// [|function notExported() { } +// class Blah { +// abc = 123; +// } +// module.exports.Blah = Blah;|] + +// === /barTs.ts === +// import /*GOTO DEF*/BlahModule = require("./foo.js"); +// new BlahModule.Blah() + + + +// === goToDefinition === +// === /foo.js === +// [|function notExported() { } +// class Blah { +// abc = 123; +// } +// module.exports.Blah = Blah;|] + +// === /barTs.ts === +// import BlahModule = require("./foo.js"); +// new /*GOTO DEF*/BlahModule.Blah() \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsxCall.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsxCall.baseline.jsonc new file mode 100644 index 0000000000..620243c5d1 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsxCall.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /test.tsx === +// interface FC

{ +// [|(props: P, context?: any): string;|] +// } +// +// const [|Thing|]: FC = (props) =>

; +// const HelloWorld = () => ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsxNotSet.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsxNotSet.baseline.jsonc new file mode 100644 index 0000000000..dd6576d397 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionJsxNotSet.baseline.jsonc @@ -0,0 +1,10 @@ +// === goToDefinition === +// === /foo.jsx === +// const [|Foo|] = () => ( +//
foo
+// ); +// export default Foo; + +// === /bar.jsx === +// import Foo from './foo'; +// const a = \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionLabels.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionLabels.baseline.jsonc new file mode 100644 index 0000000000..22488162e2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionLabels.baseline.jsonc @@ -0,0 +1,49 @@ +// === goToDefinition === +// === /goToDefinitionLabels.ts === +// [|label1|]: while (true) { +// label2: while (true) { +// break /*GOTO DEF*/label1; +// continue label2; +// () => { break label1; } +// continue unknownLabel; +// } +// } + + + +// === goToDefinition === +// === /goToDefinitionLabels.ts === +// label1: while (true) { +// [|label2|]: while (true) { +// break label1; +// continue /*GOTO DEF*/label2; +// () => { break label1; } +// continue unknownLabel; +// } +// } + + + +// === goToDefinition === +// === /goToDefinitionLabels.ts === +// [|label1|]: while (true) { +// label2: while (true) { +// break label1; +// continue label2; +// () => { break /*GOTO DEF*/label1; } +// continue unknownLabel; +// } +// } + + + +// === goToDefinition === +// === /goToDefinitionLabels.ts === +// label1: while (true) { +// label2: while (true) { +// break label1; +// continue label2; +// () => { break label1; } +// continue /*GOTO DEF*/unknownLabel; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMember.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMember.baseline.jsonc new file mode 100644 index 0000000000..73c5325d09 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMember.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /a.ts === +// class A { +// private [|z|]/*GOTO DEF*/: string; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMetaProperty.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMetaProperty.baseline.jsonc new file mode 100644 index 0000000000..a148da853a --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMetaProperty.baseline.jsonc @@ -0,0 +1,46 @@ +// === goToDefinition === +// === /a.ts === +// im/*GOTO DEF*/port.meta; +// function f() { new.target; } + + + +// === goToDefinition === +// === /a.ts === +// import.met/*GOTO DEF*/a; +// function f() { new.target; } + + + +// === goToDefinition === +// === /a.ts === +// import.meta; +// function f() { n/*GOTO DEF*/ew.target; } + + + +// === goToDefinition === +// === /a.ts === +// import.meta; +// function [|f|]() { new.t/*GOTO DEF*/arget; } + + + +// === goToDefinition === +// === /b.ts === +// im/*GOTO DEF*/port.m; +// class c { constructor() { new.target; } } + + + +// === goToDefinition === +// === /b.ts === +// import.m; +// class c { constructor() { n/*GOTO DEF*/ew.target; } } + + + +// === goToDefinition === +// === /b.ts === +// import.m; +// class [|c|] { constructor() { new.t/*GOTO DEF*/arget; } } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMethodOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMethodOverloads.baseline.jsonc new file mode 100644 index 0000000000..a7d816c66d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMethodOverloads.baseline.jsonc @@ -0,0 +1,106 @@ +// === goToDefinition === +// === /goToDefinitionMethodOverloads.ts === +// class MethodOverload { +// static [|method|](); +// static method(foo: string); +// static method(foo?: any) { } +// public method(): any; +// public method(foo: string); +// public method(foo?: any) { return "foo" } +// } +// // static method +// MethodOverload./*GOTO DEF*/method(); +// MethodOverload.method("123"); +// // instance method +// var methodOverload = new MethodOverload(); +// methodOverload.method(); +// methodOverload.method("456"); + + + +// === goToDefinition === +// === /goToDefinitionMethodOverloads.ts === +// class MethodOverload { +// static method(); +// static [|method|](foo: string); +// static method(foo?: any) { } +// public method(): any; +// public method(foo: string); +// public method(foo?: any) { return "foo" } +// } +// // static method +// MethodOverload.method(); +// MethodOverload./*GOTO DEF*/method("123"); +// // instance method +// var methodOverload = new MethodOverload(); +// methodOverload.method(); +// methodOverload.method("456"); + + + +// === goToDefinition === +// === /goToDefinitionMethodOverloads.ts === +// class MethodOverload { +// static method(); +// static method(foo: string); +// static method(foo?: any) { } +// public [|method|](): any; +// public method(foo: string); +// public method(foo?: any) { return "foo" } +// } +// // static method +// MethodOverload.method(); +// MethodOverload.method("123"); +// // instance method +// var methodOverload = new MethodOverload(); +// methodOverload./*GOTO DEF*/method(); +// methodOverload.method("456"); + + + +// === goToDefinition === +// === /goToDefinitionMethodOverloads.ts === +// class MethodOverload { +// static method(); +// static method(foo: string); +// static method(foo?: any) { } +// public method(): any; +// public [|method|](foo: string); +// public method(foo?: any) { return "foo" } +// } +// // static method +// MethodOverload.method(); +// MethodOverload.method("123"); +// // instance method +// var methodOverload = new MethodOverload(); +// methodOverload.method(); +// methodOverload./*GOTO DEF*/method("456"); + + + +// === goToDefinition === +// === /goToDefinitionMethodOverloads.ts === +// class MethodOverload { +// static /*GOTO DEF*/[|method|](); +// static [|method|](foo: string); +// static [|method|](foo?: any) { } +// public method(): any; +// public method(foo: string); +// public method(foo?: any) { return "foo" } +// // --- (line: 8) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionMethodOverloads.ts === +// class MethodOverload { +// static method(); +// static method(foo: string); +// static method(foo?: any) { } +// public /*GOTO DEF*/[|method|](): any; +// public [|method|](foo: string); +// public [|method|](foo?: any) { return "foo" } +// } +// // static method +// MethodOverload.method(); +// // --- (line: 11) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionModifiers.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionModifiers.baseline.jsonc new file mode 100644 index 0000000000..25bd1b90c5 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionModifiers.baseline.jsonc @@ -0,0 +1,199 @@ +// === goToDefinition === +// === /a.ts === +// /*GOTO DEF*/export class [|A|] { +// +// private z: string; +// +// // --- (line: 5) skipped --- + + + +// === goToDefinition === +// === /a.ts === +// export class [|A|]/*GOTO DEF*/ { +// +// private z: string; +// +// // --- (line: 5) skipped --- + + + +// === goToDefinition === +// === /a.ts === +// export class A { +// +// /*GOTO DEF*/private [|z|]: string; +// +// readonly x: string; +// +// // --- (line: 7) skipped --- + + + +// === goToDefinition === +// === /a.ts === +// export class A { +// +// private [|z|]/*GOTO DEF*/: string; +// +// readonly x: string; +// +// // --- (line: 7) skipped --- + + + +// === goToDefinition === +// === /a.ts === +// export class A { +// +// private z: string; +// +// /*GOTO DEF*/readonly [|x|]: string; +// +// async a() { } +// +// // --- (line: 9) skipped --- + + + +// === goToDefinition === +// === /a.ts === +// export class A { +// +// private z: string; +// +// readonly [|x|]/*GOTO DEF*/: string; +// +// async a() { } +// +// // --- (line: 9) skipped --- + + + +// === goToDefinition === +// === /a.ts === +// --- (line: 3) skipped --- +// +// readonly x: string; +// +// /*GOTO DEF*/async [|a|]() { } +// +// override b() {} +// +// // --- (line: 11) skipped --- + + + +// === goToDefinition === +// === /a.ts === +// --- (line: 3) skipped --- +// +// readonly x: string; +// +// async [|a|]/*GOTO DEF*/() { } +// +// override b() {} +// +// // --- (line: 11) skipped --- + + + +// === goToDefinition === +// === /a.ts === +// --- (line: 5) skipped --- +// +// async a() { } +// +// /*GOTO DEF*/override [|b|]() {} +// +// public async c() { } +// } +// +// export function foo() { } + + + +// === goToDefinition === +// === /a.ts === +// --- (line: 5) skipped --- +// +// async a() { } +// +// override [|b|]/*GOTO DEF*/() {} +// +// public async c() { } +// } +// +// export function foo() { } + + + +// === goToDefinition === +// === /a.ts === +// --- (line: 7) skipped --- +// +// override b() {} +// +// /*GOTO DEF*/public async [|c|]() { } +// } +// +// export function foo() { } + + + +// === goToDefinition === +// === /a.ts === +// --- (line: 7) skipped --- +// +// override b() {} +// +// public/*GOTO DEF*/ async [|c|]() { } +// } +// +// export function foo() { } + + + +// === goToDefinition === +// === /a.ts === +// --- (line: 7) skipped --- +// +// override b() {} +// +// public as/*GOTO DEF*/ync [|c|]() { } +// } +// +// export function foo() { } + + + +// === goToDefinition === +// === /a.ts === +// --- (line: 7) skipped --- +// +// override b() {} +// +// public async [|c|]/*GOTO DEF*/() { } +// } +// +// export function foo() { } + + + +// === goToDefinition === +// === /a.ts === +// --- (line: 10) skipped --- +// public async c() { } +// } +// +// exp/*GOTO DEF*/ort function [|foo|]() { } + + + +// === goToDefinition === +// === /a.ts === +// --- (line: 10) skipped --- +// public async c() { } +// } +// +// export function [|foo|]/*GOTO DEF*/() { } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMultipleDefinitions.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMultipleDefinitions.baseline.jsonc new file mode 100644 index 0000000000..34a3582173 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionMultipleDefinitions.baseline.jsonc @@ -0,0 +1,32 @@ +// === goToDefinition === +// === /a.ts === +// interface [|IFoo|] { +// instance1: number; +// } + +// === /b.ts === +// interface [|IFoo|] { +// instance2: number; +// } +// +// interface [|IFoo|] { +// instance3: number; +// } +// +// var ifoo: IFo/*GOTO DEF*/o; + + + +// === goToDefinition === +// === /c.ts === +// module [|Module|] { +// export class c1 { } +// } + +// === /d.ts === +// module [|Module|] { +// export class c2 { } +// } + +// === /e.ts === +// Modul/*GOTO DEF*/e; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionNewExpressionTargetNotClass.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionNewExpressionTargetNotClass.baseline.jsonc new file mode 100644 index 0000000000..c2fa7f79a0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionNewExpressionTargetNotClass.baseline.jsonc @@ -0,0 +1,23 @@ +// === goToDefinition === +// === /goToDefinitionNewExpressionTargetNotClass.ts === +// class C2 { +// } +// let [|I|]: { +// [|new(): C2;|] +// }; +// new /*GOTO DEF*/I(); +// let I2: { +// }; +// new I2(); + + + +// === goToDefinition === +// === /goToDefinitionNewExpressionTargetNotClass.ts === +// --- (line: 3) skipped --- +// new(): C2; +// }; +// new I(); +// let [|I2|]: { +// }; +// new /*GOTO DEF*/I2(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectBindingElementPropertyName01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectBindingElementPropertyName01.baseline.jsonc new file mode 100644 index 0000000000..653276103b --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectBindingElementPropertyName01.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /goToDefinitionObjectBindingElementPropertyName01.ts === +// interface I { +// [|property1|]: number; +// property2: string; +// } +// +// var foo: I; +// var { /*GOTO DEF*/property1: prop1 } = foo; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectLiteralProperties.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectLiteralProperties.baseline.jsonc new file mode 100644 index 0000000000..76242360fe --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectLiteralProperties.baseline.jsonc @@ -0,0 +1,87 @@ +// === goToDefinition === +// === /goToDefinitionObjectLiteralProperties.ts === +// var o = { +// [|value|]: 0, +// get getter() {return 0 }, +// set setter(v: number) { }, +// method: () => { }, +// es6StyleMethod() { } +// }; +// +// o./*GOTO DEF*/value; +// o.getter; +// o.setter; +// o.method; +// o.es6StyleMethod; + + + +// === goToDefinition === +// === /goToDefinitionObjectLiteralProperties.ts === +// var o = { +// value: 0, +// get [|getter|]() {return 0 }, +// set setter(v: number) { }, +// method: () => { }, +// es6StyleMethod() { } +// }; +// +// o.value; +// o./*GOTO DEF*/getter; +// o.setter; +// o.method; +// o.es6StyleMethod; + + + +// === goToDefinition === +// === /goToDefinitionObjectLiteralProperties.ts === +// var o = { +// value: 0, +// get getter() {return 0 }, +// set [|setter|](v: number) { }, +// method: () => { }, +// es6StyleMethod() { } +// }; +// +// o.value; +// o.getter; +// o./*GOTO DEF*/setter; +// o.method; +// o.es6StyleMethod; + + + +// === goToDefinition === +// === /goToDefinitionObjectLiteralProperties.ts === +// var o = { +// value: 0, +// get getter() {return 0 }, +// set setter(v: number) { }, +// [|method|]: () => { }, +// es6StyleMethod() { } +// }; +// +// o.value; +// o.getter; +// o.setter; +// o./*GOTO DEF*/method; +// o.es6StyleMethod; + + + +// === goToDefinition === +// === /goToDefinitionObjectLiteralProperties.ts === +// var o = { +// value: 0, +// get getter() {return 0 }, +// set setter(v: number) { }, +// method: () => { }, +// [|es6StyleMethod|]() { } +// }; +// +// o.value; +// o.getter; +// o.setter; +// o.method; +// o./*GOTO DEF*/es6StyleMethod; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectLiteralProperties1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectLiteralProperties1.baseline.jsonc new file mode 100644 index 0000000000..8ba14dc705 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectLiteralProperties1.baseline.jsonc @@ -0,0 +1,29 @@ +// === goToDefinition === +// === /goToDefinitionObjectLiteralProperties1.ts === +// interface PropsBag { +// [|propx|]: number +// } +// function foo(arg: PropsBag) {} +// foo({ +// pr/*GOTO DEF*/opx: 10 +// }) +// function bar(firstarg: boolean, secondarg: PropsBag) {} +// bar(true, { +// propx: 10 +// }) + + + +// === goToDefinition === +// === /goToDefinitionObjectLiteralProperties1.ts === +// interface PropsBag { +// [|propx|]: number +// } +// function foo(arg: PropsBag) {} +// foo({ +// propx: 10 +// }) +// function bar(firstarg: boolean, secondarg: PropsBag) {} +// bar(true, { +// pr/*GOTO DEF*/opx: 10 +// }) \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectSpread.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectSpread.baseline.jsonc new file mode 100644 index 0000000000..857f644752 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionObjectSpread.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /goToDefinitionObjectSpread.ts === +// interface A1 { [|a|]: number }; +// interface A2 { [|a|]?: number }; +// let a1: A1; +// let a2: A2; +// let a12 = { ...a1, ...a2 }; +// a12.a/*GOTO DEF*/; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverloadsInMultiplePropertyAccesses.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverloadsInMultiplePropertyAccesses.baseline.jsonc new file mode 100644 index 0000000000..3dcc2ebc4c --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverloadsInMultiplePropertyAccesses.baseline.jsonc @@ -0,0 +1,10 @@ +// === goToDefinition === +// === /goToDefinitionOverloadsInMultiplePropertyAccesses.ts === +// namespace A { +// export namespace B { +// export function f(value: number): void; +// export function [|f|](value: string): void; +// export function f(value: number | string) {} +// } +// } +// A.B./*GOTO DEF*/f(""); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember1.baseline.jsonc new file mode 100644 index 0000000000..72647592ce --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember1.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember1.ts === +// class Foo { +// [|p|] = ''; +// } +// class Bar extends Foo { +// /*GOTO DEF*/override p = ''; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember10.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember10.baseline.jsonc new file mode 100644 index 0000000000..8fec64e97d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember10.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /a.js === +// class Foo {} +// class Bar extends Foo { +// /** @override/*GOTO DEF*/ */ +// m() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember11.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember11.baseline.jsonc new file mode 100644 index 0000000000..b16604f027 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember11.baseline.jsonc @@ -0,0 +1,57 @@ +// === goToDefinition === +// === /a.js === +// class Foo { +// m() {} +// } +// class Bar extends Foo { +// /** @over/*GOTO DEF*/ride see {@link https://test.com} description */ +// m() {} +// } + + + +// === goToDefinition === +// === /a.js === +// class Foo { +// m() {} +// } +// class Bar extends Foo { +// /** @override se/*GOTO DEF*/e {@link https://test.com} description */ +// m() {} +// } + + + +// === goToDefinition === +// === /a.js === +// class Foo { +// m() {} +// } +// class Bar extends Foo { +// /** @override see {@li/*GOTO DEF*/nk https://test.com} description */ +// m() {} +// } + + + +// === goToDefinition === +// === /a.js === +// class Foo { +// m() {} +// } +// class Bar extends Foo { +// /** @override see {@link https://test.c/*GOTO DEF*/om} description */ +// m() {} +// } + + + +// === goToDefinition === +// === /a.js === +// class Foo { +// m() {} +// } +// class Bar extends Foo { +// /** @override see {@link https://test.com} /*GOTO DEF*/description */ +// m() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember12.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember12.baseline.jsonc new file mode 100644 index 0000000000..a806a546b8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember12.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember12.ts === +// class Foo { +// static [|p|] = ''; +// } +// class Bar extends Foo { +// static /*GOTO DEF*/override p = ''; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember13.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember13.baseline.jsonc new file mode 100644 index 0000000000..00b5080a20 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember13.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember13.ts === +// class Foo { +// static [|m|]() {} +// } +// class Bar extends Foo { +// static /*GOTO DEF*/override m() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember14.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember14.baseline.jsonc new file mode 100644 index 0000000000..6da0128300 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember14.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember14.ts === +// class A { +// [|m|]() {} +// } +// class B extends A {} +// class C extends B { +// /*GOTO DEF*/override m() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember15.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember15.baseline.jsonc new file mode 100644 index 0000000000..16cb84475b --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember15.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember15.ts === +// class A { +// static [|m|]() {} +// } +// class B extends A {} +// class C extends B { +// static /*GOTO DEF*/override m() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember16.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember16.baseline.jsonc new file mode 100644 index 0000000000..fe6efb5625 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember16.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /goToDefinitionOverrideJsdoc.ts === +// export class C extends CompletelyUndefined { +// /** +// * @override/*GOTO DEF*/ +// * @returns {{}} +// */ +// static foo() { +// // --- (line: 7) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember2.baseline.jsonc new file mode 100644 index 0000000000..a1a9669fcb --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember2.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember2.ts === +// class Foo { +// [|m|]() {} +// } +// +// class Bar extends Foo { +// /*GOTO DEF*/override m() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember3.baseline.jsonc new file mode 100644 index 0000000000..9d266605f6 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember3.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember3.ts === +// abstract class Foo { +// abstract [|m|]() {} +// } +// +// export class Bar extends Foo { +// /*GOTO DEF*/override m() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember4.baseline.jsonc new file mode 100644 index 0000000000..ec6a0eb35d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember4.baseline.jsonc @@ -0,0 +1,10 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember4.ts === +// class Foo { +// [|m|]() {} +// } +// function f () { +// return class extends Foo { +// /*GOTO DEF*/override m() {} +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember5.baseline.jsonc new file mode 100644 index 0000000000..ef37f15681 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember5.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember5.ts === +// class Foo extends (class { +// [|m|]() {} +// }) { +// /*GOTO DEF*/override m() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember6.baseline.jsonc new file mode 100644 index 0000000000..0d9e9f61de --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember6.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember6.ts === +// class Foo { +// m() {} +// } +// class Bar extends Foo { +// /*GOTO DEF*/override [|m1|]() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember7.baseline.jsonc new file mode 100644 index 0000000000..c3bd341438 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember7.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember7.ts === +// class Foo { +// /*GOTO DEF*/override [|m|]() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember8.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember8.baseline.jsonc new file mode 100644 index 0000000000..fc104d7433 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember8.baseline.jsonc @@ -0,0 +1,11 @@ +// === goToDefinition === +// === /a.ts === +// export class A { +// [|m|]() {} +// } + +// === /b.ts === +// import { A } from "./a"; +// class B extends A { +// /*GOTO DEF*/override m() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember9.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember9.baseline.jsonc new file mode 100644 index 0000000000..e38d294a25 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionOverriddenMember9.baseline.jsonc @@ -0,0 +1,11 @@ +// === goToDefinition === +// === /goToDefinitionOverriddenMember9.ts === +// interface I { +// m(): void; +// } +// class A { +// [|m|]() {}; +// } +// class B extends A implements I { +// /*GOTO DEF*/override m() {} +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPartialImplementation.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPartialImplementation.baseline.jsonc new file mode 100644 index 0000000000..97d4a0e865 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPartialImplementation.baseline.jsonc @@ -0,0 +1,16 @@ +// === goToDefinition === +// === /goToDefinitionPartialImplementation_1.ts === +// module A { +// export interface [|IA|] { +// y: string; +// } +// } + +// === /goToDefinitionPartialImplementation_2.ts === +// module A { +// export interface [|IA|] { +// x: number; +// } +// +// var x: /*GOTO DEF*/IA; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPrimitives.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPrimitives.baseline.jsonc new file mode 100644 index 0000000000..c9e7205125 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPrimitives.baseline.jsonc @@ -0,0 +1,3 @@ +// === goToDefinition === +// === /goToDefinitionPrimitives.ts === +// var x: st/*GOTO DEF*/ring; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPrivateName.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPrivateName.baseline.jsonc new file mode 100644 index 0000000000..99b8ad102d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPrivateName.baseline.jsonc @@ -0,0 +1,45 @@ +// === goToDefinition === +// === /goToDefinitionPrivateName.ts === +// class A { +// #method() { } +// [|#foo|] = 3; +// get #prop() { return ""; } +// set #prop(value: string) { } +// constructor() { +// this./*GOTO DEF*/#foo +// this.#method +// this.#prop +// } +// } + + + +// === goToDefinition === +// === /goToDefinitionPrivateName.ts === +// class A { +// [|#method|]() { } +// #foo = 3; +// get #prop() { return ""; } +// set #prop(value: string) { } +// constructor() { +// this.#foo +// this./*GOTO DEF*/#method +// this.#prop +// } +// } + + + +// === goToDefinition === +// === /goToDefinitionPrivateName.ts === +// class A { +// #method() { } +// #foo = 3; +// get [|#prop|]() { return ""; } +// set [|#prop|](value: string) { } +// constructor() { +// this.#foo +// this.#method +// this./*GOTO DEF*/#prop +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPropertyAssignment.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPropertyAssignment.baseline.jsonc new file mode 100644 index 0000000000..0c8d5616e6 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionPropertyAssignment.baseline.jsonc @@ -0,0 +1,19 @@ +// === goToDefinition === +// === /goToDefinitionPropertyAssignment.ts === +// export const [|Component|] = () => { return "OK"} +// Component.displayName = 'Component' +// +// /*GOTO DEF*/Component +// +// Component.displayName + + + +// === goToDefinition === +// === /goToDefinitionPropertyAssignment.ts === +// export const Component = () => { return "OK"} +// Component.[|displayName|] = 'Component' +// +// Component +// +// Component./*GOTO DEF*/displayName \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionRest.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionRest.baseline.jsonc new file mode 100644 index 0000000000..e8fa4c572d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionRest.baseline.jsonc @@ -0,0 +1,10 @@ +// === goToDefinition === +// === /goToDefinitionRest.ts === +// interface Gen { +// x: number; +// [|parent|]: Gen; +// millenial: string; +// } +// let t: Gen; +// var { x, ...rest } = t; +// rest./*GOTO DEF*/parent; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn1.baseline.jsonc new file mode 100644 index 0000000000..de684a61f8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn1.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinitionReturn1.ts === +// function [|foo|]() { +// /*GOTO DEF*/return 10; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn2.baseline.jsonc new file mode 100644 index 0000000000..59497ae398 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn2.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /goToDefinitionReturn2.ts === +// function foo() { +// return [|() => { +// /*GOTO DEF*/return 10; +// }|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn3.baseline.jsonc new file mode 100644 index 0000000000..f649b2d0f8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn3.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /goToDefinitionReturn3.ts === +// class C { +// [|m|]() { +// /*GOTO DEF*/return 1; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn4.baseline.jsonc new file mode 100644 index 0000000000..e5ee60d43a --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn4.baseline.jsonc @@ -0,0 +1,3 @@ +// === goToDefinition === +// === /goToDefinitionReturn4.ts === +// /*GOTO DEF*/return; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn5.baseline.jsonc new file mode 100644 index 0000000000..e723352c1c --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn5.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /goToDefinitionReturn5.ts === +// function [|foo|]() { +// class Foo { +// static { /*GOTO DEF*/return; } +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn6.baseline.jsonc new file mode 100644 index 0000000000..720c4bfc46 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn6.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /goToDefinitionReturn6.ts === +// function foo() { +// return [|function () { +// /*GOTO DEF*/return 10; +// }|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn7.baseline.jsonc new file mode 100644 index 0000000000..b2f225744e --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionReturn7.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /goToDefinitionReturn7.ts === +// function foo(a: string, b: string): string; +// function foo(a: number, b: number): number; +// function [|foo|](a: any, b: any): any { +// /*GOTO DEF*/return a + b; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSameFile.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSameFile.baseline.jsonc new file mode 100644 index 0000000000..24fdd9a524 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSameFile.baseline.jsonc @@ -0,0 +1,82 @@ +// === goToDefinition === +// === /goToDefinitionSameFile.ts === +// var [|localVariable|]; +// function localFunction() { } +// class localClass { } +// interface localInterface{ } +// module localModule{ export var foo = 1;} +// +// +// /*GOTO DEF*/localVariable = 1; +// localFunction(); +// var foo = new localClass(); +// class fooCls implements localInterface { } +// var fooVar = localModule.foo; + + + +// === goToDefinition === +// === /goToDefinitionSameFile.ts === +// var localVariable; +// function [|localFunction|]() { } +// class localClass { } +// interface localInterface{ } +// module localModule{ export var foo = 1;} +// +// +// localVariable = 1; +// /*GOTO DEF*/localFunction(); +// var foo = new localClass(); +// class fooCls implements localInterface { } +// var fooVar = localModule.foo; + + + +// === goToDefinition === +// === /goToDefinitionSameFile.ts === +// var localVariable; +// function localFunction() { } +// class [|localClass|] { } +// interface localInterface{ } +// module localModule{ export var foo = 1;} +// +// +// localVariable = 1; +// localFunction(); +// var foo = new /*GOTO DEF*/localClass(); +// class fooCls implements localInterface { } +// var fooVar = localModule.foo; + + + +// === goToDefinition === +// === /goToDefinitionSameFile.ts === +// var localVariable; +// function localFunction() { } +// class localClass { } +// interface [|localInterface|]{ } +// module localModule{ export var foo = 1;} +// +// +// localVariable = 1; +// localFunction(); +// var foo = new localClass(); +// class fooCls implements /*GOTO DEF*/localInterface { } +// var fooVar = localModule.foo; + + + +// === goToDefinition === +// === /goToDefinitionSameFile.ts === +// var localVariable; +// function localFunction() { } +// class localClass { } +// interface localInterface{ } +// module [|localModule|]{ export var foo = 1;} +// +// +// localVariable = 1; +// localFunction(); +// var foo = new localClass(); +// class fooCls implements localInterface { } +// var fooVar = /*GOTO DEF*/localModule.foo; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSatisfiesExpression1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSatisfiesExpression1.baseline.jsonc new file mode 100644 index 0000000000..fbdd60c876 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSatisfiesExpression1.baseline.jsonc @@ -0,0 +1,19 @@ +// === goToDefinition === +// === /goToDefinitionSatisfiesExpression1.ts === +// const STRINGS = { +// /*GOTO DEF*/[|title|]: 'A Title', +// } satisfies Record; +// +// //somewhere in app +// STRINGS.title + + + +// === goToDefinition === +// === /goToDefinitionSatisfiesExpression1.ts === +// const STRINGS = { +// [|title|]: 'A Title', +// } satisfies Record; +// +// //somewhere in app +// STRINGS./*GOTO DEF*/title \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionScriptImport.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionScriptImport.baseline.jsonc new file mode 100644 index 0000000000..c6c62dfd70 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionScriptImport.baseline.jsonc @@ -0,0 +1,11 @@ +// === goToDefinition === +// === /moduleThing.ts === +// import /*GOTO DEF*/"./scriptThing"; +// import "./stylez.css"; + + + +// === goToDefinition === +// === /moduleThing.ts === +// import "./scriptThing"; +// import /*GOTO DEF*/"./stylez.css"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc new file mode 100644 index 0000000000..75f8f2bfe2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionScriptImportServer.baseline.jsonc @@ -0,0 +1,21 @@ +// === goToDefinition === +// === /home/src/workspaces/project/moduleThing.ts === +// import /*GOTO DEF*/"./scriptThing"; +// import "./stylez.css"; +// import "./foo.txt"; + + + +// === goToDefinition === +// === /home/src/workspaces/project/moduleThing.ts === +// import "./scriptThing"; +// import /*GOTO DEF*/"./stylez.css"; +// import "./foo.txt"; + + + +// === goToDefinition === +// === /home/src/workspaces/project/moduleThing.ts === +// import "./scriptThing"; +// import "./stylez.css"; +// import /*GOTO DEF*/"./foo.txt"; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShadowVariable.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShadowVariable.baseline.jsonc new file mode 100644 index 0000000000..62aa457a72 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShadowVariable.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /goToDefinitionShadowVariable.ts === +// var shadowVariable = "foo"; +// function shadowVariableTestModule() { +// var [|shadowVariable|]; +// /*GOTO DEF*/shadowVariable = 1; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShadowVariableInsideModule.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShadowVariableInsideModule.baseline.jsonc new file mode 100644 index 0000000000..a933353fbd --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShadowVariableInsideModule.baseline.jsonc @@ -0,0 +1,6 @@ +// === goToDefinition === +// === /goToDefinitionShadowVariableInsideModule.ts === +// module shdModule { +// var [|shdVar|]; +// /*GOTO DEF*/shdVar = 1; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty01.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty01.baseline.jsonc new file mode 100644 index 0000000000..b447aab88a --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty01.baseline.jsonc @@ -0,0 +1,41 @@ +// === goToDefinition === +// === /goToDefinitionShorthandProperty01.ts === +// var name = "hello"; +// var id = 100000; +// declare var id; +// var obj = {/*GOTO DEF*/name, id}; +// obj.name; +// obj.id; + + + +// === goToDefinition === +// === /goToDefinitionShorthandProperty01.ts === +// var name = "hello"; +// var [|id|] = 100000; +// declare var [|id|]; +// var obj = {name, /*GOTO DEF*/id}; +// obj.name; +// obj.id; + + + +// === goToDefinition === +// === /goToDefinitionShorthandProperty01.ts === +// var name = "hello"; +// var id = 100000; +// declare var id; +// var obj = {[|name|], id}; +// obj./*GOTO DEF*/name; +// obj.id; + + + +// === goToDefinition === +// === /goToDefinitionShorthandProperty01.ts === +// var name = "hello"; +// var id = 100000; +// declare var id; +// var obj = {name, [|id|]}; +// obj.name; +// obj./*GOTO DEF*/id; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty02.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty02.baseline.jsonc new file mode 100644 index 0000000000..94d0466cf1 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty02.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinitionShorthandProperty02.ts === +// let x = { +// f/*GOTO DEF*/oo +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty03.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty03.baseline.jsonc new file mode 100644 index 0000000000..f10cb67cde --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty03.baseline.jsonc @@ -0,0 +1,19 @@ +// === goToDefinition === +// === /goToDefinitionShorthandProperty03.ts === +// var [|x|] = { +// /*GOTO DEF*/x +// } +// let y = { +// y +// } + + + +// === goToDefinition === +// === /goToDefinitionShorthandProperty03.ts === +// var x = { +// x +// } +// let [|y|] = { +// /*GOTO DEF*/y +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty04.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty04.baseline.jsonc new file mode 100644 index 0000000000..6e7f8d7b70 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty04.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /goToDefinitionShorthandProperty04.ts === +// interface Foo { +// foo(): void +// } +// +// let x: Foo = { +// f/*GOTO DEF*/oo +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty05.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty05.baseline.jsonc new file mode 100644 index 0000000000..414558d93d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty05.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /goToDefinitionShorthandProperty05.ts === +// interface Foo { +// foo(): void +// } +// const [|foo|] = 1; +// let x: Foo = { +// f/*GOTO DEF*/oo +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty06.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty06.baseline.jsonc new file mode 100644 index 0000000000..ce825635ce --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionShorthandProperty06.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /goToDefinitionShorthandProperty06.ts === +// interface Foo { +// [|foo|](): void +// } +// const foo = 1; +// let x: Foo = { +// f/*GOTO DEF*/oo() +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSignatureAlias_require.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSignatureAlias_require.baseline.jsonc new file mode 100644 index 0000000000..9af12dce90 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSignatureAlias_require.baseline.jsonc @@ -0,0 +1,17 @@ +// === goToDefinition === +// === /a.js === +// [|module.exports = function [|f|]() {}|] + +// === /b.js === +// const f = require("./a"); +// /*GOTO DEF*/f(); + + + +// === goToDefinition === +// === /a.js === +// [|module.exports = function [|f|]() {}|] + +// === /bar.ts === +// import f = require("./a"); +// /*GOTO DEF*/f(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc new file mode 100644 index 0000000000..78b467b720 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSimple.baseline.jsonc @@ -0,0 +1,17 @@ +// === goToDefinition === +// === /Definition.ts === +// class [|c|] { } + +// === /Consumption.ts === +// var n = new /*GOTO DEF*/c(); +// var n = new c(); + + + +// === goToDefinition === +// === /Definition.ts === +// class [|c|] { } + +// === /Consumption.ts === +// var n = new c(); +// var n = new c/*GOTO DEF*/(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc new file mode 100644 index 0000000000..1e47e146ff --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSourceUnit.baseline.jsonc @@ -0,0 +1,22 @@ +// === goToDefinition === +// === /a.ts === +// //MyFile Comments +// //more comments +// /// +// /// +// +// class clsInOverload { +// // --- (line: 7) skipped --- + + + +// === goToDefinition === +// === /a.ts === +// //MyFile Comments +// //more comments +// /// +// /// +// +// class clsInOverload { +// static fnOverload(); +// // --- (line: 8) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase1.baseline.jsonc new file mode 100644 index 0000000000..4630cbcf4b --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase1.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinitionSwitchCase1.ts === +// [|switch|] (null ) { +// /*GOTO DEF*/case null: break; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase2.baseline.jsonc new file mode 100644 index 0000000000..1f3a81ed6d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase2.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinitionSwitchCase2.ts === +// [|switch|] (null) { +// /*GOTO DEF*/default: break; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase3.baseline.jsonc new file mode 100644 index 0000000000..ddce8aad17 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase3.baseline.jsonc @@ -0,0 +1,21 @@ +// === goToDefinition === +// === /goToDefinitionSwitchCase3.ts === +// [|switch|] (null) { +// /*GOTO DEF*/default: { +// switch (null) { +// default: break; +// } +// }; +// } + + + +// === goToDefinition === +// === /goToDefinitionSwitchCase3.ts === +// switch (null) { +// default: { +// [|switch|] (null) { +// /*GOTO DEF*/default: break; +// } +// }; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc new file mode 100644 index 0000000000..13d2189c7e --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase4.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /goToDefinitionSwitchCase4.ts === +// switch (null) { +// case null: break; +// } +// +// [|switch|] (null) { +// /*GOTO DEF*/case null: break; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase5.baseline.jsonc new file mode 100644 index 0000000000..656f1d3f24 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase5.baseline.jsonc @@ -0,0 +1,3 @@ +// === goToDefinition === +// === /goToDefinitionSwitchCase5.ts === +// export /*GOTO DEF*/default {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase6.baseline.jsonc new file mode 100644 index 0000000000..16a732aeff --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase6.baseline.jsonc @@ -0,0 +1,21 @@ +// === goToDefinition === +// === /goToDefinitionSwitchCase6.ts === +// export default { /*GOTO DEF*/[|case|] }; +// default; +// case 42; + + + +// === goToDefinition === +// === /goToDefinitionSwitchCase6.ts === +// export default { case }; +// /*GOTO DEF*/default; +// case 42; + + + +// === goToDefinition === +// === /goToDefinitionSwitchCase6.ts === +// export default { case }; +// default; +// /*GOTO DEF*/case 42; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase7.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase7.baseline.jsonc new file mode 100644 index 0000000000..14f21d4768 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionSwitchCase7.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinitionSwitchCase7.ts === +// switch (null) { +// case null: +// export /*GOTO DEF*/default 123; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTaggedTemplateOverloads.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTaggedTemplateOverloads.baseline.jsonc new file mode 100644 index 0000000000..ef6f61eb8e --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTaggedTemplateOverloads.baseline.jsonc @@ -0,0 +1,19 @@ +// === goToDefinition === +// === /goToDefinitionTaggedTemplateOverloads.ts === +// function [|f|](strs: TemplateStringsArray, x: number): void; +// function f(strs: TemplateStringsArray, x: boolean): void; +// function f(strs: TemplateStringsArray, x: number | boolean) {} +// +// /*GOTO DEF*/f`${0}`; +// f`${false}`; + + + +// === goToDefinition === +// === /goToDefinitionTaggedTemplateOverloads.ts === +// function f(strs: TemplateStringsArray, x: number): void; +// function [|f|](strs: TemplateStringsArray, x: boolean): void; +// function f(strs: TemplateStringsArray, x: number | boolean) {} +// +// f`${0}`; +// /*GOTO DEF*/f`${false}`; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionThis.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionThis.baseline.jsonc new file mode 100644 index 0000000000..0b3dc0c246 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionThis.baseline.jsonc @@ -0,0 +1,33 @@ +// === goToDefinition === +// === /goToDefinitionThis.ts === +// function f([|this|]: number) { +// return /*GOTO DEF*/this; +// } +// class C { +// constructor() { return this; } +// get self(this: number) { return this; } +// } + + + +// === goToDefinition === +// === /goToDefinitionThis.ts === +// function f(this: number) { +// return this; +// } +// class [|C|] { +// constructor() { return /*GOTO DEF*/this; } +// get self(this: number) { return this; } +// } + + + +// === goToDefinition === +// === /goToDefinitionThis.ts === +// function f(this: number) { +// return this; +// } +// class C { +// constructor() { return this; } +// get self([|this|]: number) { return /*GOTO DEF*/this; } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeOnlyImport.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeOnlyImport.baseline.jsonc new file mode 100644 index 0000000000..f6994cecfe --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeOnlyImport.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /a.ts === +// enum [|SyntaxKind|] { SourceFile } +// export type { SyntaxKind } + +// === /c.ts === +// import type { SyntaxKind } from './b'; +// let kind: /*GOTO DEF*/SyntaxKind; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypePredicate.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypePredicate.baseline.jsonc new file mode 100644 index 0000000000..790a5121c9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypePredicate.baseline.jsonc @@ -0,0 +1,15 @@ +// === goToDefinition === +// === /goToDefinitionTypePredicate.ts === +// class A {} +// function f([|parameter|]: any): /*GOTO DEF*/parameter is A { +// return typeof parameter === "string"; +// } + + + +// === goToDefinition === +// === /goToDefinitionTypePredicate.ts === +// class [|A|] {} +// function f(parameter: any): parameter is /*GOTO DEF*/A { +// return typeof parameter === "string"; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc new file mode 100644 index 0000000000..92c108f58a --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeReferenceDirective.baseline.jsonc @@ -0,0 +1,4 @@ +// === goToDefinition === +// === /src/app.ts === +// /// +// $.x; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeofThis.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeofThis.baseline.jsonc new file mode 100644 index 0000000000..d27141f9f7 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionTypeofThis.baseline.jsonc @@ -0,0 +1,33 @@ +// === goToDefinition === +// === /goToDefinitionTypeofThis.ts === +// function f([|this|]: number) { +// type X = typeof /*GOTO DEF*/this; +// } +// class C { +// constructor() { type X = typeof this; } +// get self(this: number) { type X = typeof this; } +// } + + + +// === goToDefinition === +// === /goToDefinitionTypeofThis.ts === +// function f(this: number) { +// type X = typeof this; +// } +// class [|C|] { +// constructor() { type X = typeof /*GOTO DEF*/this; } +// get self(this: number) { type X = typeof this; } +// } + + + +// === goToDefinition === +// === /goToDefinitionTypeofThis.ts === +// function f(this: number) { +// type X = typeof this; +// } +// class C { +// constructor() { type X = typeof this; } +// get self([|this|]: number) { type X = typeof /*GOTO DEF*/this; } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUndefinedSymbols.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUndefinedSymbols.baseline.jsonc new file mode 100644 index 0000000000..2a5b1bb336 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUndefinedSymbols.baseline.jsonc @@ -0,0 +1,33 @@ +// === goToDefinition === +// === /goToDefinitionUndefinedSymbols.ts === +// some/*GOTO DEF*/Variable; +// var a: someType; +// var x = {}; x.someProperty; +// var a: any; a.someProperty; + + + +// === goToDefinition === +// === /goToDefinitionUndefinedSymbols.ts === +// someVariable; +// var a: some/*GOTO DEF*/Type; +// var x = {}; x.someProperty; +// var a: any; a.someProperty; + + + +// === goToDefinition === +// === /goToDefinitionUndefinedSymbols.ts === +// someVariable; +// var a: someType; +// var x = {}; x.some/*GOTO DEF*/Property; +// var a: any; a.someProperty; + + + +// === goToDefinition === +// === /goToDefinitionUndefinedSymbols.ts === +// someVariable; +// var a: someType; +// var x = {}; x.someProperty; +// var a: any; a.some/*GOTO DEF*/Property; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty1.baseline.jsonc new file mode 100644 index 0000000000..c1dcb0b04e --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty1.baseline.jsonc @@ -0,0 +1,16 @@ +// === goToDefinition === +// === /goToDefinitionUnionTypeProperty1.ts === +// interface One { +// [|commonProperty|]: number; +// commonFunction(): number; +// } +// +// interface Two { +// [|commonProperty|]: string +// commonFunction(): number; +// } +// +// var x : One | Two; +// +// x./*GOTO DEF*/commonProperty; +// x.commonFunction; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty2.baseline.jsonc new file mode 100644 index 0000000000..6dae48030b --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty2.baseline.jsonc @@ -0,0 +1,18 @@ +// === goToDefinition === +// === /goToDefinitionUnionTypeProperty2.ts === +// interface HasAOrB { +// [|a|]: string; +// b: string; +// } +// +// interface One { +// common: { [|a|] : number; }; +// } +// +// interface Two { +// common: HasAOrB; +// } +// +// var x : One | Two; +// +// x.common./*GOTO DEF*/a; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty3.baseline.jsonc new file mode 100644 index 0000000000..0788a8117d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty3.baseline.jsonc @@ -0,0 +1,10 @@ +// === goToDefinition === +// === /goToDefinitionUnionTypeProperty3.ts === +// interface Array { +// [|specialPop|](): T +// } +// +// var strings: string[]; +// var numbers: number[]; +// +// var x = (strings || numbers)./*GOTO DEF*/specialPop() \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty4.baseline.jsonc new file mode 100644 index 0000000000..0df12e9990 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty4.baseline.jsonc @@ -0,0 +1,19 @@ +// === goToDefinition === +// === /goToDefinitionUnionTypeProperty4.ts === +// interface SnapCrackle { +// [|pop|](): string; +// } +// +// interface Magnitude { +// [|pop|](): number; +// } +// +// interface Art { +// [|pop|](): boolean; +// } +// +// var art: Art; +// var magnitude: Magnitude; +// var snapcrackle: SnapCrackle; +// +// var x = (snapcrackle || magnitude || art)./*GOTO DEF*/pop; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty_discriminated.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty_discriminated.baseline.jsonc new file mode 100644 index 0000000000..b3498dbaa3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionUnionTypeProperty_discriminated.baseline.jsonc @@ -0,0 +1,95 @@ +// === goToDefinition === +// === /goToDefinitionUnionTypeProperty_discriminated.ts === +// type U = A | B; +// +// interface A { +// [|kind|]: "a"; +// prop: number; +// }; +// +// interface B { +// kind: "b"; +// prop: string; +// } +// +// const u: U = { +// /*GOTO DEF*/kind: "a", +// prop: 0, +// }; +// const u2: U = { +// // --- (line: 18) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionUnionTypeProperty_discriminated.ts === +// type U = A | B; +// +// interface A { +// kind: "a"; +// [|prop|]: number; +// }; +// +// interface B { +// kind: "b"; +// prop: string; +// } +// +// const u: U = { +// kind: "a", +// /*GOTO DEF*/prop: 0, +// }; +// const u2: U = { +// kind: "bogus", +// prop: 0, +// }; + + + +// === goToDefinition === +// === /goToDefinitionUnionTypeProperty_discriminated.ts === +// type U = A | B; +// +// interface A { +// [|kind|]: "a"; +// prop: number; +// }; +// +// interface B { +// [|kind|]: "b"; +// prop: string; +// } +// +// const u: U = { +// kind: "a", +// prop: 0, +// }; +// const u2: U = { +// /*GOTO DEF*/kind: "bogus", +// prop: 0, +// }; + + + +// === goToDefinition === +// === /goToDefinitionUnionTypeProperty_discriminated.ts === +// type U = A | B; +// +// interface A { +// kind: "a"; +// [|prop|]: number; +// }; +// +// interface B { +// kind: "b"; +// [|prop|]: string; +// } +// +// const u: U = { +// kind: "a", +// prop: 0, +// }; +// const u2: U = { +// kind: "bogus", +// /*GOTO DEF*/prop: 0, +// }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment.baseline.jsonc new file mode 100644 index 0000000000..234342516d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment.baseline.jsonc @@ -0,0 +1,6 @@ +// === goToDefinition === +// === /foo.js === +// const Bar; +// const [|Foo|] = [|Bar|] = function () {} +// Foo.prototype.bar = function() {} +// new Foo/*GOTO DEF*/(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment1.baseline.jsonc new file mode 100644 index 0000000000..30aca9d564 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment1.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /foo.js === +// const [|Foo|] = module.[|exports|] = function () {} +// Foo.prototype.bar = function() {} +// new Foo/*GOTO DEF*/(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment2.baseline.jsonc new file mode 100644 index 0000000000..8e94c0fc30 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment2.baseline.jsonc @@ -0,0 +1,6 @@ +// === goToDefinition === +// === /foo.ts === +// const Bar; +// const [|Foo|] = [|Bar|] = function () {} +// Foo.prototype.bar = function() {} +// new Foo/*GOTO DEF*/(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment3.baseline.jsonc new file mode 100644 index 0000000000..d826f639e3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionVariableAssignment3.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /foo.ts === +// const [|Foo|] = module.[|exports|] = function () {} +// Foo.prototype.bar = function() {} +// new Foo/*GOTO DEF*/(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield1.baseline.jsonc new file mode 100644 index 0000000000..04d7ab9643 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield1.baseline.jsonc @@ -0,0 +1,21 @@ +// === goToDefinition === +// === /goToDefinitionYield1.ts === +// function* [|gen|]() { +// /*GOTO DEF*/yield 0; +// } +// +// const genFunction = function*() { +// yield 0; +// } + + + +// === goToDefinition === +// === /goToDefinitionYield1.ts === +// function* gen() { +// yield 0; +// } +// +// const [|genFunction|] = function*() { +// /*GOTO DEF*/yield 0; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield2.baseline.jsonc new file mode 100644 index 0000000000..c9318f80db --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield2.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /goToDefinitionYield2.ts === +// function* outerGen() { +// function* [|gen|]() { +// /*GOTO DEF*/yield 0; +// } +// return gen +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield3.baseline.jsonc new file mode 100644 index 0000000000..ddfd04564f --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield3.baseline.jsonc @@ -0,0 +1,23 @@ +// === goToDefinition === +// === /goToDefinitionYield3.ts === +// class C { +// [|notAGenerator|]() { +// /*GOTO DEF*/yield 0; +// } +// +// foo*() { +// // --- (line: 7) skipped --- + + + +// === goToDefinition === +// === /goToDefinitionYield3.ts === +// class C { +// notAGenerator() { +// yield 0; +// } +// +// foo*[||]() { +// /*GOTO DEF*/yield 0; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield4.baseline.jsonc new file mode 100644 index 0000000000..a3f9d8721b --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinitionYield4.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinitionYield4.ts === +// function* gen() { +// class C { [|[/*GOTO DEF*/yield 10]|]() {} } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_filteringGenericMappedType.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_filteringGenericMappedType.baseline.jsonc new file mode 100644 index 0000000000..6b8bf67ca8 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_filteringGenericMappedType.baseline.jsonc @@ -0,0 +1,14 @@ +// === goToDefinition === +// === /goToDefinition_filteringGenericMappedType.ts === +// const obj = { +// get [|id|]() { +// return 1; +// }, +// name: "test", +// // --- (line: 6) skipped --- + +// --- (line: 17) skipped --- +// name: true, +// }); +// +// obj2./*GOTO DEF*/id; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_filteringMappedType.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_filteringMappedType.baseline.jsonc new file mode 100644 index 0000000000..fe4215ee81 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_filteringMappedType.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinition_filteringMappedType.ts === +// const obj = { [|a|]: 1, b: 2 }; +// const filtered: { [P in keyof typeof obj as P extends 'b' ? never : P]: 0; } = { a: 0 }; +// filtered./*GOTO DEF*/a; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_mappedType.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_mappedType.baseline.jsonc new file mode 100644 index 0000000000..b19fd8260d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_mappedType.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /goToDefinition_mappedType.ts === +// interface I { [|m|](): void; }; +// declare const i: { [K in "m"]: I[K] }; +// i./*GOTO DEF*/m(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_super.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_super.baseline.jsonc new file mode 100644 index 0000000000..c79dc5bd9d --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_super.baseline.jsonc @@ -0,0 +1,46 @@ +// === goToDefinition === +// === /goToDefinition_super.ts === +// class A { +// [|constructor() {}|] +// x() {} +// } +// class [|B|] extends A {} +// class C extends B { +// constructor() { +// /*GOTO DEF*/super(); +// } +// method() { +// super.x(); +// // --- (line: 12) skipped --- + + + +// === goToDefinition === +// === /goToDefinition_super.ts === +// class A { +// constructor() {} +// x() {} +// } +// class [|B|] extends A {} +// class C extends B { +// constructor() { +// super(); +// } +// method() { +// /*GOTO DEF*/super.x(); +// } +// } +// class D { +// // --- (line: 15) skipped --- + + + +// === goToDefinition === +// === /goToDefinition_super.ts === +// --- (line: 12) skipped --- +// } +// class D { +// constructor() { +// /*GOTO DEF*/super(); +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_untypedModule.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_untypedModule.baseline.jsonc new file mode 100644 index 0000000000..087f06c4d9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToDefinition_untypedModule.baseline.jsonc @@ -0,0 +1,4 @@ +// === goToDefinition === +// === /a.ts === +// import { [|f|] } from "foo"; +// /*GOTO DEF*/f(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/goToModuleAliasDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/goToModuleAliasDefinition.baseline.jsonc new file mode 100644 index 0000000000..398dffba0c --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/goToModuleAliasDefinition.baseline.jsonc @@ -0,0 +1,4 @@ +// === goToDefinition === +// === /b.ts === +// import [|n|] = require('a'); +// var x = new /*GOTO DEF*/n.Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionConstructorFunction.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionConstructorFunction.baseline.jsonc new file mode 100644 index 0000000000..7460b0ef63 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionConstructorFunction.baseline.jsonc @@ -0,0 +1,10 @@ +// === goToDefinition === +// === /gotoDefinitionConstructorFunction.js === +// function [|StringStreamm|]() { +// } +// StringStreamm.prototype = { +// }; +// +// function runMode () { +// new /*GOTO DEF*/StringStreamm() +// }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionInObjectBindingPattern1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionInObjectBindingPattern1.baseline.jsonc new file mode 100644 index 0000000000..abb98b47fe --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionInObjectBindingPattern1.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /gotoDefinitionInObjectBindingPattern1.ts === +// --- (line: 3) skipped --- +// interface Test { +// prop2: number +// } +// bar(({[|pr/*GOTO DEF*/op2|]})=>{}); \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionInObjectBindingPattern2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionInObjectBindingPattern2.baseline.jsonc new file mode 100644 index 0000000000..2cde751515 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionInObjectBindingPattern2.baseline.jsonc @@ -0,0 +1,18 @@ +// === goToDefinition === +// === /gotoDefinitionInObjectBindingPattern2.ts === +// var p0 = ({[|a/*GOTO DEF*/a|]}) => {console.log(aa)}; +// function f2({ a1, b1 }: { a1: number, b1: number } = { a1: 0, b1: 0 }) {} + + + +// === goToDefinition === +// === /gotoDefinitionInObjectBindingPattern2.ts === +// var p0 = ({aa}) => {console.log(aa)}; +// function f2({ [|a/*GOTO DEF*/1|], b1 }: { a1: number, b1: number } = { a1: 0, b1: 0 }) {} + + + +// === goToDefinition === +// === /gotoDefinitionInObjectBindingPattern2.ts === +// var p0 = ({aa}) => {console.log(aa)}; +// function f2({ a1, [|b/*GOTO DEF*/1|] }: { a1: number, b1: number } = { a1: 0, b1: 0 }) {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag1.baseline.jsonc new file mode 100644 index 0000000000..01216c4283 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag1.baseline.jsonc @@ -0,0 +1,125 @@ +// === goToDefinition === +// === /foo.ts === +// interface [|Foo|] { +// foo: string +// } +// namespace NS { +// export interface Bar { +// baz: Foo +// } +// } +// /** {@link /*GOTO DEF*/Foo} foooo*/ +// const a = "" +// /** {@link NS.Bar} ns.bar*/ +// const b = "" +// // --- (line: 13) skipped --- + + + +// === goToDefinition === +// === /foo.ts === +// interface Foo { +// foo: string +// } +// namespace NS { +// export interface [|Bar|] { +// baz: Foo +// } +// } +// /** {@link Foo} foooo*/ +// const a = "" +// /** {@link NS./*GOTO DEF*/Bar} ns.bar*/ +// const b = "" +// /** {@link Foo f1}*/ +// const c = "" +// // --- (line: 15) skipped --- + + + +// === goToDefinition === +// === /foo.ts === +// interface [|Foo|] { +// foo: string +// } +// namespace NS { +// // --- (line: 5) skipped --- + +// --- (line: 9) skipped --- +// const a = "" +// /** {@link NS.Bar} ns.bar*/ +// const b = "" +// /** {@link /*GOTO DEF*/Foo f1}*/ +// const c = "" +// /** {@link NS.Bar ns.bar}*/ +// const d = "" +// // --- (line: 17) skipped --- + + + +// === goToDefinition === +// === /foo.ts === +// interface Foo { +// foo: string +// } +// namespace NS { +// export interface [|Bar|] { +// baz: Foo +// } +// } +// /** {@link Foo} foooo*/ +// const a = "" +// /** {@link NS.Bar} ns.bar*/ +// const b = "" +// /** {@link Foo f1}*/ +// const c = "" +// /** {@link NS./*GOTO DEF*/Bar ns.bar}*/ +// const d = "" +// /** {@link d }dd*/ +// const e = "" +// /** @param x {@link Foo} */ +// function foo(x) { } + + + +// === goToDefinition === +// === /foo.ts === +// --- (line: 12) skipped --- +// /** {@link Foo f1}*/ +// const c = "" +// /** {@link NS.Bar ns.bar}*/ +// const [|d|] = "" +// /** {@link /*GOTO DEF*/d }dd*/ +// const e = "" +// /** @param x {@link Foo} */ +// function foo(x) { } + + + +// === goToDefinition === +// === /foo.ts === +// interface [|Foo|] { +// foo: string +// } +// namespace NS { +// // --- (line: 5) skipped --- + +// --- (line: 15) skipped --- +// const d = "" +// /** {@link d }dd*/ +// const e = "" +// /** @param x {@link /*GOTO DEF*/Foo} */ +// function foo(x) { } + + + +// === goToDefinition === +// === /foo.ts === +// interface [|Foo|] { +// foo: string +// } +// namespace NS { +// // --- (line: 5) skipped --- + +// === /bar.ts === +// /** {@link /*GOTO DEF*/Foo }dd*/ +// const f = "" \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag2.baseline.jsonc new file mode 100644 index 0000000000..8d2a27622c --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag2.baseline.jsonc @@ -0,0 +1,6 @@ +// === goToDefinition === +// === /gotoDefinitionLinkTag2.ts === +// enum E { +// /** {@link /*GOTO DEF*/A} */ +// [|A|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag3.baseline.jsonc new file mode 100644 index 0000000000..d1b6210c5a --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag3.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /a.ts === +// enum E { +// /** {@link /*GOTO DEF*/Foo} */ +// [|Foo|] +// } +// interface Foo { +// foo: E.Foo; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag4.baseline.jsonc new file mode 100644 index 0000000000..958daa85d3 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag4.baseline.jsonc @@ -0,0 +1,6 @@ +// === goToDefinition === +// === /b.ts === +// enum E { +// /** {@link /*GOTO DEF*/Foo} */ +// [|Foo|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag5.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag5.baseline.jsonc new file mode 100644 index 0000000000..709efe4fbf --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag5.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /gotoDefinitionLinkTag5.ts === +// enum E { +// /** {@link /*GOTO DEF*/B} */ +// A, +// [|B|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag6.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag6.baseline.jsonc new file mode 100644 index 0000000000..82e2ee17b5 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionLinkTag6.baseline.jsonc @@ -0,0 +1,6 @@ +// === goToDefinition === +// === /gotoDefinitionLinkTag6.ts === +// enum E { +// /** {@link E./*GOTO DEF*/A} */ +// [|A|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionPropertyAccessExpressionHeritageClause.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionPropertyAccessExpressionHeritageClause.baseline.jsonc new file mode 100644 index 0000000000..6668a2f281 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionPropertyAccessExpressionHeritageClause.baseline.jsonc @@ -0,0 +1,19 @@ +// === goToDefinition === +// === /gotoDefinitionPropertyAccessExpressionHeritageClause.ts === +// class B {} +// function foo() { +// return {[|B|]: B}; +// } +// class C extends (foo())./*GOTO DEF*/B {} +// class C1 extends foo().B {} + + + +// === goToDefinition === +// === /gotoDefinitionPropertyAccessExpressionHeritageClause.ts === +// class B {} +// function foo() { +// return {[|B|]: B}; +// } +// class C extends (foo()).B {} +// class C1 extends foo()./*GOTO DEF*/B {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionSatisfiesTag.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionSatisfiesTag.baseline.jsonc new file mode 100644 index 0000000000..fe2c444c99 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionSatisfiesTag.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /a.js === +// /** +// * @typedef {Object} [|T|] +// * @property {number} a +// */ +// +// /** @satisfies {/*GOTO DEF*/T} comment */ +// const foo = { a: 1 }; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionThrowsTag.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionThrowsTag.baseline.jsonc new file mode 100644 index 0000000000..6f6a711484 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/gotoDefinitionThrowsTag.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /gotoDefinitionThrowsTag.ts === +// class E extends Error {} +// +// /** +// * @throws {/*GOTO DEF*/E} +// */ +// function f() {} \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/importTypeNodeGoToDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/importTypeNodeGoToDefinition.baseline.jsonc new file mode 100644 index 0000000000..f551165273 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/importTypeNodeGoToDefinition.baseline.jsonc @@ -0,0 +1,95 @@ +// === goToDefinition === +// === /ns.ts === +// [|export namespace Foo { +// export namespace Bar { +// export class Baz {} +// } +// }|] + +// === /usage.ts === +// type A = typeof import(/*GOTO DEF*/"./ns").Foo.Bar; +// type B = import("./ns").Foo.Bar.Baz; + + + +// === goToDefinition === +// === /ns.ts === +// export namespace [|Foo|] { +// export namespace Bar { +// export class Baz {} +// } +// } + +// === /usage.ts === +// type A = typeof import("./ns")./*GOTO DEF*/Foo.Bar; +// type B = import("./ns").Foo.Bar.Baz; + + + +// === goToDefinition === +// === /ns.ts === +// export namespace Foo { +// export namespace [|Bar|] { +// export class Baz {} +// } +// } + +// === /usage.ts === +// type A = typeof import("./ns").Foo./*GOTO DEF*/Bar; +// type B = import("./ns").Foo.Bar.Baz; + + + +// === goToDefinition === +// === /ns.ts === +// [|export namespace Foo { +// export namespace Bar { +// export class Baz {} +// } +// }|] + +// === /usage.ts === +// type A = typeof import("./ns").Foo.Bar; +// type B = import(/*GOTO DEF*/"./ns").Foo.Bar.Baz; + + + +// === goToDefinition === +// === /ns.ts === +// export namespace [|Foo|] { +// export namespace Bar { +// export class Baz {} +// } +// } + +// === /usage.ts === +// type A = typeof import("./ns").Foo.Bar; +// type B = import("./ns")./*GOTO DEF*/Foo.Bar.Baz; + + + +// === goToDefinition === +// === /ns.ts === +// export namespace Foo { +// export namespace [|Bar|] { +// export class Baz {} +// } +// } + +// === /usage.ts === +// type A = typeof import("./ns").Foo.Bar; +// type B = import("./ns").Foo./*GOTO DEF*/Bar.Baz; + + + +// === goToDefinition === +// === /ns.ts === +// export namespace Foo { +// export namespace Bar { +// export class [|Baz|] {} +// } +// } + +// === /usage.ts === +// type A = typeof import("./ns").Foo.Bar; +// type B = import("./ns").Foo.Bar./*GOTO DEF*/Baz; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/javaScriptClass3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/javaScriptClass3.baseline.jsonc new file mode 100644 index 0000000000..f5b02f0b67 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/javaScriptClass3.baseline.jsonc @@ -0,0 +1,27 @@ +// === goToDefinition === +// === /Foo.js === +// class Foo { +// constructor() { +// this.[|alpha|] = 10; +// this.beta = 'gamma'; +// } +// method() { return this.alpha; } +// } +// var x = new Foo(); +// x.alpha/*GOTO DEF*/; +// x.beta; + + + +// === goToDefinition === +// === /Foo.js === +// class Foo { +// constructor() { +// this.alpha = 10; +// this.[|beta|] = 'gamma'; +// } +// method() { return this.alpha; } +// } +// var x = new Foo(); +// x.alpha; +// x.beta/*GOTO DEF*/; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee1.baseline.jsonc new file mode 100644 index 0000000000..cb2a5e5e2c --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee1.baseline.jsonc @@ -0,0 +1,91 @@ +// === goToDefinition === +// === /jsDocSee1.ts === +// interface [|Foo|] { +// foo: string +// } +// namespace NS { +// export interface Bar { +// baz: Foo +// } +// } +// /** @see {/*GOTO DEF*/Foo} foooo*/ +// const a = "" +// /** @see {NS.Bar} ns.bar*/ +// const b = "" +// // --- (line: 13) skipped --- + + + +// === goToDefinition === +// === /jsDocSee1.ts === +// interface Foo { +// foo: string +// } +// namespace NS { +// export interface [|Bar|] { +// baz: Foo +// } +// } +// /** @see {Foo} foooo*/ +// const a = "" +// /** @see {NS./*GOTO DEF*/Bar} ns.bar*/ +// const b = "" +// /** @see Foo f1*/ +// const c = "" +// // --- (line: 15) skipped --- + + + +// === goToDefinition === +// === /jsDocSee1.ts === +// interface [|Foo|] { +// foo: string +// } +// namespace NS { +// // --- (line: 5) skipped --- + +// --- (line: 9) skipped --- +// const a = "" +// /** @see {NS.Bar} ns.bar*/ +// const b = "" +// /** @see /*GOTO DEF*/Foo f1*/ +// const c = "" +// /** @see NS.Bar ns.bar*/ +// const d = "" +// /** @see d dd*/ +// const e = "" + + + +// === goToDefinition === +// === /jsDocSee1.ts === +// interface Foo { +// foo: string +// } +// namespace NS { +// export interface [|Bar|] { +// baz: Foo +// } +// } +// /** @see {Foo} foooo*/ +// const a = "" +// /** @see {NS.Bar} ns.bar*/ +// const b = "" +// /** @see Foo f1*/ +// const c = "" +// /** @see NS./*GOTO DEF*/Bar ns.bar*/ +// const d = "" +// /** @see d dd*/ +// const e = "" + + + +// === goToDefinition === +// === /jsDocSee1.ts === +// --- (line: 12) skipped --- +// /** @see Foo f1*/ +// const c = "" +// /** @see NS.Bar ns.bar*/ +// const [|d|] = "" +// /** @see /*GOTO DEF*/d dd*/ +// const e = "" \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee2.baseline.jsonc new file mode 100644 index 0000000000..3ee62a5126 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee2.baseline.jsonc @@ -0,0 +1,87 @@ +// === goToDefinition === +// === /jsDocSee2.ts === +// /** @see {/*GOTO DEF*/foooo} unknown reference*/ +// const a = "" +// /** @see {@bar} invalid tag*/ +// const b = "" +// // --- (line: 5) skipped --- + + + +// === goToDefinition === +// === /jsDocSee2.ts === +// /** @see {foooo} unknown reference*/ +// const a = "" +// /** @see {/*GOTO DEF*/@bar} invalid tag*/ +// const b = "" +// /** @see foooo unknown reference without brace*/ +// const c = "" +// // --- (line: 7) skipped --- + + + +// === goToDefinition === +// === /jsDocSee2.ts === +// /** @see {foooo} unknown reference*/ +// const a = "" +// /** @see {@bar} invalid tag*/ +// const b = "" +// /** @see /*GOTO DEF*/foooo unknown reference without brace*/ +// const c = "" +// /** @see @bar invalid tag without brace*/ +// const d = "" +// // --- (line: 9) skipped --- + + + +// === goToDefinition === +// === /jsDocSee2.ts === +// --- (line: 3) skipped --- +// const b = "" +// /** @see foooo unknown reference without brace*/ +// const c = "" +// /** @see /*GOTO DEF*/@bar invalid tag without brace*/ +// const d = "" +// /** @see {d@fff} partial reference */ +// const e = "" +// // --- (line: 11) skipped --- + + + +// === goToDefinition === +// === /jsDocSee2.ts === +// --- (line: 4) skipped --- +// /** @see foooo unknown reference without brace*/ +// const c = "" +// /** @see @bar invalid tag without brace*/ +// const [|d|] = "" +// /** @see {/*GOTO DEF*/d@fff} partial reference */ +// const e = "" +// /** @see @@@@@@ total invalid tag*/ +// const f = "" +// /** @see d@{fff} partial reference */ +// const g = "" + + + +// === goToDefinition === +// === /jsDocSee2.ts === +// --- (line: 7) skipped --- +// const d = "" +// /** @see {d@fff} partial reference */ +// const e = "" +// /** @see /*GOTO DEF*/@@@@@@ total invalid tag*/ +// const f = "" +// /** @see d@{fff} partial reference */ +// const g = "" + + + +// === goToDefinition === +// === /jsDocSee2.ts === +// --- (line: 9) skipped --- +// const e = "" +// /** @see @@@@@@ total invalid tag*/ +// const f = "" +// /** @see d@{/*GOTO DEF*/fff} partial reference */ +// const g = "" \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee3.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee3.baseline.jsonc new file mode 100644 index 0000000000..61fab7b010 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee3.baseline.jsonc @@ -0,0 +1,9 @@ +// === goToDefinition === +// === /jsDocSee3.ts === +// function foo ([|a|]: string) { +// /** +// * @see {/*GOTO DEF*/a} +// */ +// function bar (a: string) { +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee4.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee4.baseline.jsonc new file mode 100644 index 0000000000..8a66dabeb4 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/jsDocSee4.baseline.jsonc @@ -0,0 +1,52 @@ +// === goToDefinition === +// === /jsDocSee4.ts === +// class [|A|] { +// foo () { } +// } +// declare const a: A; +// /** +// * @see {/*GOTO DEF*/A#foo} +// */ +// const t1 = 1 +// /** +// // --- (line: 10) skipped --- + + + +// === goToDefinition === +// === /jsDocSee4.ts === +// class A { +// foo () { } +// } +// declare const [|a|]: A; +// /** +// * @see {A#foo} +// */ +// const t1 = 1 +// /** +// * @see {/*GOTO DEF*/a.foo()} +// */ +// const t2 = 1 +// /** +// // --- (line: 14) skipped --- + + + +// === goToDefinition === +// === /jsDocSee4.ts === +// class A { +// foo () { } +// } +// declare const [|a|]: A; +// /** +// * @see {A#foo} +// */ +// const t1 = 1 +// /** +// * @see {a.foo()} +// */ +// const t2 = 1 +// /** +// * @see {@link /*GOTO DEF*/a.foo()} +// */ +// const t3 = 1 \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/jsdocTypedefTagGoToDefinition.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/jsdocTypedefTagGoToDefinition.baseline.jsonc new file mode 100644 index 0000000000..50c6a61b85 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/jsdocTypedefTagGoToDefinition.baseline.jsonc @@ -0,0 +1,34 @@ +// === goToDefinition === +// === /jsdocCompletion_typedef.js === +// /** +// * @typedef {Object} Person +// * @property {string} [|personName|] +// * @property {number} personAge +// */ +// +// /** +// * @typedef {{ animalName: string, animalAge: number }} Animal +// */ +// +// /** @type {Person} */ +// var person; person.personName/*GOTO DEF*/ +// +// /** @type {Animal} */ +// var animal; animal.animalName + + + +// === goToDefinition === +// === /jsdocCompletion_typedef.js === +// --- (line: 4) skipped --- +// */ +// +// /** +// * @typedef {{ [|animalName|]: string, animalAge: number }} Animal +// */ +// +// /** @type {Person} */ +// var person; person.personName +// +// /** @type {Animal} */ +// var animal; animal.animalName/*GOTO DEF*/ \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/jsxSpreadReference.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/jsxSpreadReference.baseline.jsonc new file mode 100644 index 0000000000..629dad64b0 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/jsxSpreadReference.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /file.tsx === +// --- (line: 10) skipped --- +// } +// } +// +// var [|nn|]: {name?: string; size?: number}; +// var x = ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/reallyLargeFile.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/reallyLargeFile.baseline.jsonc new file mode 100644 index 0000000000..711b5b0614 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/reallyLargeFile.baseline.jsonc @@ -0,0 +1,7 @@ +// === goToDefinition === +// === /file.d.ts === +// namespace /*GOTO DEF*/[|Foo|] { +// +// +// +// // --- (line: 5) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionClasses.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionClasses.baseline.jsonc new file mode 100644 index 0000000000..019d208f03 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionClasses.baseline.jsonc @@ -0,0 +1,48 @@ +// === goToDefinition === +// === /file.tsx === +// declare module JSX { +// interface Element { } +// interface IntrinsicElements { } +// interface ElementAttributesProperty { props; } +// } +// class [|MyClass|] { +// props: { +// foo: string; +// } +// } +// var x = ; +// var y = ; +// var z = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 4) skipped --- +// } +// class MyClass { +// props: { +// [|foo|]: string; +// } +// } +// var x = ; +// var y = ; +// var z = ; + + + +// === goToDefinition === +// === /file.tsx === +// declare module JSX { +// interface Element { } +// interface IntrinsicElements { } +// interface ElementAttributesProperty { props; } +// } +// class [|MyClass|] { +// props: { +// foo: string; +// } +// } +// var x = ; +// var y = ; +// var z = ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionIntrinsics.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionIntrinsics.baseline.jsonc new file mode 100644 index 0000000000..5d4c9efa4e --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionIntrinsics.baseline.jsonc @@ -0,0 +1,48 @@ +// === goToDefinition === +// === /file.tsx === +// declare module JSX { +// interface Element { } +// interface IntrinsicElements { +// [|div|]: { +// name?: string; +// isOpen?: boolean; +// }; +// span: { n: string; }; +// } +// } +// var x = ; +// var y = ; +// var z =
; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 4) skipped --- +// name?: string; +// isOpen?: boolean; +// }; +// [|span|]: { n: string; }; +// } +// } +// var x =
; +// var y = ; +// var z =
; + + + +// === goToDefinition === +// === /file.tsx === +// declare module JSX { +// interface Element { } +// interface IntrinsicElements { +// div: { +// [|name|]?: string; +// isOpen?: boolean; +// }; +// span: { n: string; }; +// } +// } +// var x =
; +// var y = ; +// var z =
; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionStatelessFunction1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionStatelessFunction1.baseline.jsonc new file mode 100644 index 0000000000..49f1432f83 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionStatelessFunction1.baseline.jsonc @@ -0,0 +1,87 @@ +// === goToDefinition === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: "hell" +// optional?: boolean +// } +// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: "hell" +// optional?: boolean +// } +// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: "hell" +// optional?: boolean +// } +// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: "hell" +// optional?: boolean +// } +// declare function [|Opt|](attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 4) skipped --- +// interface ElementAttributesProperty { props; } +// } +// interface OptionPropBag { +// [|propx|]: number +// propString: "hell" +// optional?: boolean +// } +// declare function Opt(attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 6) skipped --- +// interface OptionPropBag { +// propx: number +// propString: "hell" +// [|optional|]?: boolean +// } +// declare function Opt(attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionStatelessFunction2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionStatelessFunction2.baseline.jsonc new file mode 100644 index 0000000000..86067d8aaf --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionStatelessFunction2.baseline.jsonc @@ -0,0 +1,104 @@ +// === goToDefinition === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt =
; +// let opt = ; +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt =
; +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = ; +// let opt =
{}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = ; +// let opt = {}} />; +// let opt =
{}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 14) skipped --- +// goTo: string; +// } +// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButton|](linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = ; +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt =
; +// let opt = ; + + + +// === goToDefinition === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButton|](buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = ; +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt =
; \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionUnionElementType1.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionUnionElementType1.baseline.jsonc new file mode 100644 index 0000000000..4ed459649f --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionUnionElementType1.baseline.jsonc @@ -0,0 +1,14 @@ +// === goToDefinition === +// === /file.tsx === +// --- (line: 3) skipped --- +// } +// interface ElementAttributesProperty { props; } +// } +// function [|SFC1|](prop: { x: number }) { +// return
hello
; +// }; +// function SFC2(prop: { x: boolean }) { +// return

World

; +// } +// var [|SFCComp|] = SFC1 || SFC2; +// \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionUnionElementType2.baseline.jsonc b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionUnionElementType2.baseline.jsonc new file mode 100644 index 0000000000..aea57bc6f9 --- /dev/null +++ b/testdata/baselines/reference/fourslash/goToDefinition/tsxGoToDefinitionUnionElementType2.baseline.jsonc @@ -0,0 +1,8 @@ +// === goToDefinition === +// === /file.tsx === +// --- (line: 8) skipped --- +// } +// private method() { } +// } +// var [|RCComp|] = RC1 || RC2; +// \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/CompletionDetailsOfContextSensitiveParameterNoCrash.baseline b/testdata/baselines/reference/fourslash/hover/CompletionDetailsOfContextSensitiveParameterNoCrash.baseline deleted file mode 100644 index 2ffe5f140f..0000000000 --- a/testdata/baselines/reference/fourslash/hover/CompletionDetailsOfContextSensitiveParameterNoCrash.baseline +++ /dev/null @@ -1,114 +0,0 @@ -// === QuickInfo === -=== /completionDetailsOfContextSensitiveParameterNoCrash.ts === -// type __ = never; -// -// interface CurriedFunction1 { -// (): CurriedFunction1; -// (t1: T1): R; -// } -// interface CurriedFunction2 { -// (): CurriedFunction2; -// (t1: T1): CurriedFunction1; -// (t1: __, t2: T2): CurriedFunction1; -// (t1: T1, t2: T2): R; -// } -// -// interface CurriedFunction3 { -// (): CurriedFunction3; -// (t1: T1): CurriedFunction2; -// (t1: __, t2: T2): CurriedFunction2; -// (t1: T1, t2: T2): CurriedFunction1; -// (t1: __, t2: __, t3: T3): CurriedFunction2; -// (t1: T1, t2: __, t3: T3): CurriedFunction1; -// (t1: __, t2: T2, t3: T3): CurriedFunction1; -// (t1: T1, t2: T2, t3: T3): R; -// } -// -// interface CurriedFunction4 { -// (): CurriedFunction4; -// (t1: T1): CurriedFunction3; -// (t1: __, t2: T2): CurriedFunction3; -// (t1: T1, t2: T2): CurriedFunction2; -// (t1: __, t2: __, t3: T3): CurriedFunction3; -// (t1: __, t2: __, t3: T3): CurriedFunction2; -// (t1: __, t2: T2, t3: T3): CurriedFunction2; -// (t1: T1, t2: T2, t3: T3): CurriedFunction1; -// (t1: __, t2: __, t3: __, t4: T4): CurriedFunction3; -// (t1: T1, t2: __, t3: __, t4: T4): CurriedFunction2; -// (t1: __, t2: T2, t3: __, t4: T4): CurriedFunction2; -// (t1: __, t2: __, t3: T3, t4: T4): CurriedFunction2; -// (t1: T1, t2: T2, t3: __, t4: T4): CurriedFunction1; -// (t1: T1, t2: __, t3: T3, t4: T4): CurriedFunction1; -// (t1: __, t2: T2, t3: T3, t4: T4): CurriedFunction1; -// (t1: T1, t2: T2, t3: T3, t4: T4): R; -// } -// -// declare var curry: { -// (func: (t1: T1) => R, arity?: number): CurriedFunction1; -// (func: (t1: T1, t2: T2) => R, arity?: number): CurriedFunction2; -// (func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): CurriedFunction3; -// (func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): CurriedFunction4; -// (func: (...args: any[]) => any, arity?: number): (...args: any[]) => any; -// placeholder: __; -// }; -// -// export type StylingFunction = ( -// keys: (string | false | undefined) | (string | false | undefined)[], -// ...rest: unknown[] -// ) => object; -// -// declare const getStylingByKeys: ( -// mergedStyling: object, -// keys: (string | false | undefined) | (string | false | undefined)[], -// ...args: unknown[] -// ) => object; -// -// declare var mergedStyling: object; -// -// export const createStyling: CurriedFunction3< -// (base16Theme: object) => unknown, -// object | undefined, -// object | undefined, -// StylingFunction -// > = curry< -// (base16Theme: object) => unknown, -// object | undefined, -// object | undefined, -// StylingFunction -// >( -// ( -// getStylingFromBase16: (base16Theme: object) => unknown, -// options: object = {}, -// themeOrStyling: object = {}, -// ...args -// ): StylingFunction => { -// return curry(getStylingByKeys, 2)(mergedStyling, ...args); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) args: [] -// | ``` -// | -// | ---------------------------------------------------------------------- -// }, -// 3 -// ); -[ - { - "marker": { - "Position": 3101, - "LSPosition": { - "line": 82, - "character": 60 - }, - "Name": "", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) args: []\n```\n" - } - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/JsDocTypedefQuickInfo1.baseline b/testdata/baselines/reference/fourslash/hover/JsDocTypedefQuickInfo1.baseline deleted file mode 100644 index 17be79caa3..0000000000 --- a/testdata/baselines/reference/fourslash/hover/JsDocTypedefQuickInfo1.baseline +++ /dev/null @@ -1,78 +0,0 @@ -// === QuickInfo === -=== /jsDocTypedef1.js === -// /** -// * @typedef {Object} Opts -// * @property {string} x -// * @property {string=} y -// * @property {string} [z] -// * @property {string} [w="hi"] -// * -// * @param {Opts} opts -// */ -// function foo(opts) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) opts: Opts -// | ``` -// | -// | ---------------------------------------------------------------------- -// opts.x; -// } -// foo({x: 'abc'}); -// /** -// * @typedef {object} Opts1 -// * @property {string} x -// * @property {string=} y -// * @property {string} [z] -// * @property {string} [w="hi"] -// * -// * @param {Opts1} opts -// */ -// function foo1(opts1) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) opts1: any -// | ``` -// | -// | ---------------------------------------------------------------------- -// opts1.x; -// } -// foo1({x: 'abc'}); -[ - { - "marker": { - "Position": 179, - "LSPosition": { - "line": 9, - "character": 13 - }, - "Name": "1", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) opts: Opts\n```\n" - } - } - }, - { - "marker": { - "Position": 400, - "LSPosition": { - "line": 22, - "character": 14 - }, - "Name": "2", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) opts1: any\n```\n" - } - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoCommentsCommentParsing.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoCommentsCommentParsing.baseline deleted file mode 100644 index 0e4164e80a..0000000000 --- a/testdata/baselines/reference/fourslash/hover/QuickInfoCommentsCommentParsing.baseline +++ /dev/null @@ -1,1630 +0,0 @@ -// === QuickInfo === -=== /quickInfoCommentsCommentParsing.ts === -// /// This is simple /// comments -// function simple() { -// } -// -// simple( ); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function simple(): void -// | ``` -// | -// | ---------------------------------------------------------------------- -// -// /// multiLine /// Comments -// /// This is example of multiline /// comments -// /// Another multiLine -// function multiLine() { -// } -// multiLine( ); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function multiLine(): void -// | ``` -// | -// | ---------------------------------------------------------------------- -// -// /** this is eg of single line jsdoc style comment */ -// function jsDocSingleLine() { -// } -// jsDocSingleLine(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocSingleLine(): void -// | ``` -// | this is eg of single line jsdoc style comment -// | ---------------------------------------------------------------------- -// -// -// /** this is multiple line jsdoc stule comment -// *New line1 -// *New Line2*/ -// function jsDocMultiLine() { -// } -// jsDocMultiLine(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocMultiLine(): void -// | ``` -// | this is multiple line jsdoc stule comment -// | New line1 -// | New Line2 -// | ---------------------------------------------------------------------- -// -// /** multiple line jsdoc comments no longer merge -// *New line1 -// *New Line2*/ -// /** Shoul mege this line as well -// * and this too*/ /** Another this one too*/ -// function jsDocMultiLineMerge() { -// } -// jsDocMultiLineMerge(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocMultiLineMerge(): void -// | ``` -// | Another this one too -// | ---------------------------------------------------------------------- -// -// -// /// Triple slash comment -// /** jsdoc comment */ -// function jsDocMixedComments1() { -// } -// jsDocMixedComments1(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocMixedComments1(): void -// | ``` -// | jsdoc comment -// | ---------------------------------------------------------------------- -// -// /// Triple slash comment -// /** jsdoc comment */ /** another jsDocComment*/ -// function jsDocMixedComments2() { -// } -// jsDocMixedComments2(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocMixedComments2(): void -// | ``` -// | another jsDocComment -// | ---------------------------------------------------------------------- -// -// /** jsdoc comment */ /*** triplestar jsDocComment*/ -// /// Triple slash comment -// function jsDocMixedComments3() { -// } -// jsDocMixedComments3(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocMixedComments3(): void -// | ``` -// | * triplestar jsDocComment -// | ---------------------------------------------------------------------- -// -// /** jsdoc comment */ /** another jsDocComment*/ -// /// Triple slash comment -// /// Triple slash comment 2 -// function jsDocMixedComments4() { -// } -// jsDocMixedComments4(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocMixedComments4(): void -// | ``` -// | another jsDocComment -// | ---------------------------------------------------------------------- -// -// /// Triple slash comment 1 -// /** jsdoc comment */ /** another jsDocComment*/ -// /// Triple slash comment -// /// Triple slash comment 2 -// function jsDocMixedComments5() { -// } -// jsDocMixedComments5(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocMixedComments5(): void -// | ``` -// | another jsDocComment -// | ---------------------------------------------------------------------- -// -// /** another jsDocComment*/ -// /// Triple slash comment 1 -// /// Triple slash comment -// /// Triple slash comment 2 -// /** jsdoc comment */ -// function jsDocMixedComments6() { -// } -// jsDocMixedComments6(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocMixedComments6(): void -// | ``` -// | jsdoc comment -// | ---------------------------------------------------------------------- -// -// // This shoulnot be help comment -// function noHelpComment1() { -// } -// noHelpComment1(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function noHelpComment1(): void -// | ``` -// | -// | ---------------------------------------------------------------------- -// -// /* This shoulnot be help comment */ -// function noHelpComment2() { -// } -// noHelpComment2(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function noHelpComment2(): void -// | ``` -// | -// | ---------------------------------------------------------------------- -// -// function noHelpComment3() { -// } -// noHelpComment3(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function noHelpComment3(): void -// | ``` -// | -// | ---------------------------------------------------------------------- -// /** Adds two integers and returns the result -// * @param {number} a first number -// * @param b second number -// */ -// function sum(a: number, b: number) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: number -// | ``` -// | first number -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: number -// | ``` -// | second number -// | -// | ---------------------------------------------------------------------- -// return a + b; -// } -// sum(10, 20); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function sum(a: number, b: number): number -// | ``` -// | Adds two integers and returns the result -// | -// | *@param* `a` — first number -// | -// | -// | *@param* `b` — second number -// | -// | ---------------------------------------------------------------------- -// /** This is multiplication function -// * @param -// * @param a first number -// * @param b -// * @param c { -// @param d @anotherTag -// * @param e LastParam @anotherTag*/ -// function multiply(a: number, b: number, c?: number, d?, e?) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: number -// | ``` -// | first number -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) c: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) d: any -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) e: any -// | ``` -// | LastParam -// | ---------------------------------------------------------------------- -// } -// multiply(10, 20, 30, 40, 50); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function multiply(a: number, b: number, c?: number, d?: any, e?: any): void -// | ``` -// | This is multiplication function -// | -// | *@param* `` -// | -// | *@param* `a` — first number -// | -// | -// | *@param* `b` -// | -// | *@param* `c` -// | -// | *@param* `d` -// | -// | *@anotherTag* -// | -// | *@param* `e` — LastParam -// | -// | *@anotherTag* -// | ---------------------------------------------------------------------- -// /** fn f1 with number -// * @param { string} b about b -// */ -// function f1(a: number); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// function f1(b: string); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: string -// | ``` -// | -// | ---------------------------------------------------------------------- -// /**@param opt optional parameter*/ -// function f1(aOrb, opt?) { -// return aOrb; -// } -// f1(10); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function f1(a: number): any -// | ``` -// | fn f1 with number -// | -// | *@param* `b` — about b -// | -// | ---------------------------------------------------------------------- -// f1("hello"); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function f1(b: string): any -// | ``` -// | -// | ---------------------------------------------------------------------- -// -// /** This is subtract function -// @param { a -// *@param { number | } b this is about b -// @param { { () => string; } } c this is optional param c -// @param { { () => string; } d this is optional param d -// @param { { () => string; } } e this is optional param e -// @param { { { () => string; } } f this is optional param f -// */ -// function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: number -// | ``` -// | this is about b -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) c: () => string -// | ``` -// | this is optional param c -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) d: () => string -// | ``` -// | this is optional param d -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) e: () => string -// | ``` -// | this is optional param e -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) f: () => string -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// subtract(10, 20, null, null, null, null); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void -// | ``` -// | This is subtract function -// | -// | *@param* `` -// | -// | *@param* `b` — this is about b -// | -// | -// | *@param* `c` — this is optional param c -// | -// | -// | *@param* `d` — this is optional param d -// | -// | -// | *@param* `e` — this is optional param e -// | -// | -// | *@param* `` — { () => string; } } f this is optional param f -// | -// | ---------------------------------------------------------------------- -// /** this is square function -// @paramTag { number } a this is input number of paramTag -// @param { number } a this is input number -// @returnType { number } it is return type -// */ -// function square(a: number) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: number -// | ``` -// | this is input number -// | -// | ---------------------------------------------------------------------- -// return a * a; -// } -// square(10); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function square(a: number): number -// | ``` -// | this is square function -// | -// | *@paramTag* — { number } a this is input number of paramTag -// | -// | -// | *@param* `a` — this is input number -// | -// | -// | *@returnType* — { number } it is return type -// | -// | ---------------------------------------------------------------------- -// /** this is divide function -// @param { number} a this is a -// @paramTag { number } g this is optional param g -// @param { number} b this is b -// */ -// function divide(a: number, b: number) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: number -// | ``` -// | this is a -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: number -// | ``` -// | this is b -// | -// | ---------------------------------------------------------------------- -// } -// divide(10, 20); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function divide(a: number, b: number): void -// | ``` -// | this is divide function -// | -// | *@param* `a` — this is a -// | -// | -// | *@paramTag* — { number } g this is optional param g -// | -// | -// | *@param* `b` — this is b -// | -// | ---------------------------------------------------------------------- -// /** -// Function returns string concat of foo and bar -// @param {string} foo is string -// @param {string} bar is second string -// */ -// function fooBar(foo: string, bar: string) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) foo: string -// | ``` -// | is string -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) bar: string -// | ``` -// | is second string -// | -// | ---------------------------------------------------------------------- -// return foo + bar; -// } -// fooBar("foo","bar"); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function fooBar(foo: string, bar: string): string -// | ``` -// | Function returns string concat of foo and bar -// | -// | *@param* `foo` — is string -// | -// | -// | *@param* `bar` — is second string -// | -// | ---------------------------------------------------------------------- -// /** This is a comment */ -// var x; -// /** -// * This is a comment -// */ -// var y; -// /** this is jsdoc style function with param tag as well as inline parameter help -// *@param a it is first parameter -// *@param c it is third parameter -// */ -// function jsDocParamTest(/** this is inline comment for a */a: number, /** this is inline comment for b*/ b: number, c: number, d: number) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: number -// | ``` -// | this is inline comment for a -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: number -// | ``` -// | this is inline comment for b -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) c: number -// | ``` -// | it is third parameter -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) d: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// return a + b + c + d; -// } -// jsDocParamTest(30, 40, 50, 60); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocParamTest(a: number, b: number, c: number, d: number): number -// | ``` -// | this is jsdoc style function with param tag as well as inline parameter help -// | -// | *@param* `a` — it is first parameter -// | -// | -// | *@param* `c` — it is third parameter -// | -// | ---------------------------------------------------------------------- -// /** This is function comment -// * And properly aligned comment -// */ -// function jsDocCommentAlignmentTest1() { -// } -// jsDocCommentAlignmentTest1(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocCommentAlignmentTest1(): void -// | ``` -// | This is function comment -// | And properly aligned comment -// | ---------------------------------------------------------------------- -// /** This is function comment -// * And aligned with 4 space char margin -// */ -// function jsDocCommentAlignmentTest2() { -// } -// jsDocCommentAlignmentTest2(); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocCommentAlignmentTest2(): void -// | ``` -// | This is function comment -// | And aligned with 4 space char margin -// | ---------------------------------------------------------------------- -// /** This is function comment -// * And aligned with 4 space char margin -// * @param {string} a this is info about a -// * spanning on two lines and aligned perfectly -// * @param b this is info about b -// * spanning on two lines and aligned perfectly -// * spanning one more line alined perfectly -// * spanning another line with more margin -// * @param c this is info about b -// * not aligned text about parameter will eat only one space -// */ -// function jsDocCommentAlignmentTest3(a: string, b, c) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: string -// | ``` -// | this is info about a -// | spanning on two lines and aligned perfectly -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: any -// | ``` -// | this is info about b -// | spanning on two lines and aligned perfectly -// | spanning one more line alined perfectly -// | spanning another line with more margin -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) c: any -// | ``` -// | this is info about b -// | not aligned text about parameter will eat only one space -// | -// | ---------------------------------------------------------------------- -// } -// jsDocCommentAlignmentTest3("hello",1, 2); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function jsDocCommentAlignmentTest3(a: string, b: any, c: any): void -// | ``` -// | This is function comment -// | And aligned with 4 space char margin -// | -// | *@param* `a` — this is info about a -// | spanning on two lines and aligned perfectly -// | -// | -// | *@param* `b` — this is info about b -// | spanning on two lines and aligned perfectly -// | spanning one more line alined perfectly -// | spanning another line with more margin -// | -// | -// | *@param* `c` — this is info about b -// | not aligned text about parameter will eat only one space -// | -// | ---------------------------------------------------------------------- -// -// ^ -// | ---------------------------------------------------------------------- -// | No quickinfo at /**/. -// | ---------------------------------------------------------------------- -// class NoQuickInfoClass { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | class NoQuickInfoClass -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -[ - { - "marker": { - "Position": 58, - "LSPosition": { - "line": 4, - "character": 3 - }, - "Name": "1q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction simple(): void\n```\n" - } - } - }, - { - "marker": { - "Position": 190, - "LSPosition": { - "line": 11, - "character": 3 - }, - "Name": "2q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction multiLine(): void\n```\n" - } - } - }, - { - "marker": { - "Position": 291, - "LSPosition": { - "line": 16, - "character": 5 - }, - "Name": "3q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocSingleLine(): void\n```\nthis is eg of single line jsdoc style comment" - } - } - }, - { - "marker": { - "Position": 413, - "LSPosition": { - "line": 24, - "character": 6 - }, - "Name": "4q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocMultiLine(): void\n```\nthis is multiple line jsdoc stule comment\nNew line1\nNew Line2" - } - } - }, - { - "marker": { - "Position": 618, - "LSPosition": { - "line": 33, - "character": 7 - }, - "Name": "5q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocMultiLineMerge(): void\n```\nAnother this one too" - } - } - }, - { - "marker": { - "Position": 725, - "LSPosition": { - "line": 40, - "character": 8 - }, - "Name": "6q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocMixedComments1(): void\n```\njsdoc comment" - } - } - }, - { - "marker": { - "Position": 856, - "LSPosition": { - "line": 46, - "character": 7 - }, - "Name": "7q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocMixedComments2(): void\n```\nanother jsDocComment" - } - } - }, - { - "marker": { - "Position": 994, - "LSPosition": { - "line": 52, - "character": 9 - }, - "Name": "8q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocMixedComments3(): void\n```\n* triplestar jsDocComment" - } - } - }, - { - "marker": { - "Position": 1154, - "LSPosition": { - "line": 59, - "character": 10 - }, - "Name": "9q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocMixedComments4(): void\n```\nanother jsDocComment" - } - } - }, - { - "marker": { - "Position": 1336, - "LSPosition": { - "line": 67, - "character": 6 - }, - "Name": "10q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocMixedComments5(): void\n```\nanother jsDocComment" - } - } - }, - { - "marker": { - "Position": 1524, - "LSPosition": { - "line": 76, - "character": 8 - }, - "Name": "11q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocMixedComments6(): void\n```\njsdoc comment" - } - } - }, - { - "marker": { - "Position": 1608, - "LSPosition": { - "line": 81, - "character": 5 - }, - "Name": "12q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction noHelpComment1(): void\n```\n" - } - } - }, - { - "marker": { - "Position": 1695, - "LSPosition": { - "line": 86, - "character": 7 - }, - "Name": "13q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction noHelpComment2(): void\n```\n" - } - } - }, - { - "marker": { - "Position": 1744, - "LSPosition": { - "line": 90, - "character": 7 - }, - "Name": "14q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction noHelpComment3(): void\n```\n" - } - } - }, - { - "marker": { - "Position": 1880, - "LSPosition": { - "line": 95, - "character": 13 - }, - "Name": "16aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: number\n```\nfirst number\n" - } - } - }, - { - "marker": { - "Position": 1891, - "LSPosition": { - "line": 95, - "character": 24 - }, - "Name": "17aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: number\n```\nsecond number\n" - } - } - }, - { - "marker": { - "Position": 1925, - "LSPosition": { - "line": 98, - "character": 1 - }, - "Name": "16q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction sum(a: number, b: number): number\n```\nAdds two integers and returns the result\n\n*@param* `a` — first number\n\n\n*@param* `b` — second number\n" - } - } - }, - { - "marker": { - "Position": 2111, - "LSPosition": { - "line": 106, - "character": 18 - }, - "Name": "19aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: number\n```\nfirst number\n" - } - } - }, - { - "marker": { - "Position": 2122, - "LSPosition": { - "line": 106, - "character": 29 - }, - "Name": "20aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: number\n```\n" - } - } - }, - { - "marker": { - "Position": 2133, - "LSPosition": { - "line": 106, - "character": 40 - }, - "Name": "21aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) c: number\n```\n" - } - } - }, - { - "marker": { - "Position": 2145, - "LSPosition": { - "line": 106, - "character": 52 - }, - "Name": "22aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) d: any\n```\n" - } - } - }, - { - "marker": { - "Position": 2149, - "LSPosition": { - "line": 106, - "character": 56 - }, - "Name": "23aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) e: any\n```\nLastParam " - } - } - }, - { - "marker": { - "Position": 2161, - "LSPosition": { - "line": 108, - "character": 4 - }, - "Name": "19q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction multiply(a: number, b: number, c?: number, d?: any, e?: any): void\n```\nThis is multiplication function\n\n*@param* ``\n\n*@param* `a` — first number\n\n\n*@param* `b`\n\n*@param* `c`\n\n*@param* `d`\n\n*@anotherTag*\n\n*@param* `e` — LastParam \n\n*@anotherTag*" - } - } - }, - { - "marker": { - "Position": 2253, - "LSPosition": { - "line": 112, - "character": 12 - }, - "Name": "25aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: number\n```\n" - } - } - }, - { - "marker": { - "Position": 2277, - "LSPosition": { - "line": 113, - "character": 12 - }, - "Name": "26aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: string\n```\n" - } - } - }, - { - "marker": { - "Position": 2370, - "LSPosition": { - "line": 118, - "character": 1 - }, - "Name": "25q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction f1(a: number): any\n```\nfn f1 with number\n\n*@param* `b` — about b\n" - } - } - }, - { - "marker": { - "Position": 2378, - "LSPosition": { - "line": 119, - "character": 1 - }, - "Name": "26q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction f1(b: string): any\n```\n" - } - } - }, - { - "marker": { - "Position": 2716, - "LSPosition": { - "line": 129, - "character": 18 - }, - "Name": "28aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: number\n```\n" - } - } - }, - { - "marker": { - "Position": 2727, - "LSPosition": { - "line": 129, - "character": 29 - }, - "Name": "29aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: number\n```\nthis is about b\n" - } - } - }, - { - "marker": { - "Position": 2738, - "LSPosition": { - "line": 129, - "character": 40 - }, - "Name": "30aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) c: () => string\n```\nthis is optional param c\n" - } - } - }, - { - "marker": { - "Position": 2756, - "LSPosition": { - "line": 129, - "character": 58 - }, - "Name": "31aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) d: () => string\n```\nthis is optional param d\n" - } - } - }, - { - "marker": { - "Position": 2774, - "LSPosition": { - "line": 129, - "character": 76 - }, - "Name": "32aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) e: () => string\n```\nthis is optional param e\n" - } - } - }, - { - "marker": { - "Position": 2792, - "LSPosition": { - "line": 129, - "character": 94 - }, - "Name": "33aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) f: () => string\n```\n" - } - } - }, - { - "marker": { - "Position": 2818, - "LSPosition": { - "line": 131, - "character": 4 - }, - "Name": "28q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void\n```\nThis is subtract function\n\n*@param* ``\n\n*@param* `b` — this is about b\n\n\n*@param* `c` — this is optional param c\n\n\n*@param* `d` — this is optional param d\n\n\n*@param* `e` — this is optional param e\n\n\n*@param* `` — { () => string; } } f this is optional param f\n" - } - } - }, - { - "marker": { - "Position": 3045, - "LSPosition": { - "line": 137, - "character": 16 - }, - "Name": "34aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: number\n```\nthis is input number\n" - } - } - }, - { - "marker": { - "Position": 3081, - "LSPosition": { - "line": 140, - "character": 3 - }, - "Name": "34q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction square(a: number): number\n```\nthis is square function\n\n*@paramTag* — { number } a this is input number of paramTag\n\n\n*@param* `a` — this is input number\n\n\n*@returnType* — { number } it is return type\n" - } - } - }, - { - "marker": { - "Position": 3243, - "LSPosition": { - "line": 146, - "character": 16 - }, - "Name": "35aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: number\n```\nthis is a\n" - } - } - }, - { - "marker": { - "Position": 3254, - "LSPosition": { - "line": 146, - "character": 27 - }, - "Name": "36aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: number\n```\nthis is b\n" - } - } - }, - { - "marker": { - "Position": 3272, - "LSPosition": { - "line": 148, - "character": 3 - }, - "Name": "35q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction divide(a: number, b: number): void\n```\nthis is divide function\n\n*@param* `a` — this is a\n\n\n*@paramTag* — { number } g this is optional param g\n\n\n*@param* `b` — this is b\n" - } - } - }, - { - "marker": { - "Position": 3432, - "LSPosition": { - "line": 154, - "character": 16 - }, - "Name": "37aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) foo: string\n```\nis string\n" - } - } - }, - { - "marker": { - "Position": 3445, - "LSPosition": { - "line": 154, - "character": 29 - }, - "Name": "38aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) bar: string\n```\nis second string\n" - } - } - }, - { - "marker": { - "Position": 3486, - "LSPosition": { - "line": 157, - "character": 2 - }, - "Name": "37q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction fooBar(foo: string, bar: string): string\n```\nFunction returns string concat of foo and bar\n\n*@param* `foo` — is string\n\n\n*@param* `bar` — is second string\n" - } - } - }, - { - "marker": { - "Position": 3782, - "LSPosition": { - "line": 168, - "character": 59 - }, - "Name": "40aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: number\n```\nthis is inline comment for a" - } - } - }, - { - "marker": { - "Position": 3828, - "LSPosition": { - "line": 168, - "character": 105 - }, - "Name": "41aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: number\n```\nthis is inline comment for b" - } - } - }, - { - "marker": { - "Position": 3839, - "LSPosition": { - "line": 168, - "character": 116 - }, - "Name": "42aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) c: number\n```\nit is third parameter\n" - } - } - }, - { - "marker": { - "Position": 3850, - "LSPosition": { - "line": 168, - "character": 127 - }, - "Name": "43aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) d: number\n```\n" - } - } - }, - { - "marker": { - "Position": 3894, - "LSPosition": { - "line": 171, - "character": 3 - }, - "Name": "40q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocParamTest(a: number, b: number, c: number, d: number): number\n```\nthis is jsdoc style function with param tag as well as inline parameter help\n\n*@param* `a` — it is first parameter\n\n\n*@param* `c` — it is third parameter\n" - } - } - }, - { - "marker": { - "Position": 4040, - "LSPosition": { - "line": 177, - "character": 8 - }, - "Name": "45q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocCommentAlignmentTest1(): void\n```\nThis is function comment\nAnd properly aligned comment" - } - } - }, - { - "marker": { - "Position": 4193, - "LSPosition": { - "line": 183, - "character": 10 - }, - "Name": "46q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocCommentAlignmentTest2(): void\n```\nThis is function comment\n And aligned with 4 space char margin" - } - } - }, - { - "marker": { - "Position": 4778, - "LSPosition": { - "line": 195, - "character": 36 - }, - "Name": "47aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: string\n```\nthis is info about a\nspanning on two lines and aligned perfectly\n" - } - } - }, - { - "marker": { - "Position": 4789, - "LSPosition": { - "line": 195, - "character": 47 - }, - "Name": "48aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: any\n```\nthis is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin\n" - } - } - }, - { - "marker": { - "Position": 4792, - "LSPosition": { - "line": 195, - "character": 50 - }, - "Name": "49aq", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) c: any\n```\nthis is info about b\nnot aligned text about parameter will eat only one space\n" - } - } - }, - { - "marker": { - "Position": 4809, - "LSPosition": { - "line": 197, - "character": 10 - }, - "Name": "47q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction jsDocCommentAlignmentTest3(a: string, b: any, c: any): void\n```\nThis is function comment\n And aligned with 4 space char margin\n\n*@param* `a` — this is info about a\nspanning on two lines and aligned perfectly\n\n\n*@param* `b` — this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin\n\n\n*@param* `c` — this is info about b\nnot aligned text about parameter will eat only one space\n" - } - } - }, - { - "marker": { - "Position": 4841, - "LSPosition": { - "line": 198, - "character": 0 - }, - "Name": "", - "Data": {} - }, - "item": null - }, - { - "marker": { - "Position": 4854, - "LSPosition": { - "line": 199, - "character": 12 - }, - "Name": "50q", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nclass NoQuickInfoClass\n```\n" - } - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc.baseline deleted file mode 100644 index 3e962e1430..0000000000 --- a/testdata/baselines/reference/fourslash/hover/QuickInfoInheritDoc.baseline +++ /dev/null @@ -1,149 +0,0 @@ -// === QuickInfo === -=== /quickInfoInheritDoc.ts === -// abstract class BaseClass { -// /** -// * Useful description always applicable -// * -// * @returns {string} Useful description of return value always applicable. -// */ -// public static doSomethingUseful(stuff?: any): string { -// throw new Error('Must be implemented by subclass'); -// } -// -// /** -// * BaseClass.func1 -// * @param {any} stuff1 BaseClass.func1.stuff1 -// * @returns {void} BaseClass.func1.returns -// */ -// public static func1(stuff1: any): void { -// } -// -// /** -// * Applicable description always. -// */ -// public static readonly someProperty: string = 'general value'; -// } -// -// -// -// -// class SubClass extends BaseClass { -// -// /** -// * @inheritDoc -// * -// * @param {{ tiger: string; lion: string; }} [mySpecificStuff] Description of my specific parameter. -// */ -// public static doSomethingUseful(mySpecificStuff?: { tiger: string; lion: string; }): string { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) SubClass.doSomethingUseful(mySpecificStuff?: { tiger: string; lion: string; }): string -// | ``` -// | -// | -// | *@inheritDoc* -// | -// | *@param* `mySpecificStuff` — Description of my specific parameter. -// | -// | ---------------------------------------------------------------------- -// let useful = ''; -// -// // do something useful to useful -// -// return useful; -// } -// -// /** -// * @inheritDoc -// * @param {any} stuff1 SubClass.func1.stuff1 -// * @returns {void} SubClass.func1.returns -// */ -// public static func1(stuff1: any): void { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) SubClass.func1(stuff1: any): void -// | ``` -// | -// | -// | *@inheritDoc* -// | -// | *@param* `stuff1` — SubClass.func1.stuff1 -// | -// | -// | *@returns* — SubClass.func1.returns -// | -// | ---------------------------------------------------------------------- -// } -// -// /** -// * text over tag -// * @inheritDoc -// * text after tag -// */ -// public static readonly someProperty: string = 'specific to this class value' -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) SubClass.someProperty: string -// | ``` -// | text over tag -// | -// | *@inheritDoc* — text after tag -// | -// | ---------------------------------------------------------------------- -// } -[ - { - "marker": { - "Position": 817, - "LSPosition": { - "line": 34, - "character": 18 - }, - "Name": "1", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) SubClass.doSomethingUseful(mySpecificStuff?: { tiger: string; lion: string; }): string\n```\n\n\n*@inheritDoc*\n\n*@param* `mySpecificStuff` — Description of my specific parameter.\n" - } - } - }, - { - "marker": { - "Position": 1143, - "LSPosition": { - "line": 47, - "character": 18 - }, - "Name": "2", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) SubClass.func1(stuff1: any): void\n```\n\n\n*@inheritDoc*\n\n*@param* `stuff1` — SubClass.func1.stuff1\n\n\n*@returns* — SubClass.func1.returns\n" - } - } - }, - { - "marker": { - "Position": 1282, - "LSPosition": { - "line": 55, - "character": 27 - }, - "Name": "3", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) SubClass.someProperty: string\n```\ntext over tag\n\n*@inheritDoc* — text after tag\n" - } - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocInheritage.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocInheritage.baseline deleted file mode 100644 index cea936d462..0000000000 --- a/testdata/baselines/reference/fourslash/hover/QuickInfoJsDocInheritage.baseline +++ /dev/null @@ -1,684 +0,0 @@ -// === QuickInfo === -=== /quickInfoJsDocInheritage.ts === -// interface A { -// /** -// * @description A.foo1 -// */ -// foo1: number; -// /** -// * @description A.foo2 -// */ -// foo2: (para1: string) => number; -// } -// -// interface B { -// /** -// * @description B.foo1 -// */ -// foo1: number; -// /** -// * @description B.foo2 -// */ -// foo2: (para2: string) => number; -// } -// -// // implement multi interfaces with duplicate name -// // method for function signature -// class C implements A, B { -// foo1: number = 1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) C.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// foo2(q: string) { return 1 } -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) C.foo2(q: string): number -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// -// // implement multi interfaces with duplicate name -// // property for function signature -// class D implements A, B { -// foo1: number = 1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) D.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// foo2 = (q: string) => { return 1 } -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) D.foo2: (q: string) => number -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// -// new C().foo1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) C.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// new C().foo2; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) C.foo2(q: string): number -// | ``` -// | -// | ---------------------------------------------------------------------- -// new D().foo1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) D.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// new D().foo2; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) D.foo2: (q: string) => number -// | ``` -// | -// | ---------------------------------------------------------------------- -// -// class Base1 { -// /** -// * @description Base1.foo1 -// */ -// foo1: number = 1; -// -// /** -// * -// * @param q Base1.foo2 parameter -// * @returns Base1.foo2 return -// */ -// foo2(q: string) { return 1 } -// } -// -// // extends class and implement interfaces with duplicate name -// // property override method -// class Drived1 extends Base1 implements A { -// foo1: number = 1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived1.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// foo2(para1: string) { return 1 }; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) Drived1.foo2(para1: string): number -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// -// // extends class and implement interfaces with duplicate name -// // method override method -// class Drived2 extends Base1 implements B { -// foo1: number = 1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived2.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// foo2 = (para1: string) => { return 1; }; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived2.foo2: (para1: string) => number -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// -// class Base2 { -// /** -// * @description Base2.foo1 -// */ -// foo1: number = 1; -// /** -// * -// * @param q Base2.foo2 parameter -// * @returns Base2.foo2 return -// */ -// foo2(q: string) { return 1 } -// } -// -// // extends class and implement interfaces with duplicate name -// // property override method -// class Drived3 extends Base2 implements A { -// foo1: number = 1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived3.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// foo2(para1: string) { return 1 }; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) Drived3.foo2(para1: string): number -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// -// // extends class and implement interfaces with duplicate name -// // method override method -// class Drived4 extends Base2 implements B { -// foo1: number = 1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived4.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// foo2 = (para1: string) => { return 1; }; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived4.foo2: (para1: string) => number -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// -// new Drived1().foo1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived1.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// new Drived1().foo2; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) Drived1.foo2(para1: string): number -// | ``` -// | -// | ---------------------------------------------------------------------- -// new Drived2().foo1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived2.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// new Drived2().foo2; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived2.foo2: (para1: string) => number -// | ``` -// | -// | ---------------------------------------------------------------------- -// new Drived3().foo1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived3.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// new Drived3().foo2; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) Drived3.foo2(para1: string): number -// | ``` -// | -// | ---------------------------------------------------------------------- -// new Drived4().foo1; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived4.foo1: number -// | ``` -// | -// | ---------------------------------------------------------------------- -// new Drived4().foo2; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Drived4.foo2: (para1: string) => number -// | ``` -// | -// | ---------------------------------------------------------------------- -[ - { - "marker": { - "Position": 429, - "LSPosition": { - "line": 25, - "character": 4 - }, - "Name": "1", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) C.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 451, - "LSPosition": { - "line": 26, - "character": 4 - }, - "Name": "2", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) C.foo2(q: string): number\n```\n" - } - } - }, - { - "marker": { - "Position": 598, - "LSPosition": { - "line": 32, - "character": 4 - }, - "Name": "3", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) D.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 620, - "LSPosition": { - "line": 33, - "character": 4 - }, - "Name": "4", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) D.foo2: (q: string) => number\n```\n" - } - } - }, - { - "marker": { - "Position": 666, - "LSPosition": { - "line": 36, - "character": 8 - }, - "Name": "5", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) C.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 680, - "LSPosition": { - "line": 37, - "character": 8 - }, - "Name": "6", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) C.foo2(q: string): number\n```\n" - } - } - }, - { - "marker": { - "Position": 694, - "LSPosition": { - "line": 38, - "character": 8 - }, - "Name": "7", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) D.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 708, - "LSPosition": { - "line": 39, - "character": 8 - }, - "Name": "8", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) D.foo2: (q: string) => number\n```\n" - } - } - }, - { - "marker": { - "Position": 1069, - "LSPosition": { - "line": 58, - "character": 4 - }, - "Name": "9", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived1.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 1091, - "LSPosition": { - "line": 59, - "character": 4 - }, - "Name": "10", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) Drived1.foo2(para1: string): number\n```\n" - } - } - }, - { - "marker": { - "Position": 1263, - "LSPosition": { - "line": 65, - "character": 4 - }, - "Name": "11", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived2.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 1285, - "LSPosition": { - "line": 66, - "character": 4 - }, - "Name": "12", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived2.foo2: (para1: string) => number\n```\n" - } - } - }, - { - "marker": { - "Position": 1681, - "LSPosition": { - "line": 85, - "character": 4 - }, - "Name": "13", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived3.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 1703, - "LSPosition": { - "line": 86, - "character": 4 - }, - "Name": "14", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) Drived3.foo2(para1: string): number\n```\n" - } - } - }, - { - "marker": { - "Position": 1875, - "LSPosition": { - "line": 92, - "character": 4 - }, - "Name": "15", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived4.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 1897, - "LSPosition": { - "line": 93, - "character": 4 - }, - "Name": "16", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived4.foo2: (para1: string) => number\n```\n" - } - } - }, - { - "marker": { - "Position": 1955, - "LSPosition": { - "line": 96, - "character": 14 - }, - "Name": "17", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived1.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 1975, - "LSPosition": { - "line": 97, - "character": 14 - }, - "Name": "18", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) Drived1.foo2(para1: string): number\n```\n" - } - } - }, - { - "marker": { - "Position": 1995, - "LSPosition": { - "line": 98, - "character": 14 - }, - "Name": "19", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived2.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 2015, - "LSPosition": { - "line": 99, - "character": 14 - }, - "Name": "20", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived2.foo2: (para1: string) => number\n```\n" - } - } - }, - { - "marker": { - "Position": 2035, - "LSPosition": { - "line": 100, - "character": 14 - }, - "Name": "21", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived3.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 2055, - "LSPosition": { - "line": 101, - "character": 14 - }, - "Name": "22", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) Drived3.foo2(para1: string): number\n```\n" - } - } - }, - { - "marker": { - "Position": 2075, - "LSPosition": { - "line": 102, - "character": 14 - }, - "Name": "23", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived4.foo1: number\n```\n" - } - } - }, - { - "marker": { - "Position": 2095, - "LSPosition": { - "line": 103, - "character": 14 - }, - "Name": "24", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Drived4.foo2: (para1: string) => number\n```\n" - } - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoOnParameterProperties.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoOnParameterProperties.baseline deleted file mode 100644 index 399006c05a..0000000000 --- a/testdata/baselines/reference/fourslash/hover/QuickInfoOnParameterProperties.baseline +++ /dev/null @@ -1,77 +0,0 @@ -// === QuickInfo === -=== /quickInfoOnParameterProperties.ts === -// interface IFoo { -// /** this is the name of blabla -// * - use blabla -// * @example blabla -// */ -// name?: string; -// } -// -// // test1 should work -// class Foo implements IFoo { -// //public name: string = ''; -// constructor( -// public name: string, // documentation should leech and work ! -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Foo.name: string -// | ``` -// | -// | ---------------------------------------------------------------------- -// ) { -// } -// } -// -// // test2 work -// class Foo2 implements IFoo { -// public name: string = ''; // documentation leeched and work ! -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (property) Foo2.name: string -// | ``` -// | -// | ---------------------------------------------------------------------- -// constructor( -// //public name: string, -// ) { -// } -// } -[ - { - "marker": { - "Position": 226, - "LSPosition": { - "line": 12, - "character": 13 - }, - "Name": "1", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Foo.name: string\n```\n" - } - } - }, - { - "marker": { - "Position": 347, - "LSPosition": { - "line": 19, - "character": 11 - }, - "Name": "2", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(property) Foo2.name: string\n```\n" - } - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/signatureHelp/QuickInfoJsDocTextFormatting1.baseline b/testdata/baselines/reference/fourslash/signatureHelp/QuickInfoJsDocTextFormatting1.baseline deleted file mode 100644 index 0a70cac362..0000000000 --- a/testdata/baselines/reference/fourslash/signatureHelp/QuickInfoJsDocTextFormatting1.baseline +++ /dev/null @@ -1,205 +0,0 @@ -// === SignatureHelp === -=== /quickInfoJsDocTextFormatting1.ts === -// /** -// * @param {number} var1 **Highlighted text** -// * @param {string} var2 Another **Highlighted text** -// */ -// function f1(var1, var2) { } -// -// /** -// * @param {number} var1 *Regular text with an asterisk -// * @param {string} var2 Another *Regular text with an asterisk -// */ -// function f2(var1, var2) { } -// -// /** -// * @param {number} var1 -// * *Regular text with an asterisk -// * @param {string} var2 -// * Another *Regular text with an asterisk -// */ -// function f3(var1, var2) { } -// -// /** -// * @param {number} var1 -// * **Highlighted text** -// * @param {string} var2 -// * Another **Highlighted text** -// */ -// function f4(var1, var2) { } -// -// /** -// * @param {number} var1 -// **Highlighted text** -// * @param {string} var2 -// Another **Highlighted text** -// */ -// function f5(var1, var2) { } -// -// f1(); -// ^ -// | ---------------------------------------------------------------------- -// | f1(**var1: any**, var2: any): void -// | ---------------------------------------------------------------------- -// f2(); -// ^ -// | ---------------------------------------------------------------------- -// | f2(**var1: any**, var2: any): void -// | ---------------------------------------------------------------------- -// f3(); -// ^ -// | ---------------------------------------------------------------------- -// | f3(**var1: any**, var2: any): void -// | ---------------------------------------------------------------------- -// f4(); -// ^ -// | ---------------------------------------------------------------------- -// | f4(**var1: any**, var2: any): void -// | ---------------------------------------------------------------------- -// f5(); -// ^ -// | ---------------------------------------------------------------------- -// | f5(**var1: any**, var2: any): void -// | ---------------------------------------------------------------------- -[ - { - "marker": { - "Position": 737, - "LSPosition": { - "line": 36, - "character": 3 - }, - "Name": "1", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "f1(var1: any, var2: any): void", - "parameters": [ - { - "label": "var1: any" - }, - { - "label": "var2: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 743, - "LSPosition": { - "line": 37, - "character": 3 - }, - "Name": "2", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "f2(var1: any, var2: any): void", - "parameters": [ - { - "label": "var1: any" - }, - { - "label": "var2: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 749, - "LSPosition": { - "line": 38, - "character": 3 - }, - "Name": "3", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "f3(var1: any, var2: any): void", - "parameters": [ - { - "label": "var1: any" - }, - { - "label": "var2: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 755, - "LSPosition": { - "line": 39, - "character": 3 - }, - "Name": "4", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "f4(var1: any, var2: any): void", - "parameters": [ - { - "label": "var1: any" - }, - { - "label": "var2: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 761, - "LSPosition": { - "line": 40, - "character": 3 - }, - "Name": "5", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "f5(var1: any, var2: any): void", - "parameters": [ - { - "label": "var1: any" - }, - { - "label": "var2: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsCommentParsing.baseline b/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsCommentParsing.baseline deleted file mode 100644 index e347d6162a..0000000000 --- a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsCommentParsing.baseline +++ /dev/null @@ -1,1658 +0,0 @@ -// === SignatureHelp === -=== /signatureHelpCommentsCommentParsing.ts === -// /// This is simple /// comments -// function simple() { -// } -// -// simple( ); -// ^ -// | ---------------------------------------------------------------------- -// | simple(): void -// | ---------------------------------------------------------------------- -// -// /// multiLine /// Comments -// /// This is example of multiline /// comments -// /// Another multiLine -// function multiLine() { -// } -// multiLine( ); -// ^ -// | ---------------------------------------------------------------------- -// | multiLine(): void -// | ---------------------------------------------------------------------- -// -// /** this is eg of single line jsdoc style comment */ -// function jsDocSingleLine() { -// } -// jsDocSingleLine(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocSingleLine(): void -// | ---------------------------------------------------------------------- -// -// -// /** this is multiple line jsdoc stule comment -// *New line1 -// *New Line2*/ -// function jsDocMultiLine() { -// } -// jsDocMultiLine(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocMultiLine(): void -// | ---------------------------------------------------------------------- -// -// /** multiple line jsdoc comments no longer merge -// *New line1 -// *New Line2*/ -// /** Shoul mege this line as well -// * and this too*/ /** Another this one too*/ -// function jsDocMultiLineMerge() { -// } -// jsDocMultiLineMerge(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocMultiLineMerge(): void -// | ---------------------------------------------------------------------- -// -// -// /// Triple slash comment -// /** jsdoc comment */ -// function jsDocMixedComments1() { -// } -// jsDocMixedComments1(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocMixedComments1(): void -// | ---------------------------------------------------------------------- -// -// /// Triple slash comment -// /** jsdoc comment */ /** another jsDocComment*/ -// function jsDocMixedComments2() { -// } -// jsDocMixedComments2(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocMixedComments2(): void -// | ---------------------------------------------------------------------- -// -// /** jsdoc comment */ /*** triplestar jsDocComment*/ -// /// Triple slash comment -// function jsDocMixedComments3() { -// } -// jsDocMixedComments3(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocMixedComments3(): void -// | ---------------------------------------------------------------------- -// -// /** jsdoc comment */ /** another jsDocComment*/ -// /// Triple slash comment -// /// Triple slash comment 2 -// function jsDocMixedComments4() { -// } -// jsDocMixedComments4(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocMixedComments4(): void -// | ---------------------------------------------------------------------- -// -// /// Triple slash comment 1 -// /** jsdoc comment */ /** another jsDocComment*/ -// /// Triple slash comment -// /// Triple slash comment 2 -// function jsDocMixedComments5() { -// } -// jsDocMixedComments5(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocMixedComments5(): void -// | ---------------------------------------------------------------------- -// -// /** another jsDocComment*/ -// /// Triple slash comment 1 -// /// Triple slash comment -// /// Triple slash comment 2 -// /** jsdoc comment */ -// function jsDocMixedComments6() { -// } -// jsDocMixedComments6(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocMixedComments6(): void -// | ---------------------------------------------------------------------- -// -// // This shoulnot be help comment -// function noHelpComment1() { -// } -// noHelpComment1(); -// ^ -// | ---------------------------------------------------------------------- -// | noHelpComment1(): void -// | ---------------------------------------------------------------------- -// -// /* This shoulnot be help comment */ -// function noHelpComment2() { -// } -// noHelpComment2(); -// ^ -// | ---------------------------------------------------------------------- -// | noHelpComment2(): void -// | ---------------------------------------------------------------------- -// -// function noHelpComment3() { -// } -// noHelpComment3(); -// ^ -// | ---------------------------------------------------------------------- -// | noHelpComment3(): void -// | ---------------------------------------------------------------------- -// /** Adds two integers and returns the result -// * @param {number} a first number -// * @param b second number -// */ -// function sum(a: number, b: number) { -// return a + b; -// } -// sum(10, 20); -// ^ -// | ---------------------------------------------------------------------- -// | sum(**a: number**, b: number): number -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | sum(a: number, **b: number**): number -// | ---------------------------------------------------------------------- -// /** This is multiplication function -// * @param -// * @param a first number -// * @param b -// * @param c { -// @param d @anotherTag -// * @param e LastParam @anotherTag*/ -// function multiply(a: number, b: number, c?: number, d?, e?) { -// } -// multiply(10, 20, 30, 40, 50); -// ^ -// | ---------------------------------------------------------------------- -// | multiply(**a: number**, b: number, c?: number, d?: any, e?: any): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | multiply(a: number, **b: number**, c?: number, d?: any, e?: any): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | multiply(a: number, b: number, **c?: number**, d?: any, e?: any): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | multiply(a: number, b: number, c?: number, **d?: any**, e?: any): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | multiply(a: number, b: number, c?: number, d?: any, **e?: any**): void -// | ---------------------------------------------------------------------- -// /** fn f1 with number -// * @param { string} b about b -// */ -// function f1(a: number); -// function f1(b: string); -// /**@param opt optional parameter*/ -// function f1(aOrb, opt?) { -// return aOrb; -// } -// f1(10); -// ^ -// | ---------------------------------------------------------------------- -// | f1(**a: number**): any -// | ---------------------------------------------------------------------- -// f1("hello"); -// ^ -// | ---------------------------------------------------------------------- -// | f1(**b: string**): any -// | ---------------------------------------------------------------------- -// -// /** This is subtract function -// @param { a -// *@param { number | } b this is about b -// @param { { () => string; } } c this is optional param c -// @param { { () => string; } d this is optional param d -// @param { { () => string; } } e this is optional param e -// @param { { { () => string; } } f this is optional param f -// */ -// function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) { -// } -// subtract(10, 20, null, null, null, null); -// ^ -// | ---------------------------------------------------------------------- -// | subtract(**a: number**, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | subtract(a: number, **b: number**, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | subtract(a: number, b: number, **c?: () => string**, d?: () => string, e?: () => string, f?: () => string): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | subtract(a: number, b: number, c?: () => string, **d?: () => string**, e?: () => string, f?: () => string): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | subtract(a: number, b: number, c?: () => string, d?: () => string, **e?: () => string**, f?: () => string): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, **f?: () => string**): void -// | ---------------------------------------------------------------------- -// /** this is square function -// @paramTag { number } a this is input number of paramTag -// @param { number } a this is input number -// @returnType { number } it is return type -// */ -// function square(a: number) { -// return a * a; -// } -// square(10); -// ^ -// | ---------------------------------------------------------------------- -// | square(**a: number**): number -// | ---------------------------------------------------------------------- -// /** this is divide function -// @param { number} a this is a -// @paramTag { number } g this is optional param g -// @param { number} b this is b -// */ -// function divide(a: number, b: number) { -// } -// divide(10, 20); -// ^ -// | ---------------------------------------------------------------------- -// | divide(**a: number**, b: number): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | divide(a: number, **b: number**): void -// | ---------------------------------------------------------------------- -// /** -// Function returns string concat of foo and bar -// @param {string} foo is string -// @param {string} bar is second string -// */ -// function fooBar(foo: string, bar: string) { -// return foo + bar; -// } -// fooBar("foo","bar"); -// ^ -// | ---------------------------------------------------------------------- -// | fooBar(**foo: string**, bar: string): string -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | fooBar(foo: string, **bar: string**): string -// | ---------------------------------------------------------------------- -// /** This is a comment */ -// var x; -// /** -// * This is a comment -// */ -// var y; -// /** this is jsdoc style function with param tag as well as inline parameter help -// *@param a it is first parameter -// *@param c it is third parameter -// */ -// function jsDocParamTest(/** this is inline comment for a */a: number, /** this is inline comment for b*/ b: number, c: number, d: number) { -// return a + b + c + d; -// ^ -// | ---------------------------------------------------------------------- -// | No signaturehelp at /*39*/. -// | ---------------------------------------------------------------------- -// } -// jsDocParamTest(30, 40, 50, 60); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocParamTest(**a: number**, b: number, c: number, d: number): number -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | jsDocParamTest(a: number, **b: number**, c: number, d: number): number -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | jsDocParamTest(a: number, b: number, **c: number**, d: number): number -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | jsDocParamTest(a: number, b: number, c: number, **d: number**): number -// | ---------------------------------------------------------------------- -// /** This is function comment -// * And properly aligned comment -// */ -// function jsDocCommentAlignmentTest1() { -// } -// jsDocCommentAlignmentTest1(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocCommentAlignmentTest1(): void -// | ---------------------------------------------------------------------- -// /** This is function comment -// * And aligned with 4 space char margin -// */ -// function jsDocCommentAlignmentTest2() { -// } -// jsDocCommentAlignmentTest2(); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocCommentAlignmentTest2(): void -// | ---------------------------------------------------------------------- -// /** This is function comment -// * And aligned with 4 space char margin -// * @param {string} a this is info about a -// * spanning on two lines and aligned perfectly -// * @param b this is info about b -// * spanning on two lines and aligned perfectly -// * spanning one more line alined perfectly -// * spanning another line with more margin -// * @param c this is info about b -// * not aligned text about parameter will eat only one space -// */ -// function jsDocCommentAlignmentTest3(a: string, b, c) { -// } -// jsDocCommentAlignmentTest3("hello",1, 2); -// ^ -// | ---------------------------------------------------------------------- -// | jsDocCommentAlignmentTest3(**a: string**, b: any, c: any): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | jsDocCommentAlignmentTest3(a: string, **b: any**, c: any): void -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | jsDocCommentAlignmentTest3(a: string, b: any, **c: any**): void -// | ---------------------------------------------------------------------- -// -// ^ -// | ---------------------------------------------------------------------- -// | No signaturehelp at /**/. -// | ---------------------------------------------------------------------- -// class NoQuickInfoClass { -// } -[ - { - "marker": { - "Position": 63, - "LSPosition": { - "line": 4, - "character": 8 - }, - "Name": "1", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "simple(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 198, - "LSPosition": { - "line": 11, - "character": 11 - }, - "Name": "2", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "multiLine(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 302, - "LSPosition": { - "line": 16, - "character": 16 - }, - "Name": "3", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocSingleLine(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 422, - "LSPosition": { - "line": 24, - "character": 15 - }, - "Name": "4", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocMultiLine(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 631, - "LSPosition": { - "line": 33, - "character": 20 - }, - "Name": "5", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocMultiLineMerge(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 737, - "LSPosition": { - "line": 40, - "character": 20 - }, - "Name": "6", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocMixedComments1(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 869, - "LSPosition": { - "line": 46, - "character": 20 - }, - "Name": "7", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocMixedComments2(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1005, - "LSPosition": { - "line": 52, - "character": 20 - }, - "Name": "8", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocMixedComments3(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1164, - "LSPosition": { - "line": 59, - "character": 20 - }, - "Name": "9", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocMixedComments4(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1350, - "LSPosition": { - "line": 67, - "character": 20 - }, - "Name": "10", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocMixedComments5(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1536, - "LSPosition": { - "line": 76, - "character": 20 - }, - "Name": "11", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocMixedComments6(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1618, - "LSPosition": { - "line": 81, - "character": 15 - }, - "Name": "12", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "noHelpComment1(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1703, - "LSPosition": { - "line": 86, - "character": 15 - }, - "Name": "13", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "noHelpComment2(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1752, - "LSPosition": { - "line": 90, - "character": 15 - }, - "Name": "14", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "noHelpComment3(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1928, - "LSPosition": { - "line": 98, - "character": 4 - }, - "Name": "16", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "sum(a: number, b: number): number", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1932, - "LSPosition": { - "line": 98, - "character": 8 - }, - "Name": "17", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "sum(a: number, b: number): number", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 2166, - "LSPosition": { - "line": 108, - "character": 9 - }, - "Name": "19", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: number" - }, - { - "label": "d?: any" - }, - { - "label": "e?: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 2169, - "LSPosition": { - "line": 108, - "character": 12 - }, - "Name": "20", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: number" - }, - { - "label": "d?: any" - }, - { - "label": "e?: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 2173, - "LSPosition": { - "line": 108, - "character": 16 - }, - "Name": "21", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: number" - }, - { - "label": "d?: any" - }, - { - "label": "e?: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 2 - } - }, - { - "marker": { - "Position": 2178, - "LSPosition": { - "line": 108, - "character": 21 - }, - "Name": "22", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: number" - }, - { - "label": "d?: any" - }, - { - "label": "e?: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 3 - } - }, - { - "marker": { - "Position": 2182, - "LSPosition": { - "line": 108, - "character": 25 - }, - "Name": "23", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: number" - }, - { - "label": "d?: any" - }, - { - "label": "e?: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 4 - } - }, - { - "marker": { - "Position": 2372, - "LSPosition": { - "line": 118, - "character": 3 - }, - "Name": "25", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "f1(a: number): any", - "parameters": [ - { - "label": "a: number" - } - ] - }, - { - "label": "f1(b: string): any", - "parameters": [ - { - "label": "b: string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 2380, - "LSPosition": { - "line": 119, - "character": 3 - }, - "Name": "26", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "f1(a: number): any", - "parameters": [ - { - "label": "a: number" - } - ] - }, - { - "label": "f1(b: string): any", - "parameters": [ - { - "label": "b: string" - } - ] - } - ], - "activeSignature": 1, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 2823, - "LSPosition": { - "line": 131, - "character": 9 - }, - "Name": "28", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: () => string" - }, - { - "label": "d?: () => string" - }, - { - "label": "e?: () => string" - }, - { - "label": "f?: () => string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 2827, - "LSPosition": { - "line": 131, - "character": 13 - }, - "Name": "29", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: () => string" - }, - { - "label": "d?: () => string" - }, - { - "label": "e?: () => string" - }, - { - "label": "f?: () => string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 2832, - "LSPosition": { - "line": 131, - "character": 18 - }, - "Name": "30", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: () => string" - }, - { - "label": "d?: () => string" - }, - { - "label": "e?: () => string" - }, - { - "label": "f?: () => string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 2 - } - }, - { - "marker": { - "Position": 2839, - "LSPosition": { - "line": 131, - "character": 25 - }, - "Name": "31", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: () => string" - }, - { - "label": "d?: () => string" - }, - { - "label": "e?: () => string" - }, - { - "label": "f?: () => string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 3 - } - }, - { - "marker": { - "Position": 2846, - "LSPosition": { - "line": 131, - "character": 32 - }, - "Name": "32", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: () => string" - }, - { - "label": "d?: () => string" - }, - { - "label": "e?: () => string" - }, - { - "label": "f?: () => string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 4 - } - }, - { - "marker": { - "Position": 2853, - "LSPosition": { - "line": 131, - "character": 39 - }, - "Name": "33", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c?: () => string" - }, - { - "label": "d?: () => string" - }, - { - "label": "e?: () => string" - }, - { - "label": "f?: () => string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 5 - } - }, - { - "marker": { - "Position": 3085, - "LSPosition": { - "line": 140, - "character": 7 - }, - "Name": "34", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "square(a: number): number", - "parameters": [ - { - "label": "a: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 3276, - "LSPosition": { - "line": 148, - "character": 7 - }, - "Name": "35", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "divide(a: number, b: number): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 3280, - "LSPosition": { - "line": 148, - "character": 11 - }, - "Name": "36", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "divide(a: number, b: number): void", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 3491, - "LSPosition": { - "line": 157, - "character": 7 - }, - "Name": "37", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "fooBar(foo: string, bar: string): string", - "parameters": [ - { - "label": "foo: string" - }, - { - "label": "bar: string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 3497, - "LSPosition": { - "line": 157, - "character": 13 - }, - "Name": "38", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "fooBar(foo: string, bar: string): string", - "parameters": [ - { - "label": "foo: string" - }, - { - "label": "bar: string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 3874, - "LSPosition": { - "line": 169, - "character": 11 - }, - "Name": "39", - "Data": {} - }, - "item": null - }, - { - "marker": { - "Position": 3906, - "LSPosition": { - "line": 171, - "character": 15 - }, - "Name": "40", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c: number" - }, - { - "label": "d: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 3910, - "LSPosition": { - "line": 171, - "character": 19 - }, - "Name": "41", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c: number" - }, - { - "label": "d: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 3914, - "LSPosition": { - "line": 171, - "character": 23 - }, - "Name": "42", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c: number" - }, - { - "label": "d: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 2 - } - }, - { - "marker": { - "Position": 3918, - "LSPosition": { - "line": 171, - "character": 27 - }, - "Name": "43", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", - "parameters": [ - { - "label": "a: number" - }, - { - "label": "b: number" - }, - { - "label": "c: number" - }, - { - "label": "d: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 3 - } - }, - { - "marker": { - "Position": 4059, - "LSPosition": { - "line": 177, - "character": 27 - }, - "Name": "45", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocCommentAlignmentTest1(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 4210, - "LSPosition": { - "line": 183, - "character": 27 - }, - "Name": "46", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocCommentAlignmentTest2(): void", - "parameters": [] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 4826, - "LSPosition": { - "line": 197, - "character": 27 - }, - "Name": "47", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocCommentAlignmentTest3(a: string, b: any, c: any): void", - "parameters": [ - { - "label": "a: string" - }, - { - "label": "b: any" - }, - { - "label": "c: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 4834, - "LSPosition": { - "line": 197, - "character": 35 - }, - "Name": "48", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocCommentAlignmentTest3(a: string, b: any, c: any): void", - "parameters": [ - { - "label": "a: string" - }, - { - "label": "b: any" - }, - { - "label": "c: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 4837, - "LSPosition": { - "line": 197, - "character": 38 - }, - "Name": "49", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "jsDocCommentAlignmentTest3(a: string, b: any, c: any): void", - "parameters": [ - { - "label": "a: string" - }, - { - "label": "b: any" - }, - { - "label": "c: any" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 2 - } - }, - { - "marker": { - "Position": 4841, - "LSPosition": { - "line": 198, - "character": 0 - }, - "Name": "", - "Data": {} - }, - "item": null - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpExpandedRestTuplesLocalLabels1.baseline b/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpExpandedRestTuplesLocalLabels1.baseline deleted file mode 100644 index 97fcdc0a24..0000000000 --- a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpExpandedRestTuplesLocalLabels1.baseline +++ /dev/null @@ -1,1339 +0,0 @@ -// === SignatureHelp === -=== /signatureHelpExpandedRestTuplesLocalLabels1.ts === -// interface AppleInfo { -// color: "green" | "red"; -// } -// -// interface BananaInfo { -// curvature: number; -// } -// -// type FruitAndInfo1 = ["apple", AppleInfo] | ["banana", BananaInfo]; -// -// function logFruitTuple1(...[fruit, info]: FruitAndInfo1) {} -// logFruitTuple1(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple1(**fruit: "apple"**, info: AppleInfo): void -// | ---------------------------------------------------------------------- -// -// function logFruitTuple2(...[, info]: FruitAndInfo1) {} -// logFruitTuple2(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple2(**arg_0: "apple"**, info: AppleInfo): void -// | ---------------------------------------------------------------------- -// logFruitTuple2("apple", ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple2(arg_0: "apple", **info: AppleInfo**): void -// | ---------------------------------------------------------------------- -// -// function logFruitTuple3(...[fruit, ...rest]: FruitAndInfo1) {} -// logFruitTuple3(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple3(**fruit: "apple"**, rest_0: AppleInfo): void -// | ---------------------------------------------------------------------- -// logFruitTuple3("apple", ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple3(fruit: "apple", **rest_0: AppleInfo**): void -// | ---------------------------------------------------------------------- -// function logFruitTuple4(...[fruit, ...[info]]: FruitAndInfo1) {} -// logFruitTuple4(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple4(**fruit: "apple"**, info: AppleInfo): void -// | ---------------------------------------------------------------------- -// logFruitTuple4("apple", ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple4(fruit: "apple", **info: AppleInfo**): void -// | ---------------------------------------------------------------------- -// -// type FruitAndInfo2 = ["apple", ...AppleInfo[]] | ["banana", ...BananaInfo[]]; -// -// function logFruitTuple5(...[fruit, firstInfo]: FruitAndInfo2) {} -// logFruitTuple5(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple5(**fruit: "apple"**, ...firstInfo_n: AppleInfo[]): void -// | ---------------------------------------------------------------------- -// logFruitTuple5("apple", ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple5(fruit: "apple", **...firstInfo_n: AppleInfo[]**): void -// | ---------------------------------------------------------------------- -// -// function logFruitTuple6(...[fruit, ...fruitInfo]: FruitAndInfo2) {} -// logFruitTuple6(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple6(**fruit: "apple"**, ...fruitInfo: AppleInfo[]): void -// | ---------------------------------------------------------------------- -// logFruitTuple6("apple", ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple6(fruit: "apple", **...fruitInfo: AppleInfo[]**): void -// | ---------------------------------------------------------------------- -// -// type FruitAndInfo3 = ["apple", ...AppleInfo[], number] | ["banana", ...BananaInfo[], number]; -// -// function logFruitTuple7(...[fruit, fruitInfoOrNumber, secondFruitInfoOrNumber]: FruitAndInfo3) {} -// logFruitTuple7(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple7(**fruit: "apple"**, ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void -// | ---------------------------------------------------------------------- -// logFruitTuple7("apple", ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple7(fruit: "apple", **...fruitInfoOrNumber_n: AppleInfo[]**, secondFruitInfoOrNumber: number): void -// | ---------------------------------------------------------------------- -// logFruitTuple7("apple", { color: "red" }, ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple7(fruit: "apple", ...fruitInfoOrNumber_n: AppleInfo[], **secondFruitInfoOrNumber: number**): void -// | ---------------------------------------------------------------------- -// -// function logFruitTuple8(...[fruit, , secondFruitInfoOrNumber]: FruitAndInfo3) {} -// logFruitTuple8(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple8(**fruit: "apple"**, ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void -// | ---------------------------------------------------------------------- -// logFruitTuple8("apple", ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple8(fruit: "apple", **...arg_1: AppleInfo[]**, secondFruitInfoOrNumber: number): void -// | ---------------------------------------------------------------------- -// logFruitTuple8("apple", { color: "red" }, ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple8(fruit: "apple", ...arg_1: AppleInfo[], **secondFruitInfoOrNumber: number**): void -// | ---------------------------------------------------------------------- -// -// function logFruitTuple9(...[...[fruit, fruitInfoOrNumber, secondFruitInfoOrNumber]]: FruitAndInfo3) {} -// logFruitTuple9(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple9(**fruit: "apple"**, ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void -// | ---------------------------------------------------------------------- -// logFruitTuple9("apple", ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple9(fruit: "apple", **...fruitInfoOrNumber_n: AppleInfo[]**, secondFruitInfoOrNumber: number): void -// | ---------------------------------------------------------------------- -// logFruitTuple9("apple", { color: "red" }, ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple9(fruit: "apple", ...fruitInfoOrNumber_n: AppleInfo[], **secondFruitInfoOrNumber: number**): void -// | ---------------------------------------------------------------------- -// -// function logFruitTuple10(...[fruit, {}, secondFruitInfoOrNumber]: FruitAndInfo3) {} -// logFruitTuple10(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple10(**fruit: "apple"**, ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void -// | ---------------------------------------------------------------------- -// logFruitTuple10("apple", ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple10(fruit: "apple", **...arg_1: AppleInfo[]**, secondFruitInfoOrNumber: number): void -// | ---------------------------------------------------------------------- -// logFruitTuple10("apple", { color: "red" }, ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple10(fruit: "apple", ...arg_1: AppleInfo[], **secondFruitInfoOrNumber: number**): void -// | ---------------------------------------------------------------------- -// -// function logFruitTuple11(...{}: FruitAndInfo3) {} -// logFruitTuple11(); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple11(**arg_0: "apple"**, ...arg_1: AppleInfo[], arg_2: number): void -// | ---------------------------------------------------------------------- -// logFruitTuple11("apple", ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple11(arg_0: "apple", **...arg_1: AppleInfo[]**, arg_2: number): void -// | ---------------------------------------------------------------------- -// logFruitTuple11("apple", { color: "red" }, ); -// ^ -// | ---------------------------------------------------------------------- -// | logFruitTuple11(arg_0: "apple", ...arg_1: AppleInfo[], **arg_2: number**): void -// | ---------------------------------------------------------------------- -// function withPair(...[first, second]: [number, named: string]) {} -// withPair(); -// ^ -// | ---------------------------------------------------------------------- -// | withPair(**first: number**, named: string): void -// | ---------------------------------------------------------------------- -// withPair(101, ); -// ^ -// | ---------------------------------------------------------------------- -// | withPair(first: number, **named: string**): void -// | ---------------------------------------------------------------------- -[ - { - "marker": { - "Position": 251, - "LSPosition": { - "line": 11, - "character": 16 - }, - "Name": "1", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple1(fruit: \"apple\", info: AppleInfo): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "info: AppleInfo" - } - ] - }, - { - "label": "logFruitTuple1(fruit: \"banana\", info: BananaInfo): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "info: BananaInfo" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 327, - "LSPosition": { - "line": 14, - "character": 16 - }, - "Name": "2", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple2(arg_0: \"apple\", info: AppleInfo): void", - "parameters": [ - { - "label": "arg_0: \"apple\"" - }, - { - "label": "info: AppleInfo" - } - ] - }, - { - "label": "logFruitTuple2(arg_0: \"banana\", info: BananaInfo): void", - "parameters": [ - { - "label": "arg_0: \"banana\"" - }, - { - "label": "info: BananaInfo" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 355, - "LSPosition": { - "line": 15, - "character": 25 - }, - "Name": "3", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple2(arg_0: \"apple\", info: AppleInfo): void", - "parameters": [ - { - "label": "arg_0: \"apple\"" - }, - { - "label": "info: AppleInfo" - } - ] - }, - { - "label": "logFruitTuple2(arg_0: \"banana\", info: BananaInfo): void", - "parameters": [ - { - "label": "arg_0: \"banana\"" - }, - { - "label": "info: BananaInfo" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 439, - "LSPosition": { - "line": 18, - "character": 16 - }, - "Name": "4", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple3(fruit: \"apple\", rest_0: AppleInfo): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "rest_0: AppleInfo" - } - ] - }, - { - "label": "logFruitTuple3(fruit: \"banana\", rest_0: BananaInfo): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "rest_0: BananaInfo" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 467, - "LSPosition": { - "line": 19, - "character": 25 - }, - "Name": "5", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple3(fruit: \"apple\", rest_0: AppleInfo): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "rest_0: AppleInfo" - } - ] - }, - { - "label": "logFruitTuple3(fruit: \"banana\", rest_0: BananaInfo): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "rest_0: BananaInfo" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 552, - "LSPosition": { - "line": 21, - "character": 16 - }, - "Name": "6", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple4(fruit: \"apple\", info: AppleInfo): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "info: AppleInfo" - } - ] - }, - { - "label": "logFruitTuple4(fruit: \"banana\", info: BananaInfo): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "info: BananaInfo" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 580, - "LSPosition": { - "line": 22, - "character": 25 - }, - "Name": "7", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple4(fruit: \"apple\", info: AppleInfo): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "info: AppleInfo" - } - ] - }, - { - "label": "logFruitTuple4(fruit: \"banana\", info: BananaInfo): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "info: BananaInfo" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 746, - "LSPosition": { - "line": 27, - "character": 16 - }, - "Name": "8", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple5(fruit: \"apple\", ...firstInfo_n: AppleInfo[]): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...firstInfo_n: AppleInfo[]" - } - ] - }, - { - "label": "logFruitTuple5(fruit: \"banana\", ...firstInfo_n: BananaInfo[]): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...firstInfo_n: BananaInfo[]" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 774, - "LSPosition": { - "line": 28, - "character": 25 - }, - "Name": "9", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple5(fruit: \"apple\", ...firstInfo_n: AppleInfo[]): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...firstInfo_n: AppleInfo[]" - } - ] - }, - { - "label": "logFruitTuple5(fruit: \"banana\", ...firstInfo_n: BananaInfo[]): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...firstInfo_n: BananaInfo[]" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 863, - "LSPosition": { - "line": 31, - "character": 16 - }, - "Name": "10", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple6(fruit: \"apple\", ...fruitInfo: AppleInfo[]): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...fruitInfo: AppleInfo[]" - } - ] - }, - { - "label": "logFruitTuple6(fruit: \"banana\", ...fruitInfo: BananaInfo[]): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...fruitInfo: BananaInfo[]" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 891, - "LSPosition": { - "line": 32, - "character": 25 - }, - "Name": "11", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple6(fruit: \"apple\", ...fruitInfo: AppleInfo[]): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...fruitInfo: AppleInfo[]" - } - ] - }, - { - "label": "logFruitTuple6(fruit: \"banana\", ...fruitInfo: BananaInfo[]): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...fruitInfo: BananaInfo[]" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 1106, - "LSPosition": { - "line": 37, - "character": 16 - }, - "Name": "12", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple7(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...fruitInfoOrNumber_n: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple7(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...fruitInfoOrNumber_n: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1134, - "LSPosition": { - "line": 38, - "character": 25 - }, - "Name": "13", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple7(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...fruitInfoOrNumber_n: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple7(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...fruitInfoOrNumber_n: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 1180, - "LSPosition": { - "line": 39, - "character": 43 - }, - "Name": "14", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple7(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...fruitInfoOrNumber_n: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple7(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...fruitInfoOrNumber_n: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 2 - } - }, - { - "marker": { - "Position": 1282, - "LSPosition": { - "line": 42, - "character": 16 - }, - "Name": "15", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple8(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...arg_1: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple8(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...arg_1: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1310, - "LSPosition": { - "line": 43, - "character": 25 - }, - "Name": "16", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple8(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...arg_1: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple8(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...arg_1: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 1356, - "LSPosition": { - "line": 44, - "character": 43 - }, - "Name": "17", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple8(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...arg_1: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple8(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...arg_1: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 2 - } - }, - { - "marker": { - "Position": 1480, - "LSPosition": { - "line": 47, - "character": 16 - }, - "Name": "18", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple9(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...fruitInfoOrNumber_n: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple9(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...fruitInfoOrNumber_n: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1508, - "LSPosition": { - "line": 48, - "character": 25 - }, - "Name": "19", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple9(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...fruitInfoOrNumber_n: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple9(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...fruitInfoOrNumber_n: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 1554, - "LSPosition": { - "line": 49, - "character": 43 - }, - "Name": "20", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple9(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...fruitInfoOrNumber_n: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple9(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...fruitInfoOrNumber_n: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 2 - } - }, - { - "marker": { - "Position": 1660, - "LSPosition": { - "line": 52, - "character": 17 - }, - "Name": "21", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple10(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...arg_1: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple10(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...arg_1: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1689, - "LSPosition": { - "line": 53, - "character": 26 - }, - "Name": "22", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple10(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...arg_1: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple10(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...arg_1: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 1736, - "LSPosition": { - "line": 54, - "character": 44 - }, - "Name": "23", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple10(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"apple\"" - }, - { - "label": "...arg_1: AppleInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - }, - { - "label": "logFruitTuple10(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", - "parameters": [ - { - "label": "fruit: \"banana\"" - }, - { - "label": "...arg_1: BananaInfo[]" - }, - { - "label": "secondFruitInfoOrNumber: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 2 - } - }, - { - "marker": { - "Position": 1808, - "LSPosition": { - "line": 57, - "character": 17 - }, - "Name": "24", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple11(arg_0: \"apple\", ...arg_1: AppleInfo[], arg_2: number): void", - "parameters": [ - { - "label": "arg_0: \"apple\"" - }, - { - "label": "...arg_1: AppleInfo[]" - }, - { - "label": "arg_2: number" - } - ] - }, - { - "label": "logFruitTuple11(arg_0: \"banana\", ...arg_1: BananaInfo[], arg_2: number): void", - "parameters": [ - { - "label": "arg_0: \"banana\"" - }, - { - "label": "...arg_1: BananaInfo[]" - }, - { - "label": "arg_2: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1837, - "LSPosition": { - "line": 58, - "character": 26 - }, - "Name": "25", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple11(arg_0: \"apple\", ...arg_1: AppleInfo[], arg_2: number): void", - "parameters": [ - { - "label": "arg_0: \"apple\"" - }, - { - "label": "...arg_1: AppleInfo[]" - }, - { - "label": "arg_2: number" - } - ] - }, - { - "label": "logFruitTuple11(arg_0: \"banana\", ...arg_1: BananaInfo[], arg_2: number): void", - "parameters": [ - { - "label": "arg_0: \"banana\"" - }, - { - "label": "...arg_1: BananaInfo[]" - }, - { - "label": "arg_2: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - }, - { - "marker": { - "Position": 1884, - "LSPosition": { - "line": 59, - "character": 44 - }, - "Name": "26", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "logFruitTuple11(arg_0: \"apple\", ...arg_1: AppleInfo[], arg_2: number): void", - "parameters": [ - { - "label": "arg_0: \"apple\"" - }, - { - "label": "...arg_1: AppleInfo[]" - }, - { - "label": "arg_2: number" - } - ] - }, - { - "label": "logFruitTuple11(arg_0: \"banana\", ...arg_1: BananaInfo[], arg_2: number): void", - "parameters": [ - { - "label": "arg_0: \"banana\"" - }, - { - "label": "...arg_1: BananaInfo[]" - }, - { - "label": "arg_2: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 2 - } - }, - { - "marker": { - "Position": 1964, - "LSPosition": { - "line": 61, - "character": 10 - }, - "Name": "27", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "withPair(first: number, named: string): void", - "parameters": [ - { - "label": "first: number" - }, - { - "label": "named: string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 1982, - "LSPosition": { - "line": 62, - "character": 15 - }, - "Name": "28", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "withPair(first: number, named: string): void", - "parameters": [ - { - "label": "first: number" - }, - { - "label": "named: string" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 1 - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpIteratorNext.baseline b/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpIteratorNext.baseline deleted file mode 100644 index eda29800b5..0000000000 --- a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpIteratorNext.baseline +++ /dev/null @@ -1,287 +0,0 @@ -// === SignatureHelp === -=== /signatureHelpIteratorNext.ts === -// declare const iterator: Iterator; -// -// iterator.next(); -// ^ -// | ---------------------------------------------------------------------- -// | next(): IteratorResult -// | ---------------------------------------------------------------------- -// iterator.next( 0); -// ^ -// | ---------------------------------------------------------------------- -// | next(**value: number**): IteratorResult -// | ---------------------------------------------------------------------- -// -// declare const generator: Generator; -// -// generator.next(); -// ^ -// | ---------------------------------------------------------------------- -// | next(): IteratorResult -// | ---------------------------------------------------------------------- -// generator.next( 0); -// ^ -// | ---------------------------------------------------------------------- -// | next(**value: number**): IteratorResult -// | ---------------------------------------------------------------------- -// -// declare const asyncIterator: AsyncIterator; -// -// asyncIterator.next(); -// ^ -// | ---------------------------------------------------------------------- -// | next(): Promise> -// | ---------------------------------------------------------------------- -// asyncIterator.next( 0); -// ^ -// | ---------------------------------------------------------------------- -// | next(**value: number**): Promise> -// | ---------------------------------------------------------------------- -// -// declare const asyncGenerator: AsyncGenerator; -// -// asyncGenerator.next(); -// ^ -// | ---------------------------------------------------------------------- -// | next(): Promise> -// | ---------------------------------------------------------------------- -// asyncGenerator.next( 0); -// ^ -// | ---------------------------------------------------------------------- -// | next(**value: number**): Promise> -// | ---------------------------------------------------------------------- -[ - { - "marker": { - "Position": 73, - "LSPosition": { - "line": 2, - "character": 15 - }, - "Name": "1", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "next(): IteratorResult", - "parameters": [] - }, - { - "label": "next(value: number): IteratorResult", - "parameters": [ - { - "label": "value: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 91, - "LSPosition": { - "line": 3, - "character": 15 - }, - "Name": "2", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "next(): IteratorResult", - "parameters": [] - }, - { - "label": "next(value: number): IteratorResult", - "parameters": [ - { - "label": "value: number" - } - ] - } - ], - "activeSignature": 1, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 173, - "LSPosition": { - "line": 7, - "character": 16 - }, - "Name": "3", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "next(): IteratorResult", - "parameters": [] - }, - { - "label": "next(value: number): IteratorResult", - "parameters": [ - { - "label": "value: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 192, - "LSPosition": { - "line": 8, - "character": 16 - }, - "Name": "4", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "next(): IteratorResult", - "parameters": [] - }, - { - "label": "next(value: number): IteratorResult", - "parameters": [ - { - "label": "value: number" - } - ] - } - ], - "activeSignature": 1, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 286, - "LSPosition": { - "line": 12, - "character": 20 - }, - "Name": "5", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "next(): Promise>", - "parameters": [] - }, - { - "label": "next(value: number): Promise>", - "parameters": [ - { - "label": "value: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 309, - "LSPosition": { - "line": 13, - "character": 20 - }, - "Name": "6", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "next(): Promise>", - "parameters": [] - }, - { - "label": "next(value: number): Promise>", - "parameters": [ - { - "label": "value: number" - } - ] - } - ], - "activeSignature": 1, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 406, - "LSPosition": { - "line": 17, - "character": 21 - }, - "Name": "7", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "next(): Promise>", - "parameters": [] - }, - { - "label": "next(value: number): Promise>", - "parameters": [ - { - "label": "value: number" - } - ] - } - ], - "activeSignature": 0, - "activeParameter": 0 - } - }, - { - "marker": { - "Position": 430, - "LSPosition": { - "line": 18, - "character": 21 - }, - "Name": "8", - "Data": {} - }, - "item": { - "signatures": [ - { - "label": "next(): Promise>", - "parameters": [] - }, - { - "label": "next(value: number): Promise>", - "parameters": [ - { - "label": "value: number" - } - ] - } - ], - "activeSignature": 1, - "activeParameter": 0 - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/signatureHelp/JsDocDontBreakWithNamespaces.baseline b/testdata/baselines/reference/fourslash/signatureHelp/jsDocDontBreakWithNamespaces.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/JsDocDontBreakWithNamespaces.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/jsDocDontBreakWithNamespaces.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/JsDocFunctionSignatures5.baseline b/testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures5.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/JsDocFunctionSignatures5.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures5.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/JsDocFunctionSignatures6.baseline b/testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures6.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/JsDocFunctionSignatures6.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures6.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/JsDocSignature_43394.baseline b/testdata/baselines/reference/fourslash/signatureHelp/jsDocSignature_43394.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/JsDocSignature_43394.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/jsDocSignature_43394.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/JsdocReturnsTag.baseline b/testdata/baselines/reference/fourslash/signatureHelp/jsdocReturnsTag.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/JsdocReturnsTag.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/jsdocReturnsTag.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/QuickInfoJsDocTags13.baseline b/testdata/baselines/reference/fourslash/signatureHelp/quickInfoJsDocTags13.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/QuickInfoJsDocTags13.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/quickInfoJsDocTags13.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/quickInfoJsDocTextFormatting1.baseline b/testdata/baselines/reference/fourslash/signatureHelp/quickInfoJsDocTextFormatting1.baseline new file mode 100644 index 0000000000..6357790f74 --- /dev/null +++ b/testdata/baselines/reference/fourslash/signatureHelp/quickInfoJsDocTextFormatting1.baseline @@ -0,0 +1,205 @@ +// === SignatureHelp === +=== /quickInfoJsDocTextFormatting1.ts === +// /** +// * @param {number} var1 **Highlighted text** +// * @param {string} var2 Another **Highlighted text** +// */ +// function f1(var1, var2) { } +// +// /** +// * @param {number} var1 *Regular text with an asterisk +// * @param {string} var2 Another *Regular text with an asterisk +// */ +// function f2(var1, var2) { } +// +// /** +// * @param {number} var1 +// * *Regular text with an asterisk +// * @param {string} var2 +// * Another *Regular text with an asterisk +// */ +// function f3(var1, var2) { } +// +// /** +// * @param {number} var1 +// * **Highlighted text** +// * @param {string} var2 +// * Another **Highlighted text** +// */ +// function f4(var1, var2) { } +// +// /** +// * @param {number} var1 +// **Highlighted text** +// * @param {string} var2 +// Another **Highlighted text** +// */ +// function f5(var1, var2) { } +// +// f1(); +// ^ +// | ---------------------------------------------------------------------- +// | f1(**var1: any**, var2: any): void +// | ---------------------------------------------------------------------- +// f2(); +// ^ +// | ---------------------------------------------------------------------- +// | f2(**var1: any**, var2: any): void +// | ---------------------------------------------------------------------- +// f3(); +// ^ +// | ---------------------------------------------------------------------- +// | f3(**var1: any**, var2: any): void +// | ---------------------------------------------------------------------- +// f4(); +// ^ +// | ---------------------------------------------------------------------- +// | f4(**var1: any**, var2: any): void +// | ---------------------------------------------------------------------- +// f5(); +// ^ +// | ---------------------------------------------------------------------- +// | f5(**var1: any**, var2: any): void +// | ---------------------------------------------------------------------- +[ + { + "marker": { + "Position": 731, + "LSPosition": { + "line": 36, + "character": 3 + }, + "Name": "1", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "f1(var1: any, var2: any): void", + "parameters": [ + { + "label": "var1: any" + }, + { + "label": "var2: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 737, + "LSPosition": { + "line": 37, + "character": 3 + }, + "Name": "2", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "f2(var1: any, var2: any): void", + "parameters": [ + { + "label": "var1: any" + }, + { + "label": "var2: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 743, + "LSPosition": { + "line": 38, + "character": 3 + }, + "Name": "3", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "f3(var1: any, var2: any): void", + "parameters": [ + { + "label": "var1: any" + }, + { + "label": "var2: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 749, + "LSPosition": { + "line": 39, + "character": 3 + }, + "Name": "4", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "f4(var1: any, var2: any): void", + "parameters": [ + { + "label": "var1: any" + }, + { + "label": "var2: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 755, + "LSPosition": { + "line": 40, + "character": 3 + }, + "Name": "5", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "f5(var1: any, var2: any): void", + "parameters": [ + { + "label": "var1: any" + }, + { + "label": "var2: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpAfterParameter.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpAfterParameter.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpAfterParameter.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpAfterParameter.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsClass.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClass.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsClass.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClass.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsClassMembers.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClassMembers.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsClassMembers.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClassMembers.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsCommentParsing.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsCommentParsing.baseline new file mode 100644 index 0000000000..8605101040 --- /dev/null +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsCommentParsing.baseline @@ -0,0 +1,1658 @@ +// === SignatureHelp === +=== /signatureHelpCommentsCommentParsing.ts === +// /// This is simple /// comments +// function simple() { +// } +// +// simple( ); +// ^ +// | ---------------------------------------------------------------------- +// | simple(): void +// | ---------------------------------------------------------------------- +// +// /// multiLine /// Comments +// /// This is example of multiline /// comments +// /// Another multiLine +// function multiLine() { +// } +// multiLine( ); +// ^ +// | ---------------------------------------------------------------------- +// | multiLine(): void +// | ---------------------------------------------------------------------- +// +// /** this is eg of single line jsdoc style comment */ +// function jsDocSingleLine() { +// } +// jsDocSingleLine(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocSingleLine(): void +// | ---------------------------------------------------------------------- +// +// +// /** this is multiple line jsdoc stule comment +// *New line1 +// *New Line2*/ +// function jsDocMultiLine() { +// } +// jsDocMultiLine(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMultiLine(): void +// | ---------------------------------------------------------------------- +// +// /** multiple line jsdoc comments no longer merge +// *New line1 +// *New Line2*/ +// /** Shoul mege this line as well +// * and this too*/ /** Another this one too*/ +// function jsDocMultiLineMerge() { +// } +// jsDocMultiLineMerge(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMultiLineMerge(): void +// | ---------------------------------------------------------------------- +// +// +// /// Triple slash comment +// /** jsdoc comment */ +// function jsDocMixedComments1() { +// } +// jsDocMixedComments1(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments1(): void +// | ---------------------------------------------------------------------- +// +// /// Triple slash comment +// /** jsdoc comment */ /** another jsDocComment*/ +// function jsDocMixedComments2() { +// } +// jsDocMixedComments2(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments2(): void +// | ---------------------------------------------------------------------- +// +// /** jsdoc comment */ /*** triplestar jsDocComment*/ +// /// Triple slash comment +// function jsDocMixedComments3() { +// } +// jsDocMixedComments3(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments3(): void +// | ---------------------------------------------------------------------- +// +// /** jsdoc comment */ /** another jsDocComment*/ +// /// Triple slash comment +// /// Triple slash comment 2 +// function jsDocMixedComments4() { +// } +// jsDocMixedComments4(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments4(): void +// | ---------------------------------------------------------------------- +// +// /// Triple slash comment 1 +// /** jsdoc comment */ /** another jsDocComment*/ +// /// Triple slash comment +// /// Triple slash comment 2 +// function jsDocMixedComments5() { +// } +// jsDocMixedComments5(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments5(): void +// | ---------------------------------------------------------------------- +// +// /** another jsDocComment*/ +// /// Triple slash comment 1 +// /// Triple slash comment +// /// Triple slash comment 2 +// /** jsdoc comment */ +// function jsDocMixedComments6() { +// } +// jsDocMixedComments6(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments6(): void +// | ---------------------------------------------------------------------- +// +// // This shoulnot be help comment +// function noHelpComment1() { +// } +// noHelpComment1(); +// ^ +// | ---------------------------------------------------------------------- +// | noHelpComment1(): void +// | ---------------------------------------------------------------------- +// +// /* This shoulnot be help comment */ +// function noHelpComment2() { +// } +// noHelpComment2(); +// ^ +// | ---------------------------------------------------------------------- +// | noHelpComment2(): void +// | ---------------------------------------------------------------------- +// +// function noHelpComment3() { +// } +// noHelpComment3(); +// ^ +// | ---------------------------------------------------------------------- +// | noHelpComment3(): void +// | ---------------------------------------------------------------------- +// /** Adds two integers and returns the result +// * @param {number} a first number +// * @param b second number +// */ +// function sum(a: number, b: number) { +// return a + b; +// } +// sum(10, 20); +// ^ +// | ---------------------------------------------------------------------- +// | sum(**a: number**, b: number): number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | sum(a: number, **b: number**): number +// | ---------------------------------------------------------------------- +// /** This is multiplication function +// * @param +// * @param a first number +// * @param b +// * @param c { +// @param d @anotherTag +// * @param e LastParam @anotherTag*/ +// function multiply(a: number, b: number, c?: number, d?, e?) { +// } +// multiply(10, 20, 30, 40, 50); +// ^ +// | ---------------------------------------------------------------------- +// | multiply(**a: number**, b: number, c?: number, d?: any, e?: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | multiply(a: number, **b: number**, c?: number, d?: any, e?: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | multiply(a: number, b: number, **c?: number**, d?: any, e?: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | multiply(a: number, b: number, c?: number, **d?: any**, e?: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | multiply(a: number, b: number, c?: number, d?: any, **e?: any**): void +// | ---------------------------------------------------------------------- +// /** fn f1 with number +// * @param { string} b about b +// */ +// function f1(a: number); +// function f1(b: string); +// /**@param opt optional parameter*/ +// function f1(aOrb, opt?) { +// return aOrb; +// } +// f1(10); +// ^ +// | ---------------------------------------------------------------------- +// | f1(**a: number**): any +// | ---------------------------------------------------------------------- +// f1("hello"); +// ^ +// | ---------------------------------------------------------------------- +// | f1(**b: string**): any +// | ---------------------------------------------------------------------- +// +// /** This is subtract function +// @param { a +// *@param { number | } b this is about b +// @param { { () => string; } } c this is optional param c +// @param { { () => string; } d this is optional param d +// @param { { () => string; } } e this is optional param e +// @param { { { () => string; } } f this is optional param f +// */ +// function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) { +// } +// subtract(10, 20, null, null, null, null); +// ^ +// | ---------------------------------------------------------------------- +// | subtract(**a: number**, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | subtract(a: number, **b: number**, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | subtract(a: number, b: number, **c?: () => string**, d?: () => string, e?: () => string, f?: () => string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | subtract(a: number, b: number, c?: () => string, **d?: () => string**, e?: () => string, f?: () => string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | subtract(a: number, b: number, c?: () => string, d?: () => string, **e?: () => string**, f?: () => string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, **f?: () => string**): void +// | ---------------------------------------------------------------------- +// /** this is square function +// @paramTag { number } a this is input number of paramTag +// @param { number } a this is input number +// @returnType { number } it is return type +// */ +// function square(a: number) { +// return a * a; +// } +// square(10); +// ^ +// | ---------------------------------------------------------------------- +// | square(**a: number**): number +// | ---------------------------------------------------------------------- +// /** this is divide function +// @param { number} a this is a +// @paramTag { number } g this is optional param g +// @param { number} b this is b +// */ +// function divide(a: number, b: number) { +// } +// divide(10, 20); +// ^ +// | ---------------------------------------------------------------------- +// | divide(**a: number**, b: number): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | divide(a: number, **b: number**): void +// | ---------------------------------------------------------------------- +// /** +// Function returns string concat of foo and bar +// @param {string} foo is string +// @param {string} bar is second string +// */ +// function fooBar(foo: string, bar: string) { +// return foo + bar; +// } +// fooBar("foo","bar"); +// ^ +// | ---------------------------------------------------------------------- +// | fooBar(**foo: string**, bar: string): string +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | fooBar(foo: string, **bar: string**): string +// | ---------------------------------------------------------------------- +// /** This is a comment */ +// var x; +// /** +// * This is a comment +// */ +// var y; +// /** this is jsdoc style function with param tag as well as inline parameter help +// *@param a it is first parameter +// *@param c it is third parameter +// */ +// function jsDocParamTest(/** this is inline comment for a */a: number, /** this is inline comment for b*/ b: number, c: number, d: number) { +// return a + b + c + d; +// ^ +// | ---------------------------------------------------------------------- +// | No signaturehelp at /*39*/. +// | ---------------------------------------------------------------------- +// } +// jsDocParamTest(30, 40, 50, 60); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocParamTest(**a: number**, b: number, c: number, d: number): number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | jsDocParamTest(a: number, **b: number**, c: number, d: number): number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | jsDocParamTest(a: number, b: number, **c: number**, d: number): number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | jsDocParamTest(a: number, b: number, c: number, **d: number**): number +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And properly aligned comment +// */ +// function jsDocCommentAlignmentTest1() { +// } +// jsDocCommentAlignmentTest1(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocCommentAlignmentTest1(): void +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And aligned with 4 space char margin +// */ +// function jsDocCommentAlignmentTest2() { +// } +// jsDocCommentAlignmentTest2(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocCommentAlignmentTest2(): void +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And aligned with 4 space char margin +// * @param {string} a this is info about a +// * spanning on two lines and aligned perfectly +// * @param b this is info about b +// * spanning on two lines and aligned perfectly +// * spanning one more line alined perfectly +// * spanning another line with more margin +// * @param c this is info about b +// * not aligned text about parameter will eat only one space +// */ +// function jsDocCommentAlignmentTest3(a: string, b, c) { +// } +// jsDocCommentAlignmentTest3("hello",1, 2); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocCommentAlignmentTest3(**a: string**, b: any, c: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | jsDocCommentAlignmentTest3(a: string, **b: any**, c: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | jsDocCommentAlignmentTest3(a: string, b: any, **c: any**): void +// | ---------------------------------------------------------------------- +// +// ^ +// | ---------------------------------------------------------------------- +// | No signaturehelp at /**/. +// | ---------------------------------------------------------------------- +// class NoQuickInfoClass { +// } +[ + { + "marker": { + "Position": 63, + "LSPosition": { + "line": 4, + "character": 8 + }, + "Name": "1", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "simple(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 198, + "LSPosition": { + "line": 11, + "character": 11 + }, + "Name": "2", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "multiLine(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 302, + "LSPosition": { + "line": 16, + "character": 16 + }, + "Name": "3", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocSingleLine(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 422, + "LSPosition": { + "line": 24, + "character": 15 + }, + "Name": "4", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocMultiLine(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 631, + "LSPosition": { + "line": 33, + "character": 20 + }, + "Name": "5", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocMultiLineMerge(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 737, + "LSPosition": { + "line": 40, + "character": 20 + }, + "Name": "6", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocMixedComments1(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 869, + "LSPosition": { + "line": 46, + "character": 20 + }, + "Name": "7", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocMixedComments2(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1005, + "LSPosition": { + "line": 52, + "character": 20 + }, + "Name": "8", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocMixedComments3(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1164, + "LSPosition": { + "line": 59, + "character": 20 + }, + "Name": "9", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocMixedComments4(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1350, + "LSPosition": { + "line": 67, + "character": 20 + }, + "Name": "10", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocMixedComments5(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1536, + "LSPosition": { + "line": 76, + "character": 20 + }, + "Name": "11", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocMixedComments6(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1618, + "LSPosition": { + "line": 81, + "character": 15 + }, + "Name": "12", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "noHelpComment1(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1703, + "LSPosition": { + "line": 86, + "character": 15 + }, + "Name": "13", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "noHelpComment2(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1752, + "LSPosition": { + "line": 90, + "character": 15 + }, + "Name": "14", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "noHelpComment3(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1928, + "LSPosition": { + "line": 98, + "character": 4 + }, + "Name": "16", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "sum(a: number, b: number): number", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1932, + "LSPosition": { + "line": 98, + "character": 8 + }, + "Name": "17", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "sum(a: number, b: number): number", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 2165, + "LSPosition": { + "line": 108, + "character": 9 + }, + "Name": "19", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: number" + }, + { + "label": "d?: any" + }, + { + "label": "e?: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 2168, + "LSPosition": { + "line": 108, + "character": 12 + }, + "Name": "20", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: number" + }, + { + "label": "d?: any" + }, + { + "label": "e?: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 2172, + "LSPosition": { + "line": 108, + "character": 16 + }, + "Name": "21", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: number" + }, + { + "label": "d?: any" + }, + { + "label": "e?: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 2 + } + }, + { + "marker": { + "Position": 2177, + "LSPosition": { + "line": 108, + "character": 21 + }, + "Name": "22", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: number" + }, + { + "label": "d?: any" + }, + { + "label": "e?: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 3 + } + }, + { + "marker": { + "Position": 2181, + "LSPosition": { + "line": 108, + "character": 25 + }, + "Name": "23", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: number" + }, + { + "label": "d?: any" + }, + { + "label": "e?: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 4 + } + }, + { + "marker": { + "Position": 2371, + "LSPosition": { + "line": 118, + "character": 3 + }, + "Name": "25", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "f1(a: number): any", + "parameters": [ + { + "label": "a: number" + } + ] + }, + { + "label": "f1(b: string): any", + "parameters": [ + { + "label": "b: string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 2379, + "LSPosition": { + "line": 119, + "character": 3 + }, + "Name": "26", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "f1(a: number): any", + "parameters": [ + { + "label": "a: number" + } + ] + }, + { + "label": "f1(b: string): any", + "parameters": [ + { + "label": "b: string" + } + ] + } + ], + "activeSignature": 1, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 2822, + "LSPosition": { + "line": 131, + "character": 9 + }, + "Name": "28", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: () => string" + }, + { + "label": "d?: () => string" + }, + { + "label": "e?: () => string" + }, + { + "label": "f?: () => string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 2826, + "LSPosition": { + "line": 131, + "character": 13 + }, + "Name": "29", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: () => string" + }, + { + "label": "d?: () => string" + }, + { + "label": "e?: () => string" + }, + { + "label": "f?: () => string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 2831, + "LSPosition": { + "line": 131, + "character": 18 + }, + "Name": "30", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: () => string" + }, + { + "label": "d?: () => string" + }, + { + "label": "e?: () => string" + }, + { + "label": "f?: () => string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 2 + } + }, + { + "marker": { + "Position": 2838, + "LSPosition": { + "line": 131, + "character": 25 + }, + "Name": "31", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: () => string" + }, + { + "label": "d?: () => string" + }, + { + "label": "e?: () => string" + }, + { + "label": "f?: () => string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 3 + } + }, + { + "marker": { + "Position": 2845, + "LSPosition": { + "line": 131, + "character": 32 + }, + "Name": "32", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: () => string" + }, + { + "label": "d?: () => string" + }, + { + "label": "e?: () => string" + }, + { + "label": "f?: () => string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 4 + } + }, + { + "marker": { + "Position": 2852, + "LSPosition": { + "line": 131, + "character": 39 + }, + "Name": "33", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c?: () => string" + }, + { + "label": "d?: () => string" + }, + { + "label": "e?: () => string" + }, + { + "label": "f?: () => string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 5 + } + }, + { + "marker": { + "Position": 3084, + "LSPosition": { + "line": 140, + "character": 7 + }, + "Name": "34", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "square(a: number): number", + "parameters": [ + { + "label": "a: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 3275, + "LSPosition": { + "line": 148, + "character": 7 + }, + "Name": "35", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "divide(a: number, b: number): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 3279, + "LSPosition": { + "line": 148, + "character": 11 + }, + "Name": "36", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "divide(a: number, b: number): void", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 3490, + "LSPosition": { + "line": 157, + "character": 7 + }, + "Name": "37", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "fooBar(foo: string, bar: string): string", + "parameters": [ + { + "label": "foo: string" + }, + { + "label": "bar: string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 3496, + "LSPosition": { + "line": 157, + "character": 13 + }, + "Name": "38", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "fooBar(foo: string, bar: string): string", + "parameters": [ + { + "label": "foo: string" + }, + { + "label": "bar: string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 3873, + "LSPosition": { + "line": 169, + "character": 11 + }, + "Name": "39", + "Data": {} + }, + "item": null + }, + { + "marker": { + "Position": 3905, + "LSPosition": { + "line": 171, + "character": 15 + }, + "Name": "40", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c: number" + }, + { + "label": "d: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 3909, + "LSPosition": { + "line": 171, + "character": 19 + }, + "Name": "41", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c: number" + }, + { + "label": "d: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 3913, + "LSPosition": { + "line": 171, + "character": 23 + }, + "Name": "42", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c: number" + }, + { + "label": "d: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 2 + } + }, + { + "marker": { + "Position": 3917, + "LSPosition": { + "line": 171, + "character": 27 + }, + "Name": "43", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", + "parameters": [ + { + "label": "a: number" + }, + { + "label": "b: number" + }, + { + "label": "c: number" + }, + { + "label": "d: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 3 + } + }, + { + "marker": { + "Position": 4058, + "LSPosition": { + "line": 177, + "character": 27 + }, + "Name": "45", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocCommentAlignmentTest1(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 4209, + "LSPosition": { + "line": 183, + "character": 27 + }, + "Name": "46", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocCommentAlignmentTest2(): void", + "parameters": [] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 4825, + "LSPosition": { + "line": 197, + "character": 27 + }, + "Name": "47", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocCommentAlignmentTest3(a: string, b: any, c: any): void", + "parameters": [ + { + "label": "a: string" + }, + { + "label": "b: any" + }, + { + "label": "c: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 4833, + "LSPosition": { + "line": 197, + "character": 35 + }, + "Name": "48", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocCommentAlignmentTest3(a: string, b: any, c: any): void", + "parameters": [ + { + "label": "a: string" + }, + { + "label": "b: any" + }, + { + "label": "c: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 4836, + "LSPosition": { + "line": 197, + "character": 38 + }, + "Name": "49", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "jsDocCommentAlignmentTest3(a: string, b: any, c: any): void", + "parameters": [ + { + "label": "a: string" + }, + { + "label": "b: any" + }, + { + "label": "c: any" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 2 + } + }, + { + "marker": { + "Position": 4840, + "LSPosition": { + "line": 198, + "character": 0 + }, + "Name": "", + "Data": {} + }, + "item": null + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsFunctionDeclaration.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionDeclaration.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsFunctionDeclaration.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionDeclaration.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsFunctionExpression.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionExpression.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpCommentsFunctionExpression.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionExpression.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpConstructorCallParamProperties.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpConstructorCallParamProperties.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpConstructorCallParamProperties.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpConstructorCallParamProperties.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpExpandedRestTuplesLocalLabels1.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpExpandedRestTuplesLocalLabels1.baseline new file mode 100644 index 0000000000..5ed475ad94 --- /dev/null +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpExpandedRestTuplesLocalLabels1.baseline @@ -0,0 +1,1339 @@ +// === SignatureHelp === +=== /signatureHelpExpandedRestTuplesLocalLabels1.ts === +// interface AppleInfo { +// color: "green" | "red"; +// } +// +// interface BananaInfo { +// curvature: number; +// } +// +// type FruitAndInfo1 = ["apple", AppleInfo] | ["banana", BananaInfo]; +// +// function logFruitTuple1(...[fruit, info]: FruitAndInfo1) {} +// logFruitTuple1(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple1(**fruit: "apple"**, info: AppleInfo): void +// | ---------------------------------------------------------------------- +// +// function logFruitTuple2(...[, info]: FruitAndInfo1) {} +// logFruitTuple2(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple2(**arg_0: "apple"**, info: AppleInfo): void +// | ---------------------------------------------------------------------- +// logFruitTuple2("apple", ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple2(arg_0: "apple", **info: AppleInfo**): void +// | ---------------------------------------------------------------------- +// +// function logFruitTuple3(...[fruit, ...rest]: FruitAndInfo1) {} +// logFruitTuple3(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple3(**fruit: "apple"**, rest_0: AppleInfo): void +// | ---------------------------------------------------------------------- +// logFruitTuple3("apple", ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple3(fruit: "apple", **rest_0: AppleInfo**): void +// | ---------------------------------------------------------------------- +// function logFruitTuple4(...[fruit, ...[info]]: FruitAndInfo1) {} +// logFruitTuple4(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple4(**fruit: "apple"**, info: AppleInfo): void +// | ---------------------------------------------------------------------- +// logFruitTuple4("apple", ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple4(fruit: "apple", **info: AppleInfo**): void +// | ---------------------------------------------------------------------- +// +// type FruitAndInfo2 = ["apple", ...AppleInfo[]] | ["banana", ...BananaInfo[]]; +// +// function logFruitTuple5(...[fruit, firstInfo]: FruitAndInfo2) {} +// logFruitTuple5(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple5(**fruit: "apple"**, ...firstInfo_n: AppleInfo[]): void +// | ---------------------------------------------------------------------- +// logFruitTuple5("apple", ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple5(fruit: "apple", **...firstInfo_n: AppleInfo[]**): void +// | ---------------------------------------------------------------------- +// +// function logFruitTuple6(...[fruit, ...fruitInfo]: FruitAndInfo2) {} +// logFruitTuple6(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple6(**fruit: "apple"**, ...fruitInfo: AppleInfo[]): void +// | ---------------------------------------------------------------------- +// logFruitTuple6("apple", ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple6(fruit: "apple", **...fruitInfo: AppleInfo[]**): void +// | ---------------------------------------------------------------------- +// +// type FruitAndInfo3 = ["apple", ...AppleInfo[], number] | ["banana", ...BananaInfo[], number]; +// +// function logFruitTuple7(...[fruit, fruitInfoOrNumber, secondFruitInfoOrNumber]: FruitAndInfo3) {} +// logFruitTuple7(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple7(**fruit: "apple"**, ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void +// | ---------------------------------------------------------------------- +// logFruitTuple7("apple", ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple7(fruit: "apple", **...fruitInfoOrNumber_n: AppleInfo[]**, secondFruitInfoOrNumber: number): void +// | ---------------------------------------------------------------------- +// logFruitTuple7("apple", { color: "red" }, ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple7(fruit: "apple", ...fruitInfoOrNumber_n: AppleInfo[], **secondFruitInfoOrNumber: number**): void +// | ---------------------------------------------------------------------- +// +// function logFruitTuple8(...[fruit, , secondFruitInfoOrNumber]: FruitAndInfo3) {} +// logFruitTuple8(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple8(**fruit: "apple"**, ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void +// | ---------------------------------------------------------------------- +// logFruitTuple8("apple", ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple8(fruit: "apple", **...arg_1: AppleInfo[]**, secondFruitInfoOrNumber: number): void +// | ---------------------------------------------------------------------- +// logFruitTuple8("apple", { color: "red" }, ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple8(fruit: "apple", ...arg_1: AppleInfo[], **secondFruitInfoOrNumber: number**): void +// | ---------------------------------------------------------------------- +// +// function logFruitTuple9(...[...[fruit, fruitInfoOrNumber, secondFruitInfoOrNumber]]: FruitAndInfo3) {} +// logFruitTuple9(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple9(**fruit: "apple"**, ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void +// | ---------------------------------------------------------------------- +// logFruitTuple9("apple", ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple9(fruit: "apple", **...fruitInfoOrNumber_n: AppleInfo[]**, secondFruitInfoOrNumber: number): void +// | ---------------------------------------------------------------------- +// logFruitTuple9("apple", { color: "red" }, ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple9(fruit: "apple", ...fruitInfoOrNumber_n: AppleInfo[], **secondFruitInfoOrNumber: number**): void +// | ---------------------------------------------------------------------- +// +// function logFruitTuple10(...[fruit, {}, secondFruitInfoOrNumber]: FruitAndInfo3) {} +// logFruitTuple10(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple10(**fruit: "apple"**, ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void +// | ---------------------------------------------------------------------- +// logFruitTuple10("apple", ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple10(fruit: "apple", **...arg_1: AppleInfo[]**, secondFruitInfoOrNumber: number): void +// | ---------------------------------------------------------------------- +// logFruitTuple10("apple", { color: "red" }, ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple10(fruit: "apple", ...arg_1: AppleInfo[], **secondFruitInfoOrNumber: number**): void +// | ---------------------------------------------------------------------- +// +// function logFruitTuple11(...{}: FruitAndInfo3) {} +// logFruitTuple11(); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple11(**arg_0: "apple"**, ...arg_1: AppleInfo[], arg_2: number): void +// | ---------------------------------------------------------------------- +// logFruitTuple11("apple", ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple11(arg_0: "apple", **...arg_1: AppleInfo[]**, arg_2: number): void +// | ---------------------------------------------------------------------- +// logFruitTuple11("apple", { color: "red" }, ); +// ^ +// | ---------------------------------------------------------------------- +// | logFruitTuple11(arg_0: "apple", ...arg_1: AppleInfo[], **arg_2: number**): void +// | ---------------------------------------------------------------------- +// function withPair(...[first, second]: [number, named: string]) {} +// withPair(); +// ^ +// | ---------------------------------------------------------------------- +// | withPair(**first: number**, named: string): void +// | ---------------------------------------------------------------------- +// withPair(101, ); +// ^ +// | ---------------------------------------------------------------------- +// | withPair(first: number, **named: string**): void +// | ---------------------------------------------------------------------- +[ + { + "marker": { + "Position": 242, + "LSPosition": { + "line": 11, + "character": 15 + }, + "Name": "1", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple1(fruit: \"apple\", info: AppleInfo): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "info: AppleInfo" + } + ] + }, + { + "label": "logFruitTuple1(fruit: \"banana\", info: BananaInfo): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "info: BananaInfo" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 316, + "LSPosition": { + "line": 14, + "character": 15 + }, + "Name": "2", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple2(arg_0: \"apple\", info: AppleInfo): void", + "parameters": [ + { + "label": "arg_0: \"apple\"" + }, + { + "label": "info: AppleInfo" + } + ] + }, + { + "label": "logFruitTuple2(arg_0: \"banana\", info: BananaInfo): void", + "parameters": [ + { + "label": "arg_0: \"banana\"" + }, + { + "label": "info: BananaInfo" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 343, + "LSPosition": { + "line": 15, + "character": 24 + }, + "Name": "3", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple2(arg_0: \"apple\", info: AppleInfo): void", + "parameters": [ + { + "label": "arg_0: \"apple\"" + }, + { + "label": "info: AppleInfo" + } + ] + }, + { + "label": "logFruitTuple2(arg_0: \"banana\", info: BananaInfo): void", + "parameters": [ + { + "label": "arg_0: \"banana\"" + }, + { + "label": "info: BananaInfo" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 425, + "LSPosition": { + "line": 18, + "character": 15 + }, + "Name": "4", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple3(fruit: \"apple\", rest_0: AppleInfo): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "rest_0: AppleInfo" + } + ] + }, + { + "label": "logFruitTuple3(fruit: \"banana\", rest_0: BananaInfo): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "rest_0: BananaInfo" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 452, + "LSPosition": { + "line": 19, + "character": 24 + }, + "Name": "5", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple3(fruit: \"apple\", rest_0: AppleInfo): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "rest_0: AppleInfo" + } + ] + }, + { + "label": "logFruitTuple3(fruit: \"banana\", rest_0: BananaInfo): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "rest_0: BananaInfo" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 535, + "LSPosition": { + "line": 21, + "character": 15 + }, + "Name": "6", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple4(fruit: \"apple\", info: AppleInfo): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "info: AppleInfo" + } + ] + }, + { + "label": "logFruitTuple4(fruit: \"banana\", info: BananaInfo): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "info: BananaInfo" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 562, + "LSPosition": { + "line": 22, + "character": 24 + }, + "Name": "7", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple4(fruit: \"apple\", info: AppleInfo): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "info: AppleInfo" + } + ] + }, + { + "label": "logFruitTuple4(fruit: \"banana\", info: BananaInfo): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "info: BananaInfo" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 725, + "LSPosition": { + "line": 27, + "character": 15 + }, + "Name": "8", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple5(fruit: \"apple\", ...firstInfo_n: AppleInfo[]): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...firstInfo_n: AppleInfo[]" + } + ] + }, + { + "label": "logFruitTuple5(fruit: \"banana\", ...firstInfo_n: BananaInfo[]): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...firstInfo_n: BananaInfo[]" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 752, + "LSPosition": { + "line": 28, + "character": 24 + }, + "Name": "9", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple5(fruit: \"apple\", ...firstInfo_n: AppleInfo[]): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...firstInfo_n: AppleInfo[]" + } + ] + }, + { + "label": "logFruitTuple5(fruit: \"banana\", ...firstInfo_n: BananaInfo[]): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...firstInfo_n: BananaInfo[]" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 839, + "LSPosition": { + "line": 31, + "character": 15 + }, + "Name": "10", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple6(fruit: \"apple\", ...fruitInfo: AppleInfo[]): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...fruitInfo: AppleInfo[]" + } + ] + }, + { + "label": "logFruitTuple6(fruit: \"banana\", ...fruitInfo: BananaInfo[]): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...fruitInfo: BananaInfo[]" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 866, + "LSPosition": { + "line": 32, + "character": 24 + }, + "Name": "11", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple6(fruit: \"apple\", ...fruitInfo: AppleInfo[]): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...fruitInfo: AppleInfo[]" + } + ] + }, + { + "label": "logFruitTuple6(fruit: \"banana\", ...fruitInfo: BananaInfo[]): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...fruitInfo: BananaInfo[]" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 1078, + "LSPosition": { + "line": 37, + "character": 15 + }, + "Name": "12", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple7(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...fruitInfoOrNumber_n: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple7(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...fruitInfoOrNumber_n: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1105, + "LSPosition": { + "line": 38, + "character": 24 + }, + "Name": "13", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple7(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...fruitInfoOrNumber_n: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple7(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...fruitInfoOrNumber_n: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 1150, + "LSPosition": { + "line": 39, + "character": 42 + }, + "Name": "14", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple7(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...fruitInfoOrNumber_n: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple7(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...fruitInfoOrNumber_n: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 2 + } + }, + { + "marker": { + "Position": 1250, + "LSPosition": { + "line": 42, + "character": 15 + }, + "Name": "15", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple8(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...arg_1: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple8(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...arg_1: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1277, + "LSPosition": { + "line": 43, + "character": 24 + }, + "Name": "16", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple8(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...arg_1: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple8(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...arg_1: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 1322, + "LSPosition": { + "line": 44, + "character": 42 + }, + "Name": "17", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple8(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...arg_1: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple8(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...arg_1: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 2 + } + }, + { + "marker": { + "Position": 1444, + "LSPosition": { + "line": 47, + "character": 15 + }, + "Name": "18", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple9(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...fruitInfoOrNumber_n: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple9(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...fruitInfoOrNumber_n: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1471, + "LSPosition": { + "line": 48, + "character": 24 + }, + "Name": "19", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple9(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...fruitInfoOrNumber_n: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple9(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...fruitInfoOrNumber_n: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 1516, + "LSPosition": { + "line": 49, + "character": 42 + }, + "Name": "20", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple9(fruit: \"apple\", ...fruitInfoOrNumber_n: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...fruitInfoOrNumber_n: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple9(fruit: \"banana\", ...fruitInfoOrNumber_n: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...fruitInfoOrNumber_n: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 2 + } + }, + { + "marker": { + "Position": 1620, + "LSPosition": { + "line": 52, + "character": 16 + }, + "Name": "21", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple10(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...arg_1: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple10(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...arg_1: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1648, + "LSPosition": { + "line": 53, + "character": 25 + }, + "Name": "22", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple10(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...arg_1: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple10(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...arg_1: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 1694, + "LSPosition": { + "line": 54, + "character": 43 + }, + "Name": "23", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple10(fruit: \"apple\", ...arg_1: AppleInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"apple\"" + }, + { + "label": "...arg_1: AppleInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + }, + { + "label": "logFruitTuple10(fruit: \"banana\", ...arg_1: BananaInfo[], secondFruitInfoOrNumber: number): void", + "parameters": [ + { + "label": "fruit: \"banana\"" + }, + { + "label": "...arg_1: BananaInfo[]" + }, + { + "label": "secondFruitInfoOrNumber: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 2 + } + }, + { + "marker": { + "Position": 1764, + "LSPosition": { + "line": 57, + "character": 16 + }, + "Name": "24", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple11(arg_0: \"apple\", ...arg_1: AppleInfo[], arg_2: number): void", + "parameters": [ + { + "label": "arg_0: \"apple\"" + }, + { + "label": "...arg_1: AppleInfo[]" + }, + { + "label": "arg_2: number" + } + ] + }, + { + "label": "logFruitTuple11(arg_0: \"banana\", ...arg_1: BananaInfo[], arg_2: number): void", + "parameters": [ + { + "label": "arg_0: \"banana\"" + }, + { + "label": "...arg_1: BananaInfo[]" + }, + { + "label": "arg_2: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1792, + "LSPosition": { + "line": 58, + "character": 25 + }, + "Name": "25", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple11(arg_0: \"apple\", ...arg_1: AppleInfo[], arg_2: number): void", + "parameters": [ + { + "label": "arg_0: \"apple\"" + }, + { + "label": "...arg_1: AppleInfo[]" + }, + { + "label": "arg_2: number" + } + ] + }, + { + "label": "logFruitTuple11(arg_0: \"banana\", ...arg_1: BananaInfo[], arg_2: number): void", + "parameters": [ + { + "label": "arg_0: \"banana\"" + }, + { + "label": "...arg_1: BananaInfo[]" + }, + { + "label": "arg_2: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + }, + { + "marker": { + "Position": 1838, + "LSPosition": { + "line": 59, + "character": 43 + }, + "Name": "26", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "logFruitTuple11(arg_0: \"apple\", ...arg_1: AppleInfo[], arg_2: number): void", + "parameters": [ + { + "label": "arg_0: \"apple\"" + }, + { + "label": "...arg_1: AppleInfo[]" + }, + { + "label": "arg_2: number" + } + ] + }, + { + "label": "logFruitTuple11(arg_0: \"banana\", ...arg_1: BananaInfo[], arg_2: number): void", + "parameters": [ + { + "label": "arg_0: \"banana\"" + }, + { + "label": "...arg_1: BananaInfo[]" + }, + { + "label": "arg_2: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 2 + } + }, + { + "marker": { + "Position": 1916, + "LSPosition": { + "line": 61, + "character": 9 + }, + "Name": "27", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "withPair(first: number, named: string): void", + "parameters": [ + { + "label": "first: number" + }, + { + "label": "named: string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 1933, + "LSPosition": { + "line": 62, + "character": 14 + }, + "Name": "28", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "withPair(first: number, named: string): void", + "parameters": [ + { + "label": "first: number" + }, + { + "label": "named: string" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 1 + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpIteratorNext.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpIteratorNext.baseline new file mode 100644 index 0000000000..e20d663b33 --- /dev/null +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpIteratorNext.baseline @@ -0,0 +1,287 @@ +// === SignatureHelp === +=== /signatureHelpIteratorNext.ts === +// declare const iterator: Iterator; +// +// iterator.next(); +// ^ +// | ---------------------------------------------------------------------- +// | next(): IteratorResult +// | ---------------------------------------------------------------------- +// iterator.next( 0); +// ^ +// | ---------------------------------------------------------------------- +// | next(**value: number**): IteratorResult +// | ---------------------------------------------------------------------- +// +// declare const generator: Generator; +// +// generator.next(); +// ^ +// | ---------------------------------------------------------------------- +// | next(): IteratorResult +// | ---------------------------------------------------------------------- +// generator.next( 0); +// ^ +// | ---------------------------------------------------------------------- +// | next(**value: number**): IteratorResult +// | ---------------------------------------------------------------------- +// +// declare const asyncIterator: AsyncIterator; +// +// asyncIterator.next(); +// ^ +// | ---------------------------------------------------------------------- +// | next(): Promise> +// | ---------------------------------------------------------------------- +// asyncIterator.next( 0); +// ^ +// | ---------------------------------------------------------------------- +// | next(**value: number**): Promise> +// | ---------------------------------------------------------------------- +// +// declare const asyncGenerator: AsyncGenerator; +// +// asyncGenerator.next(); +// ^ +// | ---------------------------------------------------------------------- +// | next(): Promise> +// | ---------------------------------------------------------------------- +// asyncGenerator.next( 0); +// ^ +// | ---------------------------------------------------------------------- +// | next(**value: number**): Promise> +// | ---------------------------------------------------------------------- +[ + { + "marker": { + "Position": 71, + "LSPosition": { + "line": 2, + "character": 14 + }, + "Name": "1", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "next(): IteratorResult", + "parameters": [] + }, + { + "label": "next(value: number): IteratorResult", + "parameters": [ + { + "label": "value: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 88, + "LSPosition": { + "line": 3, + "character": 14 + }, + "Name": "2", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "next(): IteratorResult", + "parameters": [] + }, + { + "label": "next(value: number): IteratorResult", + "parameters": [ + { + "label": "value: number" + } + ] + } + ], + "activeSignature": 1, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 168, + "LSPosition": { + "line": 7, + "character": 15 + }, + "Name": "3", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "next(): IteratorResult", + "parameters": [] + }, + { + "label": "next(value: number): IteratorResult", + "parameters": [ + { + "label": "value: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 186, + "LSPosition": { + "line": 8, + "character": 15 + }, + "Name": "4", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "next(): IteratorResult", + "parameters": [] + }, + { + "label": "next(value: number): IteratorResult", + "parameters": [ + { + "label": "value: number" + } + ] + } + ], + "activeSignature": 1, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 278, + "LSPosition": { + "line": 12, + "character": 19 + }, + "Name": "5", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "next(): Promise>", + "parameters": [] + }, + { + "label": "next(value: number): Promise>", + "parameters": [ + { + "label": "value: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 300, + "LSPosition": { + "line": 13, + "character": 19 + }, + "Name": "6", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "next(): Promise>", + "parameters": [] + }, + { + "label": "next(value: number): Promise>", + "parameters": [ + { + "label": "value: number" + } + ] + } + ], + "activeSignature": 1, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 395, + "LSPosition": { + "line": 17, + "character": 20 + }, + "Name": "7", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "next(): Promise>", + "parameters": [] + }, + { + "label": "next(value: number): Promise>", + "parameters": [ + { + "label": "value: number" + } + ] + } + ], + "activeSignature": 0, + "activeParameter": 0 + } + }, + { + "marker": { + "Position": 418, + "LSPosition": { + "line": 18, + "character": 20 + }, + "Name": "8", + "Data": {} + }, + "item": { + "signatures": [ + { + "label": "next(): Promise>", + "parameters": [] + }, + { + "label": "next(value: number): Promise>", + "parameters": [ + { + "label": "value: number" + } + ] + } + ], + "activeSignature": 1, + "activeParameter": 0 + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpJSDocCallbackTag.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocCallbackTag.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpJSDocCallbackTag.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocCallbackTag.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpJSDocTags.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocTags.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpJSDocTags.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocTags.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpJSMissingPropertyAccess.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSMissingPropertyAccess.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpJSMissingPropertyAccess.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSMissingPropertyAccess.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpRestArgs1.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs1.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpRestArgs1.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs1.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpRestArgs2.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs2.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpRestArgs2.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs2.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpRestArgs3.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs3.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpRestArgs3.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs3.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpSkippedArgs1.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpSkippedArgs1.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpSkippedArgs1.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpSkippedArgs1.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpTypeArguments2.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpTypeArguments2.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpTypeArguments2.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpTypeArguments2.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpWithUnknown.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpWithUnknown.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelpWithUnknown.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelpWithUnknown.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/SignatureHelp_unionType.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelp_unionType.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/SignatureHelp_unionType.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/signatureHelp_unionType.baseline diff --git a/testdata/baselines/reference/fourslash/signatureHelp/TrailingCommaSignatureHelp.baseline b/testdata/baselines/reference/fourslash/signatureHelp/trailingCommaSignatureHelp.baseline similarity index 100% rename from testdata/baselines/reference/fourslash/signatureHelp/TrailingCommaSignatureHelp.baseline rename to testdata/baselines/reference/fourslash/signatureHelp/trailingCommaSignatureHelp.baseline diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/doubleUnderscoreRenames.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/doubleUnderscoreRenames.baseline.jsonc new file mode 100644 index 0000000000..56439ae8c3 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/doubleUnderscoreRenames.baseline.jsonc @@ -0,0 +1,23 @@ +// === findRenameLocations === +// === /fileA.ts === +// export function /*RENAME*/[|__fooRENAME|]() { +// } +// + +// === /fileB.ts === +// import { [|__fooRENAME|] as bar } from "./fileA"; +// +// bar(); + + + +// === findRenameLocations === +// === /fileA.ts === +// export function [|__fooRENAME|]() { +// } +// + +// === /fileB.ts === +// import { /*RENAME*/[|__fooRENAME|] as bar } from "./fileA"; +// +// bar(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllReferencesDynamicImport2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllReferencesDynamicImport2.baseline.jsonc new file mode 100644 index 0000000000..fa6c9c9cba --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllReferencesDynamicImport2.baseline.jsonc @@ -0,0 +1,17 @@ +// === findRenameLocations === +// === /foo.ts === +// export function /*RENAME*/[|barRENAME|]() { return "bar"; } +// var x = import("./foo"); +// x.then(foo => { +// foo.[|barRENAME|](); +// }) + + + +// === findRenameLocations === +// === /foo.ts === +// export function [|barRENAME|]() { return "bar"; } +// var x = import("./foo"); +// x.then(foo => { +// foo./*RENAME*/[|barRENAME|](); +// }) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllReferencesDynamicImport3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllReferencesDynamicImport3.baseline.jsonc new file mode 100644 index 0000000000..29d9e140b4 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllReferencesDynamicImport3.baseline.jsonc @@ -0,0 +1,11 @@ +// === findRenameLocations === +// === /foo.ts === +// export function /*RENAME*/[|barRENAME|]() { return "bar"; } +// import('./foo').then(({ [|barRENAME|]: bar/*END SUFFIX*/ }) => undefined); + + + +// === findRenameLocations === +// === /foo.ts === +// export function bar() { return "bar"; } +// import('./foo').then(({ /*START PREFIX*/bar: /*RENAME*/[|barRENAME|] }) => undefined); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsClassWithStaticThisAccess.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsClassWithStaticThisAccess.baseline.jsonc new file mode 100644 index 0000000000..f96fbc5b1d --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsClassWithStaticThisAccess.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /findAllRefsClassWithStaticThisAccess.ts === +// class /*RENAME*/[|CRENAME|] { +// static s() { +// this; +// } +// // --- (line: 5) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsClassWithStaticThisAccess.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsClassWithStaticThisAccess.baseline.jsonc.diff new file mode 100644 index 0000000000..29eec4cdc0 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsClassWithStaticThisAccess.baseline.jsonc.diff @@ -0,0 +1,14 @@ +--- old.findAllRefsClassWithStaticThisAccess.baseline.jsonc ++++ new.findAllRefsClassWithStaticThisAccess.baseline.jsonc +@@= skipped -3, +3 lines =@@ + // static s() { + // this; + // } +-// static get f() { +-// return this; +-// +-// function inner() { this; } +-// class Inner { x = this; } +-// } +-// } ++// // --- (line: 5) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsOnImportAliases2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsOnImportAliases2.baseline.jsonc new file mode 100644 index 0000000000..ef489e4c5e --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsOnImportAliases2.baseline.jsonc @@ -0,0 +1,56 @@ +// === findRenameLocations === +// === /a.ts === +// export class /*RENAME*/[|ClassRENAME|] {} + +// === /b.ts === +// import { [|ClassRENAME|] as C2 } from "./a"; +// var c = new C2(); + +// === /c.ts === +// export { [|ClassRENAME|] as C3 } from "./a"; + + + +// === findRenameLocations === +// === /a.ts === +// export class [|ClassRENAME|] {} + +// === /b.ts === +// import { /*RENAME*/[|ClassRENAME|] as C2 } from "./a"; +// var c = new C2(); + +// === /c.ts === +// export { [|ClassRENAME|] as C3 } from "./a"; + + + +// === findRenameLocations === +// === /a.ts === +// export class [|ClassRENAME|] {} + +// === /b.ts === +// import { [|ClassRENAME|] as C2 } from "./a"; +// var c = new C2(); + +// === /c.ts === +// export { /*RENAME*/[|ClassRENAME|] as C3 } from "./a"; + + + +// === findRenameLocations === +// === /b.ts === +// import { Class as /*RENAME*/[|C2RENAME|] } from "./a"; +// var c = new [|C2RENAME|](); + + + +// === findRenameLocations === +// === /b.ts === +// import { Class as [|C2RENAME|] } from "./a"; +// var c = new /*RENAME*/[|C2RENAME|](); + + + +// === findRenameLocations === +// === /c.ts === +// export { Class as /*RENAME*/C3 } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsOnImportAliases2.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsOnImportAliases2.baseline.jsonc.diff new file mode 100644 index 0000000000..293d6126e0 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/findAllRefsOnImportAliases2.baseline.jsonc.diff @@ -0,0 +1,8 @@ +--- old.findAllRefsOnImportAliases2.baseline.jsonc ++++ new.findAllRefsOnImportAliases2.baseline.jsonc +@@= skipped -52, +52 lines =@@ + + // === findRenameLocations === + // === /c.ts === +-// export { Class as /*RENAME*/[|C3RENAME|] } from "./a"; ++// export { Class as /*RENAME*/C3 } from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/highlightsForExportFromUnfoundModule.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/highlightsForExportFromUnfoundModule.baseline.jsonc new file mode 100644 index 0000000000..327559c1b5 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/highlightsForExportFromUnfoundModule.baseline.jsonc @@ -0,0 +1,5 @@ +// === findRenameLocations === +// === /b.js === +// export { +// /*RENAME*/foo +// } from './a'; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/highlightsForExportFromUnfoundModule.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/highlightsForExportFromUnfoundModule.baseline.jsonc.diff new file mode 100644 index 0000000000..585d82efd7 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/highlightsForExportFromUnfoundModule.baseline.jsonc.diff @@ -0,0 +1,9 @@ +--- old.highlightsForExportFromUnfoundModule.baseline.jsonc ++++ new.highlightsForExportFromUnfoundModule.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /b.js === + // export { +-// /*START PREFIX*/foo as /*RENAME*/[|fooRENAME|] ++// /*RENAME*/foo + // } from './a'; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/javaScriptClass2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/javaScriptClass2.baseline.jsonc new file mode 100644 index 0000000000..1783f1b9dc --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/javaScriptClass2.baseline.jsonc @@ -0,0 +1,53 @@ +// === findRenameLocations === +// === /Foo.js === +// class Foo { +// constructor() { +// this./*RENAME*/[|unionRENAME|] = 'foo'; +// this.[|unionRENAME|] = 100; +// } +// method() { return this.[|unionRENAME|]; } +// } +// var x = new Foo(); +// x.[|unionRENAME|]; + + + +// === findRenameLocations === +// === /Foo.js === +// class Foo { +// constructor() { +// this.[|unionRENAME|] = 'foo'; +// this./*RENAME*/[|unionRENAME|] = 100; +// } +// method() { return this.[|unionRENAME|]; } +// } +// var x = new Foo(); +// x.[|unionRENAME|]; + + + +// === findRenameLocations === +// === /Foo.js === +// class Foo { +// constructor() { +// this.[|unionRENAME|] = 'foo'; +// this.[|unionRENAME|] = 100; +// } +// method() { return this./*RENAME*/[|unionRENAME|]; } +// } +// var x = new Foo(); +// x.[|unionRENAME|]; + + + +// === findRenameLocations === +// === /Foo.js === +// class Foo { +// constructor() { +// this.[|unionRENAME|] = 'foo'; +// this.[|unionRENAME|] = 100; +// } +// method() { return this.[|unionRENAME|]; } +// } +// var x = new Foo(); +// x./*RENAME*/[|unionRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsDocSee_rename1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsDocSee_rename1.baseline.jsonc new file mode 100644 index 0000000000..427bca8d47 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsDocSee_rename1.baseline.jsonc @@ -0,0 +1,17 @@ +// === findRenameLocations === +// === /jsDocSee_rename1.ts === +// /*RENAME*/interface A {} +// /** +// * @see {A} +// */ +// declare const a: A + + + +// === findRenameLocations === +// === /jsDocSee_rename1.ts === +// interface A {} +// /** +// * @see {/*RENAME*/A} +// */ +// declare const a: A \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsDocSee_rename1.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsDocSee_rename1.baseline.jsonc.diff new file mode 100644 index 0000000000..63d692e8b7 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsDocSee_rename1.baseline.jsonc.diff @@ -0,0 +1,52 @@ +--- old.jsDocSee_rename1.baseline.jsonc ++++ new.jsDocSee_rename1.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +-// @findInComments: true +- +-// === /jsDocSee_rename1.ts === +-// interface /*RENAME*/[|ARENAME|] {} +-// /** +-// * @see {[|ARENAME|]} +-// */ +-// declare const a: [|ARENAME|] +- +- +- +-// === findRenameLocations === +-// @findInComments: true +- +-// === /jsDocSee_rename1.ts === +-// interface [|ARENAME|] {} +-// /** +-// * @see {/*RENAME*/[|ARENAME|]} +-// */ +-// declare const a: [|ARENAME|] +- +- +- +-// === findRenameLocations === +-// @findInComments: true +- +-// === /jsDocSee_rename1.ts === +-// interface [|ARENAME|] {} +-// /** +-// * @see {[|ARENAME|]} +-// */ +-// declare const a: /*RENAME*/[|ARENAME|] ++// === /jsDocSee_rename1.ts === ++// /*RENAME*/interface A {} ++// /** ++// * @see {A} ++// */ ++// declare const a: A ++ ++ ++ ++// === findRenameLocations === ++// === /jsDocSee_rename1.ts === ++// interface A {} ++// /** ++// * @see {/*RENAME*/A} ++// */ ++// declare const a: A \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocCallbackTagRename01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocCallbackTagRename01.baseline.jsonc new file mode 100644 index 0000000000..596dc32276 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocCallbackTagRename01.baseline.jsonc @@ -0,0 +1,9 @@ +// === findRenameLocations === +// === /jsDocCallback.js === +// /** +// * @callback /*RENAME*/[|FooCallbackRENAME|] +// * @param {string} eventName - Rename should work +// */ +// +// /** @type {[|FooCallbackRENAME|]} */ +// var t; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocCallbackTagRename01.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocCallbackTagRename01.baseline.jsonc.diff new file mode 100644 index 0000000000..4bc0773b3e --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocCallbackTagRename01.baseline.jsonc.diff @@ -0,0 +1,10 @@ +--- old.jsdocCallbackTagRename01.baseline.jsonc ++++ new.jsdocCallbackTagRename01.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /jsDocCallback.js === +-// + // /** + // * @callback /*RENAME*/[|FooCallbackRENAME|] + // * @param {string} eventName - Rename should work \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocSatisfiesTagRename.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocSatisfiesTagRename.baseline.jsonc new file mode 100644 index 0000000000..5b12f6ccd9 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocSatisfiesTagRename.baseline.jsonc @@ -0,0 +1,9 @@ +// === findRenameLocations === +// === /a.js === +// /** +// * @typedef {Object} [|TRENAME|] +// * @property {number} a +// */ +// +// /** @satisfies {/*RENAME*/[|TRENAME|]} comment */ +// const foo = { a: 1 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocThrowsTag_rename.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocThrowsTag_rename.baseline.jsonc new file mode 100644 index 0000000000..c7fe097fcc --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocThrowsTag_rename.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /jsdocThrowsTag_rename.ts === +// class /*RENAME*/[|ERENAME|] extends Error {} +// /** +// * @throws {E} +// */ +// function f() {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocThrowsTag_rename.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocThrowsTag_rename.baseline.jsonc.diff new file mode 100644 index 0000000000..a579e74bae --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocThrowsTag_rename.baseline.jsonc.diff @@ -0,0 +1,10 @@ +--- old.jsdocThrowsTag_rename.baseline.jsonc ++++ new.jsdocThrowsTag_rename.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /jsdocThrowsTag_rename.ts === + // class /*RENAME*/[|ERENAME|] extends Error {} + // /** +-// * @throws {[|ERENAME|]} ++// * @throws {E} + // */ + // function f() {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename01.baseline.jsonc new file mode 100644 index 0000000000..382e55f562 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename01.baseline.jsonc @@ -0,0 +1,33 @@ +// === findRenameLocations === +// === /jsDocTypedef_form1.js === +// /** @typedef {(string | number)} */ +// var /*RENAME*/[|NumberLikeRENAME|]; +// +// [|NumberLikeRENAME|] = 10; +// +// /** @type {NumberLike} */ +// var numberLike; + + + +// === findRenameLocations === +// === /jsDocTypedef_form1.js === +// /** @typedef {(string | number)} */ +// var [|NumberLikeRENAME|]; +// +// /*RENAME*/[|NumberLikeRENAME|] = 10; +// +// /** @type {NumberLike} */ +// var numberLike; + + + +// === findRenameLocations === +// === /jsDocTypedef_form1.js === +// /** @typedef {(string | number)} */ +// var NumberLike; +// +// NumberLike = 10; +// +// /** @type {/*RENAME*/[|NumberLikeRENAME|]} */ +// var numberLike; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename01.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename01.baseline.jsonc.diff new file mode 100644 index 0000000000..8a16026273 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename01.baseline.jsonc.diff @@ -0,0 +1,46 @@ +--- old.jsdocTypedefTagRename01.baseline.jsonc ++++ new.jsdocTypedefTagRename01.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /jsDocTypedef_form1.js === +-// + // /** @typedef {(string | number)} */ + // var /*RENAME*/[|NumberLikeRENAME|]; + // + // [|NumberLikeRENAME|] = 10; + // +-// /** @type {[|NumberLikeRENAME|]} */ ++// /** @type {NumberLike} */ + // var numberLike; + + + + // === findRenameLocations === +- + // === /jsDocTypedef_form1.js === +-// + // /** @typedef {(string | number)} */ + // var [|NumberLikeRENAME|]; + // + // /*RENAME*/[|NumberLikeRENAME|] = 10; + // +-// /** @type {[|NumberLikeRENAME|]} */ ++// /** @type {NumberLike} */ + // var numberLike; + + + + // === findRenameLocations === +- + // === /jsDocTypedef_form1.js === +-// + // /** @typedef {(string | number)} */ +-// var [|NumberLikeRENAME|]; ++// var NumberLike; + // +-// [|NumberLikeRENAME|] = 10; ++// NumberLike = 10; + // + // /** @type {/*RENAME*/[|NumberLikeRENAME|]} */ + // var numberLike; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename02.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename02.baseline.jsonc new file mode 100644 index 0000000000..ba44583210 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename02.baseline.jsonc @@ -0,0 +1,15 @@ +// === findRenameLocations === +// === /jsDocTypedef_form2.js === +// /** @typedef {(string | number)} /*RENAME*/[|NumberLikeRENAME|] */ +// +// /** @type {[|NumberLikeRENAME|]} */ +// var numberLike; + + + +// === findRenameLocations === +// === /jsDocTypedef_form2.js === +// /** @typedef {(string | number)} [|NumberLikeRENAME|] */ +// +// /** @type {/*RENAME*/[|NumberLikeRENAME|]} */ +// var numberLike; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename02.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename02.baseline.jsonc.diff new file mode 100644 index 0000000000..7a8d1070cf --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename02.baseline.jsonc.diff @@ -0,0 +1,20 @@ +--- old.jsdocTypedefTagRename02.baseline.jsonc ++++ new.jsdocTypedefTagRename02.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /jsDocTypedef_form2.js === +-// + // /** @typedef {(string | number)} /*RENAME*/[|NumberLikeRENAME|] */ + // + // /** @type {[|NumberLikeRENAME|]} */ +@@= skipped -9, +7 lines =@@ + + + // === findRenameLocations === +- + // === /jsDocTypedef_form2.js === +-// + // /** @typedef {(string | number)} [|NumberLikeRENAME|] */ + // + // /** @type {/*RENAME*/[|NumberLikeRENAME|]} */ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename03.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename03.baseline.jsonc new file mode 100644 index 0000000000..7b7c4fd618 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename03.baseline.jsonc @@ -0,0 +1,25 @@ +// === findRenameLocations === +// === /jsDocTypedef_form3.js === +// /** +// * @typedef /*RENAME*/[|PersonRENAME|] +// * @type {Object} +// * @property {number} age +// * @property {string} name +// */ +// +// /** @type {[|PersonRENAME|]} */ +// var person; + + + +// === findRenameLocations === +// === /jsDocTypedef_form3.js === +// /** +// * @typedef [|PersonRENAME|] +// * @type {Object} +// * @property {number} age +// * @property {string} name +// */ +// +// /** @type {/*RENAME*/[|PersonRENAME|]} */ +// var person; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename03.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename03.baseline.jsonc.diff new file mode 100644 index 0000000000..6ff5604625 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsdocTypedefTagRename03.baseline.jsonc.diff @@ -0,0 +1,20 @@ +--- old.jsdocTypedefTagRename03.baseline.jsonc ++++ new.jsdocTypedefTagRename03.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /jsDocTypedef_form3.js === +-// + // /** + // * @typedef /*RENAME*/[|PersonRENAME|] + // * @type {Object} +@@= skipped -14, +12 lines =@@ + + + // === findRenameLocations === +- + // === /jsDocTypedef_form3.js === +-// + // /** + // * @typedef [|PersonRENAME|] + // * @type {Object} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsxSpreadReference.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsxSpreadReference.baseline.jsonc new file mode 100644 index 0000000000..c84c9923ac --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsxSpreadReference.baseline.jsonc @@ -0,0 +1,19 @@ +// === findRenameLocations === +// === /file.tsx === +// --- (line: 10) skipped --- +// } +// } +// +// var /*RENAME*/[|nnRENAME|]: {name?: string; size?: number}; +// var x = ; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 10) skipped --- +// } +// } +// +// var [|nnRENAME|]: {name?: string; size?: number}; +// var x = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsxSpreadReference.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsxSpreadReference.baseline.jsonc.diff new file mode 100644 index 0000000000..d29a7198d1 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/jsxSpreadReference.baseline.jsonc.diff @@ -0,0 +1,8 @@ +--- old.jsxSpreadReference.baseline.jsonc ++++ new.jsxSpreadReference.baseline.jsonc +@@= skipped -16, +16 lines =@@ + // + // var [|nnRENAME|]: {name?: string; size?: number}; + // var x = ; +- +- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/processInvalidSyntax1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/processInvalidSyntax1.baseline.jsonc new file mode 100644 index 0000000000..f08a819ee4 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/processInvalidSyntax1.baseline.jsonc @@ -0,0 +1,14 @@ +// === findRenameLocations === +// === /decl.js === +// var [|objRENAME|] = {}; + +// === /forof.js === +// for ([|objRENAME|]/*RENAME*/.prop of arr) { +// +// } + +// === /unicode1.js === +// [|objRENAME|].𝒜 ; + +// === /unicode2.js === +// [|objRENAME|].¬ ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/processInvalidSyntax1.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/processInvalidSyntax1.baseline.jsonc.diff new file mode 100644 index 0000000000..19174180ba --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/processInvalidSyntax1.baseline.jsonc.diff @@ -0,0 +1,25 @@ +--- old.processInvalidSyntax1.baseline.jsonc ++++ new.processInvalidSyntax1.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /decl.js === + // var [|objRENAME|] = {}; + +-// === /unicode1.js === +-// [|objRENAME|].𝒜 ; +- +-// === /unicode2.js === +-// [|objRENAME|].¬ ; +- +-// === /unicode3.js === +-// [|objRENAME|]¬ +- + // === /forof.js === + // for ([|objRENAME|]/*RENAME*/.prop of arr) { + // + // } ++ ++// === /unicode1.js === ++// [|objRENAME|].𝒜 ; ++ ++// === /unicode2.js === ++// [|objRENAME|].¬ ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/rename01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/rename01.baseline.jsonc new file mode 100644 index 0000000000..91ee0e756d --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/rename01.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /rename01.ts === +// /// +// function /*RENAME*/[|BarRENAME|]() { +// // This is a reference to Bar in a comment. +// "this is a reference to Bar in a string" +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/rename01.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/rename01.baseline.jsonc.diff new file mode 100644 index 0000000000..10a21fa37c --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/rename01.baseline.jsonc.diff @@ -0,0 +1,13 @@ +--- old.rename01.baseline.jsonc ++++ new.rename01.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /rename01.ts === + // /// + // function /*RENAME*/[|BarRENAME|]() { +-// // This is a reference to [|BarRENAME|] in a comment. +-// "this is a reference to [|BarRENAME|] in a string" ++// // This is a reference to Bar in a comment. ++// "this is a reference to Bar in a string" + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAcrossMultipleProjects.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAcrossMultipleProjects.baseline.jsonc new file mode 100644 index 0000000000..48bb8773df --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAcrossMultipleProjects.baseline.jsonc @@ -0,0 +1,39 @@ +// === findRenameLocations === +// === /a.ts === +// var /*RENAME*/[|xRENAME|]: number; + +// === /b.ts === +// /// +// [|xRENAME|]++; + +// === /c.ts === +// /// +// [|xRENAME|]++; + + + +// === findRenameLocations === +// === /a.ts === +// var [|xRENAME|]: number; + +// === /b.ts === +// /// +// /*RENAME*/[|xRENAME|]++; + +// === /c.ts === +// /// +// [|xRENAME|]++; + + + +// === findRenameLocations === +// === /a.ts === +// var [|xRENAME|]: number; + +// === /b.ts === +// /// +// [|xRENAME|]++; + +// === /c.ts === +// /// +// /*RENAME*/[|xRENAME|]++; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias.baseline.jsonc new file mode 100644 index 0000000000..169ac2f6fa --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias.baseline.jsonc @@ -0,0 +1,13 @@ +// === findRenameLocations === +// === /renameAlias.ts === +// module SomeModule { export class SomeClass { } } +// import /*RENAME*/[|MRENAME|] = SomeModule; +// import C = [|MRENAME|].SomeClass; + + + +// === findRenameLocations === +// === /renameAlias.ts === +// module SomeModule { export class SomeClass { } } +// import [|MRENAME|] = SomeModule; +// import C = /*RENAME*/[|MRENAME|].SomeClass; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias2.baseline.jsonc new file mode 100644 index 0000000000..097898f626 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias2.baseline.jsonc @@ -0,0 +1,13 @@ +// === findRenameLocations === +// === /renameAlias2.ts === +// module /*RENAME*/[|SomeModuleRENAME|] { export class SomeClass { } } +// import M = [|SomeModuleRENAME|]; +// import C = M.SomeClass; + + + +// === findRenameLocations === +// === /renameAlias2.ts === +// module [|SomeModuleRENAME|] { export class SomeClass { } } +// import M = /*RENAME*/[|SomeModuleRENAME|]; +// import C = M.SomeClass; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias3.baseline.jsonc new file mode 100644 index 0000000000..af74bffd51 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias3.baseline.jsonc @@ -0,0 +1,13 @@ +// === findRenameLocations === +// === /renameAlias3.ts === +// module SomeModule { export class /*RENAME*/[|SomeClassRENAME|] { } } +// import M = SomeModule; +// import C = M.SomeClass; + + + +// === findRenameLocations === +// === /renameAlias3.ts === +// module SomeModule { export class SomeClass { } } +// import M = SomeModule; +// import C = M./*RENAME*/[|SomeClassRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias3.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias3.baseline.jsonc.diff new file mode 100644 index 0000000000..24d0d63d58 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias3.baseline.jsonc.diff @@ -0,0 +1,17 @@ +--- old.renameAlias3.baseline.jsonc ++++ new.renameAlias3.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /renameAlias3.ts === + // module SomeModule { export class /*RENAME*/[|SomeClassRENAME|] { } } + // import M = SomeModule; +-// import C = M.[|SomeClassRENAME|]; ++// import C = M.SomeClass; + + + + // === findRenameLocations === + // === /renameAlias3.ts === +-// module SomeModule { export class [|SomeClassRENAME|] { } } ++// module SomeModule { export class SomeClass { } } + // import M = SomeModule; + // import C = M./*RENAME*/[|SomeClassRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule.baseline.jsonc new file mode 100644 index 0000000000..5a52c526c3 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule.baseline.jsonc @@ -0,0 +1,11 @@ +// === findRenameLocations === +// === /b.ts === +// import /*RENAME*/[|MRENAME|] = require("./a"); +// import C = [|MRENAME|].SomeClass; + + + +// === findRenameLocations === +// === /b.ts === +// import [|MRENAME|] = require("./a"); +// import C = /*RENAME*/[|MRENAME|].SomeClass; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule2.baseline.jsonc new file mode 100644 index 0000000000..58598eadcb --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule2.baseline.jsonc @@ -0,0 +1,25 @@ +// === findRenameLocations === +// === /a.ts === +// module /*RENAME*/[|SomeModuleRENAME|] { export class SomeClass { } } +// export = [|SomeModuleRENAME|]; + + + +// === findRenameLocations === +// === /a.ts === +// module [|SomeModuleRENAME|] { export class SomeClass { } } +// export = /*RENAME*/[|SomeModuleRENAME|]; + + + +// === findRenameLocations === +// === /b.ts === +// import /*RENAME*/[|MRENAME|] = require("./a"); +// import C = [|MRENAME|].SomeClass; + + + +// === findRenameLocations === +// === /b.ts === +// import [|MRENAME|] = require("./a"); +// import C = /*RENAME*/[|MRENAME|].SomeClass; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule3.baseline.jsonc new file mode 100644 index 0000000000..c9f18c5c49 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule3.baseline.jsonc @@ -0,0 +1,11 @@ +// === findRenameLocations === +// === /a.ts === +// module SomeModule { export class /*RENAME*/[|SomeClassRENAME|] { } } +// export = SomeModule; + + + +// === findRenameLocations === +// === /b.ts === +// import M = require("./a"); +// import C = M./*RENAME*/[|SomeClassRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule3.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule3.baseline.jsonc.diff new file mode 100644 index 0000000000..b3dc143222 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule3.baseline.jsonc.diff @@ -0,0 +1,20 @@ +--- old.renameAliasExternalModule3.baseline.jsonc ++++ new.renameAliasExternalModule3.baseline.jsonc +@@= skipped -2, +2 lines =@@ + // module SomeModule { export class /*RENAME*/[|SomeClassRENAME|] { } } + // export = SomeModule; + +-// === /b.ts === +-// import M = require("./a"); +-// import C = M.[|SomeClassRENAME|]; +- + + + // === findRenameLocations === +-// === /a.ts === +-// module SomeModule { export class [|SomeClassRENAME|] { } } +-// export = SomeModule; +- + // === /b.ts === + // import M = require("./a"); + // import C = M./*RENAME*/[|SomeClassRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameBindingElementInitializerExternal.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameBindingElementInitializerExternal.baseline.jsonc new file mode 100644 index 0000000000..aae6d891cd --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameBindingElementInitializerExternal.baseline.jsonc @@ -0,0 +1,115 @@ +// === findRenameLocations === +// === /renameBindingElementInitializerExternal.ts === +// const /*RENAME*/[|externalRENAME|] = true; +// +// function f({ +// lvl1 = external, +// // --- (line: 5) skipped --- + + + +// === findRenameLocations === +// === /renameBindingElementInitializerExternal.ts === +// const external = true; +// +// function f({ +// lvl1 = /*RENAME*/[|externalRENAME|], +// nested: { lvl2 = [|externalRENAME|]}, +// oldName: newName = [|externalRENAME|] +// }) {} +// +// const { +// lvl1 = [|externalRENAME|], +// nested: { lvl2 = [|externalRENAME|]}, +// oldName: newName = [|externalRENAME|] +// } = obj; + + + +// === findRenameLocations === +// === /renameBindingElementInitializerExternal.ts === +// const external = true; +// +// function f({ +// lvl1 = [|externalRENAME|], +// nested: { lvl2 = /*RENAME*/[|externalRENAME|]}, +// oldName: newName = [|externalRENAME|] +// }) {} +// +// const { +// lvl1 = [|externalRENAME|], +// nested: { lvl2 = [|externalRENAME|]}, +// oldName: newName = [|externalRENAME|] +// } = obj; + + + +// === findRenameLocations === +// === /renameBindingElementInitializerExternal.ts === +// const external = true; +// +// function f({ +// lvl1 = [|externalRENAME|], +// nested: { lvl2 = [|externalRENAME|]}, +// oldName: newName = /*RENAME*/[|externalRENAME|] +// }) {} +// +// const { +// lvl1 = [|externalRENAME|], +// nested: { lvl2 = [|externalRENAME|]}, +// oldName: newName = [|externalRENAME|] +// } = obj; + + + +// === findRenameLocations === +// === /renameBindingElementInitializerExternal.ts === +// const external = true; +// +// function f({ +// lvl1 = [|externalRENAME|], +// nested: { lvl2 = [|externalRENAME|]}, +// oldName: newName = [|externalRENAME|] +// }) {} +// +// const { +// lvl1 = /*RENAME*/[|externalRENAME|], +// nested: { lvl2 = [|externalRENAME|]}, +// oldName: newName = [|externalRENAME|] +// } = obj; + + + +// === findRenameLocations === +// === /renameBindingElementInitializerExternal.ts === +// const external = true; +// +// function f({ +// lvl1 = [|externalRENAME|], +// nested: { lvl2 = [|externalRENAME|]}, +// oldName: newName = [|externalRENAME|] +// }) {} +// +// const { +// lvl1 = [|externalRENAME|], +// nested: { lvl2 = /*RENAME*/[|externalRENAME|]}, +// oldName: newName = [|externalRENAME|] +// } = obj; + + + +// === findRenameLocations === +// === /renameBindingElementInitializerExternal.ts === +// const external = true; +// +// function f({ +// lvl1 = [|externalRENAME|], +// nested: { lvl2 = [|externalRENAME|]}, +// oldName: newName = [|externalRENAME|] +// }) {} +// +// const { +// lvl1 = [|externalRENAME|], +// nested: { lvl2 = [|externalRENAME|]}, +// oldName: newName = /*RENAME*/[|externalRENAME|] +// } = obj; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameBindingElementInitializerExternal.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameBindingElementInitializerExternal.baseline.jsonc.diff new file mode 100644 index 0000000000..f92508151d --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameBindingElementInitializerExternal.baseline.jsonc.diff @@ -0,0 +1,73 @@ +--- old.renameBindingElementInitializerExternal.baseline.jsonc ++++ new.renameBindingElementInitializerExternal.baseline.jsonc +@@= skipped -2, +2 lines =@@ + // const /*RENAME*/[|externalRENAME|] = true; + // + // function f({ +-// lvl1 = [|externalRENAME|], +-// nested: { lvl2 = [|externalRENAME|]}, +-// oldName: newName = [|externalRENAME|] +-// }) {} +-// +-// const { +-// lvl1 = [|externalRENAME|], +-// nested: { lvl2 = [|externalRENAME|]}, +-// oldName: newName = [|externalRENAME|] +-// } = obj; ++// lvl1 = external, ++// // --- (line: 5) skipped --- + + + + // === findRenameLocations === + // === /renameBindingElementInitializerExternal.ts === +-// const [|externalRENAME|] = true; ++// const external = true; + // + // function f({ + // lvl1 = /*RENAME*/[|externalRENAME|], +@@= skipped -33, +25 lines =@@ + + // === findRenameLocations === + // === /renameBindingElementInitializerExternal.ts === +-// const [|externalRENAME|] = true; ++// const external = true; + // + // function f({ + // lvl1 = [|externalRENAME|], +@@= skipped -18, +18 lines =@@ + + // === findRenameLocations === + // === /renameBindingElementInitializerExternal.ts === +-// const [|externalRENAME|] = true; ++// const external = true; + // + // function f({ + // lvl1 = [|externalRENAME|], +@@= skipped -18, +18 lines =@@ + + // === findRenameLocations === + // === /renameBindingElementInitializerExternal.ts === +-// const [|externalRENAME|] = true; ++// const external = true; + // + // function f({ + // lvl1 = [|externalRENAME|], +@@= skipped -18, +18 lines =@@ + + // === findRenameLocations === + // === /renameBindingElementInitializerExternal.ts === +-// const [|externalRENAME|] = true; ++// const external = true; + // + // function f({ + // lvl1 = [|externalRENAME|], +@@= skipped -18, +18 lines =@@ + + // === findRenameLocations === + // === /renameBindingElementInitializerExternal.ts === +-// const [|externalRENAME|] = true; ++// const external = true; + // + // function f({ + // lvl1 = [|externalRENAME|], \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameBindingElementInitializerProperty.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameBindingElementInitializerProperty.baseline.jsonc new file mode 100644 index 0000000000..6d2729cd2e --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameBindingElementInitializerProperty.baseline.jsonc @@ -0,0 +1,52 @@ +// === findRenameLocations === +// === /renameBindingElementInitializerProperty.ts === +// function f({/*START PREFIX*/required: /*RENAME*/[|requiredRENAME|], optional = [|requiredRENAME|]}: {required: number, optional?: number}) { +// console.log("required", [|requiredRENAME|]); +// console.log("optional", optional); +// } +// +// f({required: 10}); + + + +// === findRenameLocations === +// === /renameBindingElementInitializerProperty.ts === +// function f({/*START PREFIX*/required: [|requiredRENAME|], optional = /*RENAME*/[|requiredRENAME|]}: {required: number, optional?: number}) { +// console.log("required", [|requiredRENAME|]); +// console.log("optional", optional); +// } +// +// f({required: 10}); + + + +// === findRenameLocations === +// === /renameBindingElementInitializerProperty.ts === +// function f({/*START PREFIX*/required: [|requiredRENAME|], optional = [|requiredRENAME|]}: {required: number, optional?: number}) { +// console.log("required", /*RENAME*/[|requiredRENAME|]); +// console.log("optional", optional); +// } +// +// f({required: 10}); + + + +// === findRenameLocations === +// === /renameBindingElementInitializerProperty.ts === +// function f({[|requiredRENAME|]: required/*END SUFFIX*/, optional = required}: {/*RENAME*/[|requiredRENAME|]: number, optional?: number}) { +// console.log("required", required); +// console.log("optional", optional); +// } +// +// f({[|requiredRENAME|]: 10}); + + + +// === findRenameLocations === +// === /renameBindingElementInitializerProperty.ts === +// function f({[|requiredRENAME|]: required/*END SUFFIX*/, optional = required}: {[|requiredRENAME|]: number, optional?: number}) { +// console.log("required", required); +// console.log("optional", optional); +// } +// +// f({/*RENAME*/[|requiredRENAME|]: 10}); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings1.baseline.jsonc new file mode 100644 index 0000000000..b24b7dd8d0 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings1.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /renameCommentsAndStrings1.ts === +// /// +// function /*RENAME*/[|BarRENAME|]() { +// // This is a reference to Bar in a comment. +// "this is a reference to Bar in a string" +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings2.baseline.jsonc new file mode 100644 index 0000000000..20c5f83e25 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings2.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /renameCommentsAndStrings2.ts === +// /// +// function /*RENAME*/[|BarRENAME|]() { +// // This is a reference to Bar in a comment. +// "this is a reference to Bar in a string" +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings2.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings2.baseline.jsonc.diff new file mode 100644 index 0000000000..04055e0b6e --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings2.baseline.jsonc.diff @@ -0,0 +1,12 @@ +--- old.renameCommentsAndStrings2.baseline.jsonc ++++ new.renameCommentsAndStrings2.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /renameCommentsAndStrings2.ts === + // /// + // function /*RENAME*/[|BarRENAME|]() { + // // This is a reference to Bar in a comment. +-// "this is a reference to [|BarRENAME|] in a string" ++// "this is a reference to Bar in a string" + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings3.baseline.jsonc new file mode 100644 index 0000000000..9ccb26f725 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings3.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /renameCommentsAndStrings3.ts === +// /// +// function /*RENAME*/[|BarRENAME|]() { +// // This is a reference to Bar in a comment. +// "this is a reference to Bar in a string" +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings3.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings3.baseline.jsonc.diff new file mode 100644 index 0000000000..87ad7c1be2 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings3.baseline.jsonc.diff @@ -0,0 +1,12 @@ +--- old.renameCommentsAndStrings3.baseline.jsonc ++++ new.renameCommentsAndStrings3.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /renameCommentsAndStrings3.ts === + // /// + // function /*RENAME*/[|BarRENAME|]() { +-// // This is a reference to [|BarRENAME|] in a comment. ++// // This is a reference to Bar in a comment. + // "this is a reference to Bar in a string" + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings4.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings4.baseline.jsonc new file mode 100644 index 0000000000..65750b7846 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings4.baseline.jsonc @@ -0,0 +1,8 @@ +// === findRenameLocations === +// === /renameCommentsAndStrings4.ts === +// /// +// function /*RENAME*/[|BarRENAME|]() { +// // This is a reference to Bar in a comment. +// "this is a reference to Bar in a string"; +// `Foo Bar Baz.`; +// // --- (line: 6) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings4.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings4.baseline.jsonc.diff new file mode 100644 index 0000000000..77124b4370 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameCommentsAndStrings4.baseline.jsonc.diff @@ -0,0 +1,20 @@ +--- old.renameCommentsAndStrings4.baseline.jsonc ++++ new.renameCommentsAndStrings4.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /renameCommentsAndStrings4.ts === + // /// + // function /*RENAME*/[|BarRENAME|]() { +-// // This is a reference to [|BarRENAME|] in a comment. +-// "this is a reference to [|BarRENAME|] in a string"; +-// `Foo [|BarRENAME|] Baz.`; +-// { +-// const Bar = 0; +-// `[|BarRENAME|] ba ${Bar} bara [|BarRENAME|] berbobo ${Bar} araura [|BarRENAME|] ara!`; +-// } +-// } ++// // This is a reference to Bar in a comment. ++// "this is a reference to Bar in a string"; ++// `Foo Bar Baz.`; ++// // --- (line: 6) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties.baseline.jsonc new file mode 100644 index 0000000000..5e291fb2fb --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties.baseline.jsonc @@ -0,0 +1,374 @@ +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// interface I { +// /*RENAME*/[|prop1RENAME|]: () => void; +// prop2(): void; +// } +// +// var o1: I = { +// [|prop1RENAME|]() { }, +// prop2() { } +// }; +// +// var o2: I = { +// [|prop1RENAME|]: () => { }, +// prop2: () => { } +// }; +// +// var o3: I = { +// get [|prop1RENAME|]() { return () => { }; }, +// get prop2() { return () => { }; } +// }; +// +// var o4: I = { +// set [|prop1RENAME|](v) { }, +// set prop2(v) { } +// }; +// +// var o5: I = { +// "[|prop1RENAME|]"() { }, +// "prop2"() { } +// }; +// +// var o6: I = { +// "[|prop1RENAME|]": function () { }, +// "prop2": function () { } +// }; +// +// var o7: I = { +// ["[|prop1RENAME|]"]: function () { }, +// ["prop2"]: function () { } +// }; +// +// var o8: I = { +// ["[|prop1RENAME|]"]() { }, +// ["prop2"]() { } +// }; +// +// var o9: I = { +// get ["[|prop1RENAME|]"]() { return () => { }; }, +// get ["prop2"]() { return () => { }; } +// }; +// +// var o10: I = { +// set ["[|prop1RENAME|]"](v) { }, +// set ["prop2"](v) { } +// }; + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// interface I { +// [|prop1RENAME|]: () => void; +// prop2(): void; +// } +// +// var o1: I = { +// /*RENAME*/[|prop1RENAME|]() { }, +// prop2() { } +// }; +// +// var o2: I = { +// [|prop1RENAME|]: () => { }, +// prop2: () => { } +// }; +// +// var o3: I = { +// get [|prop1RENAME|]() { return () => { }; }, +// get prop2() { return () => { }; } +// }; +// +// var o4: I = { +// set [|prop1RENAME|](v) { }, +// set prop2(v) { } +// }; +// +// var o5: I = { +// "[|prop1RENAME|]"() { }, +// "prop2"() { } +// }; +// +// var o6: I = { +// "[|prop1RENAME|]": function () { }, +// "prop2": function () { } +// }; +// +// var o7: I = { +// ["[|prop1RENAME|]"]: function () { }, +// ["prop2"]: function () { } +// }; +// +// var o8: I = { +// ["[|prop1RENAME|]"]() { }, +// ["prop2"]() { } +// }; +// +// var o9: I = { +// get ["[|prop1RENAME|]"]() { return () => { }; }, +// get ["prop2"]() { return () => { }; } +// }; +// +// var o10: I = { +// set ["[|prop1RENAME|]"](v) { }, +// set ["prop2"](v) { } +// }; + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// interface I { +// [|prop1RENAME|]: () => void; +// prop2(): void; +// } +// +// var o1: I = { +// [|prop1RENAME|]() { }, +// prop2() { } +// }; +// +// var o2: I = { +// /*RENAME*/[|prop1RENAME|]: () => { }, +// prop2: () => { } +// }; +// +// var o3: I = { +// get [|prop1RENAME|]() { return () => { }; }, +// get prop2() { return () => { }; } +// }; +// +// var o4: I = { +// set [|prop1RENAME|](v) { }, +// set prop2(v) { } +// }; +// +// var o5: I = { +// "[|prop1RENAME|]"() { }, +// "prop2"() { } +// }; +// +// var o6: I = { +// "[|prop1RENAME|]": function () { }, +// "prop2": function () { } +// }; +// +// var o7: I = { +// ["[|prop1RENAME|]"]: function () { }, +// ["prop2"]: function () { } +// }; +// +// var o8: I = { +// ["[|prop1RENAME|]"]() { }, +// ["prop2"]() { } +// }; +// +// var o9: I = { +// get ["[|prop1RENAME|]"]() { return () => { }; }, +// get ["prop2"]() { return () => { }; } +// }; +// +// var o10: I = { +// set ["[|prop1RENAME|]"](v) { }, +// set ["prop2"](v) { } +// }; + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// interface I { +// [|prop1RENAME|]: () => void; +// prop2(): void; +// } +// +// var o1: I = { +// [|prop1RENAME|]() { }, +// prop2() { } +// }; +// +// var o2: I = { +// [|prop1RENAME|]: () => { }, +// prop2: () => { } +// }; +// +// var o3: I = { +// get /*RENAME*/[|prop1RENAME|]() { return () => { }; }, +// get prop2() { return () => { }; } +// }; +// +// var o4: I = { +// set [|prop1RENAME|](v) { }, +// set prop2(v) { } +// }; +// +// var o5: I = { +// "[|prop1RENAME|]"() { }, +// "prop2"() { } +// }; +// +// var o6: I = { +// "[|prop1RENAME|]": function () { }, +// "prop2": function () { } +// }; +// +// var o7: I = { +// ["[|prop1RENAME|]"]: function () { }, +// ["prop2"]: function () { } +// }; +// +// var o8: I = { +// ["[|prop1RENAME|]"]() { }, +// ["prop2"]() { } +// }; +// +// var o9: I = { +// get ["[|prop1RENAME|]"]() { return () => { }; }, +// get ["prop2"]() { return () => { }; } +// }; +// +// var o10: I = { +// set ["[|prop1RENAME|]"](v) { }, +// set ["prop2"](v) { } +// }; + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// interface I { +// [|prop1RENAME|]: () => void; +// prop2(): void; +// } +// +// var o1: I = { +// [|prop1RENAME|]() { }, +// prop2() { } +// }; +// +// var o2: I = { +// [|prop1RENAME|]: () => { }, +// prop2: () => { } +// }; +// +// var o3: I = { +// get [|prop1RENAME|]() { return () => { }; }, +// get prop2() { return () => { }; } +// }; +// +// var o4: I = { +// set /*RENAME*/[|prop1RENAME|](v) { }, +// set prop2(v) { } +// }; +// +// var o5: I = { +// "[|prop1RENAME|]"() { }, +// "prop2"() { } +// }; +// +// var o6: I = { +// "[|prop1RENAME|]": function () { }, +// "prop2": function () { } +// }; +// +// var o7: I = { +// ["[|prop1RENAME|]"]: function () { }, +// ["prop2"]: function () { } +// }; +// +// var o8: I = { +// ["[|prop1RENAME|]"]() { }, +// ["prop2"]() { } +// }; +// +// var o9: I = { +// get ["[|prop1RENAME|]"]() { return () => { }; }, +// get ["prop2"]() { return () => { }; } +// }; +// +// var o10: I = { +// set ["[|prop1RENAME|]"](v) { }, +// set ["prop2"](v) { } +// }; + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// --- (line: 23) skipped --- +// }; +// +// var o5: I = { +// "/*RENAME*/prop1"() { }, +// "prop2"() { } +// }; +// +// // --- (line: 31) skipped --- + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// --- (line: 28) skipped --- +// }; +// +// var o6: I = { +// "/*RENAME*/prop1": function () { }, +// "prop2": function () { } +// }; +// +// // --- (line: 36) skipped --- + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// --- (line: 33) skipped --- +// }; +// +// var o7: I = { +// ["/*RENAME*/prop1"]: function () { }, +// ["prop2"]: function () { } +// }; +// +// // --- (line: 41) skipped --- + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// --- (line: 38) skipped --- +// }; +// +// var o8: I = { +// ["/*RENAME*/prop1"]() { }, +// ["prop2"]() { } +// }; +// +// // --- (line: 46) skipped --- + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// --- (line: 43) skipped --- +// }; +// +// var o9: I = { +// get ["/*RENAME*/prop1"]() { return () => { }; }, +// get ["prop2"]() { return () => { }; } +// }; +// +// // --- (line: 51) skipped --- + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties.ts === +// --- (line: 48) skipped --- +// }; +// +// var o10: I = { +// set ["/*RENAME*/prop1"](v) { }, +// set ["prop2"](v) { } +// }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties.baseline.jsonc.diff new file mode 100644 index 0000000000..8269b1954c --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties.baseline.jsonc.diff @@ -0,0 +1,430 @@ +--- old.renameContextuallyTypedProperties.baseline.jsonc ++++ new.renameContextuallyTypedProperties.baseline.jsonc +@@= skipped -294, +294 lines =@@ + + // === findRenameLocations === + // === /renameContextuallyTypedProperties.ts === +-// interface I { +-// [|prop1RENAME|]: () => void; +-// prop2(): void; +-// } +-// +-// var o1: I = { +-// [|prop1RENAME|]() { }, +-// prop2() { } +-// }; +-// +-// var o2: I = { +-// [|prop1RENAME|]: () => { }, +-// prop2: () => { } +-// }; +-// +-// var o3: I = { +-// get [|prop1RENAME|]() { return () => { }; }, +-// get prop2() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set [|prop1RENAME|](v) { }, +-// set prop2(v) { } +-// }; +-// +-// var o5: I = { +-// "/*RENAME*/[|prop1RENAME|]"() { }, +-// "prop2"() { } +-// }; +-// +-// var o6: I = { +-// "[|prop1RENAME|]": function () { }, +-// "prop2": function () { } +-// }; +-// +-// var o7: I = { +-// ["[|prop1RENAME|]"]: function () { }, +-// ["prop2"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["[|prop1RENAME|]"]() { }, +-// ["prop2"]() { } +-// }; +-// +-// var o9: I = { +-// get ["[|prop1RENAME|]"]() { return () => { }; }, +-// get ["prop2"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["[|prop1RENAME|]"](v) { }, +-// set ["prop2"](v) { } +-// }; +- +- +- +-// === findRenameLocations === +-// === /renameContextuallyTypedProperties.ts === +-// interface I { +-// [|prop1RENAME|]: () => void; +-// prop2(): void; +-// } +-// +-// var o1: I = { +-// [|prop1RENAME|]() { }, +-// prop2() { } +-// }; +-// +-// var o2: I = { +-// [|prop1RENAME|]: () => { }, +-// prop2: () => { } +-// }; +-// +-// var o3: I = { +-// get [|prop1RENAME|]() { return () => { }; }, +-// get prop2() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set [|prop1RENAME|](v) { }, +-// set prop2(v) { } +-// }; +-// +-// var o5: I = { +-// "[|prop1RENAME|]"() { }, +-// "prop2"() { } +-// }; +-// +-// var o6: I = { +-// "/*RENAME*/[|prop1RENAME|]": function () { }, +-// "prop2": function () { } +-// }; +-// +-// var o7: I = { +-// ["[|prop1RENAME|]"]: function () { }, +-// ["prop2"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["[|prop1RENAME|]"]() { }, +-// ["prop2"]() { } +-// }; +-// +-// var o9: I = { +-// get ["[|prop1RENAME|]"]() { return () => { }; }, +-// get ["prop2"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["[|prop1RENAME|]"](v) { }, +-// set ["prop2"](v) { } +-// }; +- +- +- +-// === findRenameLocations === +-// === /renameContextuallyTypedProperties.ts === +-// interface I { +-// [|prop1RENAME|]: () => void; +-// prop2(): void; +-// } +-// +-// var o1: I = { +-// [|prop1RENAME|]() { }, +-// prop2() { } +-// }; +-// +-// var o2: I = { +-// [|prop1RENAME|]: () => { }, +-// prop2: () => { } +-// }; +-// +-// var o3: I = { +-// get [|prop1RENAME|]() { return () => { }; }, +-// get prop2() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set [|prop1RENAME|](v) { }, +-// set prop2(v) { } +-// }; +-// +-// var o5: I = { +-// "[|prop1RENAME|]"() { }, +-// "prop2"() { } +-// }; +-// +-// var o6: I = { +-// "[|prop1RENAME|]": function () { }, +-// "prop2": function () { } +-// }; +-// +-// var o7: I = { +-// ["/*RENAME*/[|prop1RENAME|]"]: function () { }, +-// ["prop2"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["[|prop1RENAME|]"]() { }, +-// ["prop2"]() { } +-// }; +-// +-// var o9: I = { +-// get ["[|prop1RENAME|]"]() { return () => { }; }, +-// get ["prop2"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["[|prop1RENAME|]"](v) { }, +-// set ["prop2"](v) { } +-// }; +- +- +- +-// === findRenameLocations === +-// === /renameContextuallyTypedProperties.ts === +-// interface I { +-// [|prop1RENAME|]: () => void; +-// prop2(): void; +-// } +-// +-// var o1: I = { +-// [|prop1RENAME|]() { }, +-// prop2() { } +-// }; +-// +-// var o2: I = { +-// [|prop1RENAME|]: () => { }, +-// prop2: () => { } +-// }; +-// +-// var o3: I = { +-// get [|prop1RENAME|]() { return () => { }; }, +-// get prop2() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set [|prop1RENAME|](v) { }, +-// set prop2(v) { } +-// }; +-// +-// var o5: I = { +-// "[|prop1RENAME|]"() { }, +-// "prop2"() { } +-// }; +-// +-// var o6: I = { +-// "[|prop1RENAME|]": function () { }, +-// "prop2": function () { } +-// }; +-// +-// var o7: I = { +-// ["[|prop1RENAME|]"]: function () { }, +-// ["prop2"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["/*RENAME*/[|prop1RENAME|]"]() { }, +-// ["prop2"]() { } +-// }; +-// +-// var o9: I = { +-// get ["[|prop1RENAME|]"]() { return () => { }; }, +-// get ["prop2"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["[|prop1RENAME|]"](v) { }, +-// set ["prop2"](v) { } +-// }; +- +- +- +-// === findRenameLocations === +-// === /renameContextuallyTypedProperties.ts === +-// interface I { +-// [|prop1RENAME|]: () => void; +-// prop2(): void; +-// } +-// +-// var o1: I = { +-// [|prop1RENAME|]() { }, +-// prop2() { } +-// }; +-// +-// var o2: I = { +-// [|prop1RENAME|]: () => { }, +-// prop2: () => { } +-// }; +-// +-// var o3: I = { +-// get [|prop1RENAME|]() { return () => { }; }, +-// get prop2() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set [|prop1RENAME|](v) { }, +-// set prop2(v) { } +-// }; +-// +-// var o5: I = { +-// "[|prop1RENAME|]"() { }, +-// "prop2"() { } +-// }; +-// +-// var o6: I = { +-// "[|prop1RENAME|]": function () { }, +-// "prop2": function () { } +-// }; +-// +-// var o7: I = { +-// ["[|prop1RENAME|]"]: function () { }, +-// ["prop2"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["[|prop1RENAME|]"]() { }, +-// ["prop2"]() { } +-// }; +-// +-// var o9: I = { +-// get ["/*RENAME*/[|prop1RENAME|]"]() { return () => { }; }, +-// get ["prop2"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["[|prop1RENAME|]"](v) { }, +-// set ["prop2"](v) { } +-// }; +- +- +- +-// === findRenameLocations === +-// === /renameContextuallyTypedProperties.ts === +-// interface I { +-// [|prop1RENAME|]: () => void; +-// prop2(): void; +-// } +-// +-// var o1: I = { +-// [|prop1RENAME|]() { }, +-// prop2() { } +-// }; +-// +-// var o2: I = { +-// [|prop1RENAME|]: () => { }, +-// prop2: () => { } +-// }; +-// +-// var o3: I = { +-// get [|prop1RENAME|]() { return () => { }; }, +-// get prop2() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set [|prop1RENAME|](v) { }, +-// set prop2(v) { } +-// }; +-// +-// var o5: I = { +-// "[|prop1RENAME|]"() { }, +-// "prop2"() { } +-// }; +-// +-// var o6: I = { +-// "[|prop1RENAME|]": function () { }, +-// "prop2": function () { } +-// }; +-// +-// var o7: I = { +-// ["[|prop1RENAME|]"]: function () { }, +-// ["prop2"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["[|prop1RENAME|]"]() { }, +-// ["prop2"]() { } +-// }; +-// +-// var o9: I = { +-// get ["[|prop1RENAME|]"]() { return () => { }; }, +-// get ["prop2"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["/*RENAME*/[|prop1RENAME|]"](v) { }, ++// --- (line: 23) skipped --- ++// }; ++// ++// var o5: I = { ++// "/*RENAME*/prop1"() { }, ++// "prop2"() { } ++// }; ++// ++// // --- (line: 31) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameContextuallyTypedProperties.ts === ++// --- (line: 28) skipped --- ++// }; ++// ++// var o6: I = { ++// "/*RENAME*/prop1": function () { }, ++// "prop2": function () { } ++// }; ++// ++// // --- (line: 36) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameContextuallyTypedProperties.ts === ++// --- (line: 33) skipped --- ++// }; ++// ++// var o7: I = { ++// ["/*RENAME*/prop1"]: function () { }, ++// ["prop2"]: function () { } ++// }; ++// ++// // --- (line: 41) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameContextuallyTypedProperties.ts === ++// --- (line: 38) skipped --- ++// }; ++// ++// var o8: I = { ++// ["/*RENAME*/prop1"]() { }, ++// ["prop2"]() { } ++// }; ++// ++// // --- (line: 46) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameContextuallyTypedProperties.ts === ++// --- (line: 43) skipped --- ++// }; ++// ++// var o9: I = { ++// get ["/*RENAME*/prop1"]() { return () => { }; }, ++// get ["prop2"]() { return () => { }; } ++// }; ++// ++// // --- (line: 51) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameContextuallyTypedProperties.ts === ++// --- (line: 48) skipped --- ++// }; ++// ++// var o10: I = { ++// set ["/*RENAME*/prop1"](v) { }, + // set ["prop2"](v) { } + // }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties2.baseline.jsonc new file mode 100644 index 0000000000..2701f8b18c --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties2.baseline.jsonc @@ -0,0 +1,373 @@ +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// interface I { +// prop1: () => void; +// /*RENAME*/[|prop2RENAME|](): void; +// } +// +// var o1: I = { +// prop1() { }, +// [|prop2RENAME|]() { } +// }; +// +// var o2: I = { +// prop1: () => { }, +// [|prop2RENAME|]: () => { } +// }; +// +// var o3: I = { +// get prop1() { return () => { }; }, +// get [|prop2RENAME|]() { return () => { }; } +// }; +// +// var o4: I = { +// set prop1(v) { }, +// set [|prop2RENAME|](v) { } +// }; +// +// var o5: I = { +// "prop1"() { }, +// "[|prop2RENAME|]"() { } +// }; +// +// var o6: I = { +// "prop1": function () { }, +// "[|prop2RENAME|]": function () { } +// }; +// +// var o7: I = { +// ["prop1"]: function () { }, +// ["[|prop2RENAME|]"]: function () { } +// }; +// +// var o8: I = { +// ["prop1"]() { }, +// ["[|prop2RENAME|]"]() { } +// }; +// +// var o9: I = { +// get ["prop1"]() { return () => { }; }, +// get ["[|prop2RENAME|]"]() { return () => { }; } +// }; +// +// var o10: I = { +// set ["prop1"](v) { }, +// set ["[|prop2RENAME|]"](v) { } +// }; + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// interface I { +// prop1: () => void; +// [|prop2RENAME|](): void; +// } +// +// var o1: I = { +// prop1() { }, +// /*RENAME*/[|prop2RENAME|]() { } +// }; +// +// var o2: I = { +// prop1: () => { }, +// [|prop2RENAME|]: () => { } +// }; +// +// var o3: I = { +// get prop1() { return () => { }; }, +// get [|prop2RENAME|]() { return () => { }; } +// }; +// +// var o4: I = { +// set prop1(v) { }, +// set [|prop2RENAME|](v) { } +// }; +// +// var o5: I = { +// "prop1"() { }, +// "[|prop2RENAME|]"() { } +// }; +// +// var o6: I = { +// "prop1": function () { }, +// "[|prop2RENAME|]": function () { } +// }; +// +// var o7: I = { +// ["prop1"]: function () { }, +// ["[|prop2RENAME|]"]: function () { } +// }; +// +// var o8: I = { +// ["prop1"]() { }, +// ["[|prop2RENAME|]"]() { } +// }; +// +// var o9: I = { +// get ["prop1"]() { return () => { }; }, +// get ["[|prop2RENAME|]"]() { return () => { }; } +// }; +// +// var o10: I = { +// set ["prop1"](v) { }, +// set ["[|prop2RENAME|]"](v) { } +// }; + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// interface I { +// prop1: () => void; +// [|prop2RENAME|](): void; +// } +// +// var o1: I = { +// prop1() { }, +// [|prop2RENAME|]() { } +// }; +// +// var o2: I = { +// prop1: () => { }, +// /*RENAME*/[|prop2RENAME|]: () => { } +// }; +// +// var o3: I = { +// get prop1() { return () => { }; }, +// get [|prop2RENAME|]() { return () => { }; } +// }; +// +// var o4: I = { +// set prop1(v) { }, +// set [|prop2RENAME|](v) { } +// }; +// +// var o5: I = { +// "prop1"() { }, +// "[|prop2RENAME|]"() { } +// }; +// +// var o6: I = { +// "prop1": function () { }, +// "[|prop2RENAME|]": function () { } +// }; +// +// var o7: I = { +// ["prop1"]: function () { }, +// ["[|prop2RENAME|]"]: function () { } +// }; +// +// var o8: I = { +// ["prop1"]() { }, +// ["[|prop2RENAME|]"]() { } +// }; +// +// var o9: I = { +// get ["prop1"]() { return () => { }; }, +// get ["[|prop2RENAME|]"]() { return () => { }; } +// }; +// +// var o10: I = { +// set ["prop1"](v) { }, +// set ["[|prop2RENAME|]"](v) { } +// }; + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// interface I { +// prop1: () => void; +// [|prop2RENAME|](): void; +// } +// +// var o1: I = { +// prop1() { }, +// [|prop2RENAME|]() { } +// }; +// +// var o2: I = { +// prop1: () => { }, +// [|prop2RENAME|]: () => { } +// }; +// +// var o3: I = { +// get prop1() { return () => { }; }, +// get /*RENAME*/[|prop2RENAME|]() { return () => { }; } +// }; +// +// var o4: I = { +// set prop1(v) { }, +// set [|prop2RENAME|](v) { } +// }; +// +// var o5: I = { +// "prop1"() { }, +// "[|prop2RENAME|]"() { } +// }; +// +// var o6: I = { +// "prop1": function () { }, +// "[|prop2RENAME|]": function () { } +// }; +// +// var o7: I = { +// ["prop1"]: function () { }, +// ["[|prop2RENAME|]"]: function () { } +// }; +// +// var o8: I = { +// ["prop1"]() { }, +// ["[|prop2RENAME|]"]() { } +// }; +// +// var o9: I = { +// get ["prop1"]() { return () => { }; }, +// get ["[|prop2RENAME|]"]() { return () => { }; } +// }; +// +// var o10: I = { +// set ["prop1"](v) { }, +// set ["[|prop2RENAME|]"](v) { } +// }; + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// interface I { +// prop1: () => void; +// [|prop2RENAME|](): void; +// } +// +// var o1: I = { +// prop1() { }, +// [|prop2RENAME|]() { } +// }; +// +// var o2: I = { +// prop1: () => { }, +// [|prop2RENAME|]: () => { } +// }; +// +// var o3: I = { +// get prop1() { return () => { }; }, +// get [|prop2RENAME|]() { return () => { }; } +// }; +// +// var o4: I = { +// set prop1(v) { }, +// set /*RENAME*/[|prop2RENAME|](v) { } +// }; +// +// var o5: I = { +// "prop1"() { }, +// "[|prop2RENAME|]"() { } +// }; +// +// var o6: I = { +// "prop1": function () { }, +// "[|prop2RENAME|]": function () { } +// }; +// +// var o7: I = { +// ["prop1"]: function () { }, +// ["[|prop2RENAME|]"]: function () { } +// }; +// +// var o8: I = { +// ["prop1"]() { }, +// ["[|prop2RENAME|]"]() { } +// }; +// +// var o9: I = { +// get ["prop1"]() { return () => { }; }, +// get ["[|prop2RENAME|]"]() { return () => { }; } +// }; +// +// var o10: I = { +// set ["prop1"](v) { }, +// set ["[|prop2RENAME|]"](v) { } +// }; + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// --- (line: 24) skipped --- +// +// var o5: I = { +// "prop1"() { }, +// "/*RENAME*/prop2"() { } +// }; +// +// var o6: I = { +// // --- (line: 32) skipped --- + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// --- (line: 29) skipped --- +// +// var o6: I = { +// "prop1": function () { }, +// "/*RENAME*/prop2": function () { } +// }; +// +// var o7: I = { +// // --- (line: 37) skipped --- + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// --- (line: 34) skipped --- +// +// var o7: I = { +// ["prop1"]: function () { }, +// ["/*RENAME*/prop2"]: function () { } +// }; +// +// var o8: I = { +// // --- (line: 42) skipped --- + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// --- (line: 39) skipped --- +// +// var o8: I = { +// ["prop1"]() { }, +// ["/*RENAME*/prop2"]() { } +// }; +// +// var o9: I = { +// // --- (line: 47) skipped --- + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// --- (line: 44) skipped --- +// +// var o9: I = { +// get ["prop1"]() { return () => { }; }, +// get ["/*RENAME*/prop2"]() { return () => { }; } +// }; +// +// var o10: I = { +// // --- (line: 52) skipped --- + + + +// === findRenameLocations === +// === /renameContextuallyTypedProperties2.ts === +// --- (line: 49) skipped --- +// +// var o10: I = { +// set ["prop1"](v) { }, +// set ["/*RENAME*/prop2"](v) { } +// }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties2.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties2.baseline.jsonc.diff new file mode 100644 index 0000000000..9cb5b9653a --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameContextuallyTypedProperties2.baseline.jsonc.diff @@ -0,0 +1,430 @@ +--- old.renameContextuallyTypedProperties2.baseline.jsonc ++++ new.renameContextuallyTypedProperties2.baseline.jsonc +@@= skipped -294, +294 lines =@@ + + // === findRenameLocations === + // === /renameContextuallyTypedProperties2.ts === +-// interface I { +-// prop1: () => void; +-// [|prop2RENAME|](): void; +-// } +-// +-// var o1: I = { +-// prop1() { }, +-// [|prop2RENAME|]() { } +-// }; +-// +-// var o2: I = { +-// prop1: () => { }, +-// [|prop2RENAME|]: () => { } +-// }; +-// +-// var o3: I = { +-// get prop1() { return () => { }; }, +-// get [|prop2RENAME|]() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set prop1(v) { }, +-// set [|prop2RENAME|](v) { } +-// }; +-// +-// var o5: I = { +-// "prop1"() { }, +-// "/*RENAME*/[|prop2RENAME|]"() { } +-// }; +-// +-// var o6: I = { +-// "prop1": function () { }, +-// "[|prop2RENAME|]": function () { } +-// }; +-// +-// var o7: I = { +-// ["prop1"]: function () { }, +-// ["[|prop2RENAME|]"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["prop1"]() { }, +-// ["[|prop2RENAME|]"]() { } +-// }; +-// +-// var o9: I = { +-// get ["prop1"]() { return () => { }; }, +-// get ["[|prop2RENAME|]"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["prop1"](v) { }, +-// set ["[|prop2RENAME|]"](v) { } +-// }; +- +- +- +-// === findRenameLocations === +-// === /renameContextuallyTypedProperties2.ts === +-// interface I { +-// prop1: () => void; +-// [|prop2RENAME|](): void; +-// } +-// +-// var o1: I = { +-// prop1() { }, +-// [|prop2RENAME|]() { } +-// }; +-// +-// var o2: I = { +-// prop1: () => { }, +-// [|prop2RENAME|]: () => { } +-// }; +-// +-// var o3: I = { +-// get prop1() { return () => { }; }, +-// get [|prop2RENAME|]() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set prop1(v) { }, +-// set [|prop2RENAME|](v) { } +-// }; +-// +-// var o5: I = { +-// "prop1"() { }, +-// "[|prop2RENAME|]"() { } +-// }; +-// +-// var o6: I = { +-// "prop1": function () { }, +-// "/*RENAME*/[|prop2RENAME|]": function () { } +-// }; +-// +-// var o7: I = { +-// ["prop1"]: function () { }, +-// ["[|prop2RENAME|]"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["prop1"]() { }, +-// ["[|prop2RENAME|]"]() { } +-// }; +-// +-// var o9: I = { +-// get ["prop1"]() { return () => { }; }, +-// get ["[|prop2RENAME|]"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["prop1"](v) { }, +-// set ["[|prop2RENAME|]"](v) { } +-// }; +- +- +- +-// === findRenameLocations === +-// === /renameContextuallyTypedProperties2.ts === +-// interface I { +-// prop1: () => void; +-// [|prop2RENAME|](): void; +-// } +-// +-// var o1: I = { +-// prop1() { }, +-// [|prop2RENAME|]() { } +-// }; +-// +-// var o2: I = { +-// prop1: () => { }, +-// [|prop2RENAME|]: () => { } +-// }; +-// +-// var o3: I = { +-// get prop1() { return () => { }; }, +-// get [|prop2RENAME|]() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set prop1(v) { }, +-// set [|prop2RENAME|](v) { } +-// }; +-// +-// var o5: I = { +-// "prop1"() { }, +-// "[|prop2RENAME|]"() { } +-// }; +-// +-// var o6: I = { +-// "prop1": function () { }, +-// "[|prop2RENAME|]": function () { } +-// }; +-// +-// var o7: I = { +-// ["prop1"]: function () { }, +-// ["/*RENAME*/[|prop2RENAME|]"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["prop1"]() { }, +-// ["[|prop2RENAME|]"]() { } +-// }; +-// +-// var o9: I = { +-// get ["prop1"]() { return () => { }; }, +-// get ["[|prop2RENAME|]"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["prop1"](v) { }, +-// set ["[|prop2RENAME|]"](v) { } +-// }; +- +- +- +-// === findRenameLocations === +-// === /renameContextuallyTypedProperties2.ts === +-// interface I { +-// prop1: () => void; +-// [|prop2RENAME|](): void; +-// } +-// +-// var o1: I = { +-// prop1() { }, +-// [|prop2RENAME|]() { } +-// }; +-// +-// var o2: I = { +-// prop1: () => { }, +-// [|prop2RENAME|]: () => { } +-// }; +-// +-// var o3: I = { +-// get prop1() { return () => { }; }, +-// get [|prop2RENAME|]() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set prop1(v) { }, +-// set [|prop2RENAME|](v) { } +-// }; +-// +-// var o5: I = { +-// "prop1"() { }, +-// "[|prop2RENAME|]"() { } +-// }; +-// +-// var o6: I = { +-// "prop1": function () { }, +-// "[|prop2RENAME|]": function () { } +-// }; +-// +-// var o7: I = { +-// ["prop1"]: function () { }, +-// ["[|prop2RENAME|]"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["prop1"]() { }, +-// ["/*RENAME*/[|prop2RENAME|]"]() { } +-// }; +-// +-// var o9: I = { +-// get ["prop1"]() { return () => { }; }, +-// get ["[|prop2RENAME|]"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["prop1"](v) { }, +-// set ["[|prop2RENAME|]"](v) { } +-// }; +- +- +- +-// === findRenameLocations === +-// === /renameContextuallyTypedProperties2.ts === +-// interface I { +-// prop1: () => void; +-// [|prop2RENAME|](): void; +-// } +-// +-// var o1: I = { +-// prop1() { }, +-// [|prop2RENAME|]() { } +-// }; +-// +-// var o2: I = { +-// prop1: () => { }, +-// [|prop2RENAME|]: () => { } +-// }; +-// +-// var o3: I = { +-// get prop1() { return () => { }; }, +-// get [|prop2RENAME|]() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set prop1(v) { }, +-// set [|prop2RENAME|](v) { } +-// }; +-// +-// var o5: I = { +-// "prop1"() { }, +-// "[|prop2RENAME|]"() { } +-// }; +-// +-// var o6: I = { +-// "prop1": function () { }, +-// "[|prop2RENAME|]": function () { } +-// }; +-// +-// var o7: I = { +-// ["prop1"]: function () { }, +-// ["[|prop2RENAME|]"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["prop1"]() { }, +-// ["[|prop2RENAME|]"]() { } +-// }; +-// +-// var o9: I = { +-// get ["prop1"]() { return () => { }; }, +-// get ["/*RENAME*/[|prop2RENAME|]"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["prop1"](v) { }, +-// set ["[|prop2RENAME|]"](v) { } +-// }; +- +- +- +-// === findRenameLocations === +-// === /renameContextuallyTypedProperties2.ts === +-// interface I { +-// prop1: () => void; +-// [|prop2RENAME|](): void; +-// } +-// +-// var o1: I = { +-// prop1() { }, +-// [|prop2RENAME|]() { } +-// }; +-// +-// var o2: I = { +-// prop1: () => { }, +-// [|prop2RENAME|]: () => { } +-// }; +-// +-// var o3: I = { +-// get prop1() { return () => { }; }, +-// get [|prop2RENAME|]() { return () => { }; } +-// }; +-// +-// var o4: I = { +-// set prop1(v) { }, +-// set [|prop2RENAME|](v) { } +-// }; +-// +-// var o5: I = { +-// "prop1"() { }, +-// "[|prop2RENAME|]"() { } +-// }; +-// +-// var o6: I = { +-// "prop1": function () { }, +-// "[|prop2RENAME|]": function () { } +-// }; +-// +-// var o7: I = { +-// ["prop1"]: function () { }, +-// ["[|prop2RENAME|]"]: function () { } +-// }; +-// +-// var o8: I = { +-// ["prop1"]() { }, +-// ["[|prop2RENAME|]"]() { } +-// }; +-// +-// var o9: I = { +-// get ["prop1"]() { return () => { }; }, +-// get ["[|prop2RENAME|]"]() { return () => { }; } +-// }; +-// +-// var o10: I = { +-// set ["prop1"](v) { }, +-// set ["/*RENAME*/[|prop2RENAME|]"](v) { } ++// --- (line: 24) skipped --- ++// ++// var o5: I = { ++// "prop1"() { }, ++// "/*RENAME*/prop2"() { } ++// }; ++// ++// var o6: I = { ++// // --- (line: 32) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameContextuallyTypedProperties2.ts === ++// --- (line: 29) skipped --- ++// ++// var o6: I = { ++// "prop1": function () { }, ++// "/*RENAME*/prop2": function () { } ++// }; ++// ++// var o7: I = { ++// // --- (line: 37) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameContextuallyTypedProperties2.ts === ++// --- (line: 34) skipped --- ++// ++// var o7: I = { ++// ["prop1"]: function () { }, ++// ["/*RENAME*/prop2"]: function () { } ++// }; ++// ++// var o8: I = { ++// // --- (line: 42) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameContextuallyTypedProperties2.ts === ++// --- (line: 39) skipped --- ++// ++// var o8: I = { ++// ["prop1"]() { }, ++// ["/*RENAME*/prop2"]() { } ++// }; ++// ++// var o9: I = { ++// // --- (line: 47) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameContextuallyTypedProperties2.ts === ++// --- (line: 44) skipped --- ++// ++// var o9: I = { ++// get ["prop1"]() { return () => { }; }, ++// get ["/*RENAME*/prop2"]() { return () => { }; } ++// }; ++// ++// var o10: I = { ++// // --- (line: 52) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameContextuallyTypedProperties2.ts === ++// --- (line: 49) skipped --- ++// ++// var o10: I = { ++// set ["prop1"](v) { }, ++// set ["/*RENAME*/prop2"](v) { } + // }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDeclarationKeywords.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDeclarationKeywords.baseline.jsonc new file mode 100644 index 0000000000..f0155261f0 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDeclarationKeywords.baseline.jsonc @@ -0,0 +1,191 @@ +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// class Base {} +// interface Implemented1 {} +// /*RENAME*/class C1 extends Base implements Implemented1 { +// get e() { return 1; } +// set e(v) {} +// } +// // --- (line: 7) skipped --- + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// class Base {} +// interface Implemented1 {} +// class C1 /*RENAME*/extends Base implements Implemented1 { +// get e() { return 1; } +// set e(v) {} +// } +// // --- (line: 7) skipped --- + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// class Base {} +// interface Implemented1 {} +// class C1 extends Base /*RENAME*/implements Implemented1 { +// get e() { return 1; } +// set e(v) {} +// } +// // --- (line: 7) skipped --- + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// class Base {} +// interface Implemented1 {} +// class C1 extends Base implements Implemented1 { +// /*RENAME*/get e() { return 1; } +// set e(v) {} +// } +// interface I1 extends Base { } +// // --- (line: 8) skipped --- + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// class Base {} +// interface Implemented1 {} +// class C1 extends Base implements Implemented1 { +// get e() { return 1; } +// /*RENAME*/set e(v) {} +// } +// interface I1 extends Base { } +// type T = { } +// // --- (line: 9) skipped --- + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// --- (line: 3) skipped --- +// get e() { return 1; } +// set e(v) {} +// } +// /*RENAME*/interface I1 extends Base { } +// type T = { } +// enum E { } +// namespace N { } +// // --- (line: 11) skipped --- + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// --- (line: 3) skipped --- +// get e() { return 1; } +// set e(v) {} +// } +// interface I1 /*RENAME*/extends Base { } +// type T = { } +// enum E { } +// namespace N { } +// // --- (line: 11) skipped --- + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// --- (line: 4) skipped --- +// set e(v) {} +// } +// interface I1 extends Base { } +// /*RENAME*/type T = { } +// enum E { } +// namespace N { } +// module M { } +// // --- (line: 12) skipped --- + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// --- (line: 5) skipped --- +// } +// interface I1 extends Base { } +// type T = { } +// /*RENAME*/enum E { } +// namespace N { } +// module M { } +// function fn() {} +// // --- (line: 13) skipped --- + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// --- (line: 6) skipped --- +// interface I1 extends Base { } +// type T = { } +// enum E { } +// /*RENAME*/namespace N { } +// module M { } +// function fn() {} +// var x; +// let y; +// const z = 1; + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// --- (line: 7) skipped --- +// type T = { } +// enum E { } +// namespace N { } +// /*RENAME*/module M { } +// function fn() {} +// var x; +// let y; +// const z = 1; + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// --- (line: 8) skipped --- +// enum E { } +// namespace N { } +// module M { } +// /*RENAME*/function fn() {} +// var x; +// let y; +// const z = 1; + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// --- (line: 9) skipped --- +// namespace N { } +// module M { } +// function fn() {} +// /*RENAME*/var x; +// let y; +// const z = 1; + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// --- (line: 10) skipped --- +// module M { } +// function fn() {} +// var x; +// /*RENAME*/let y; +// const z = 1; + + + +// === findRenameLocations === +// === /renameDeclarationKeywords.ts === +// --- (line: 11) skipped --- +// function fn() {} +// var x; +// let y; +// /*RENAME*/const z = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDeclarationKeywords.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDeclarationKeywords.baseline.jsonc.diff new file mode 100644 index 0000000000..994bb4b0aa --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDeclarationKeywords.baseline.jsonc.diff @@ -0,0 +1,266 @@ +--- old.renameDeclarationKeywords.baseline.jsonc ++++ new.renameDeclarationKeywords.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /renameDeclarationKeywords.ts === + // class Base {} + // interface Implemented1 {} +-// /*RENAME*/class [|C1RENAME|] extends Base implements Implemented1 { +-// get e() { return 1; } +-// set e(v) {} +-// } +-// interface I1 extends Base { } +-// type T = { } +-// enum E { } +-// --- (line: 10) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameDeclarationKeywords.ts === +-// class [|BaseRENAME|] {} +-// interface Implemented1 {} +-// class C1 /*RENAME*/extends [|BaseRENAME|] implements Implemented1 { +-// get e() { return 1; } +-// set e(v) {} +-// } +-// interface I1 extends [|BaseRENAME|] { } +-// type T = { } +-// enum E { } +-// namespace N { } +-// --- (line: 11) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameDeclarationKeywords.ts === +-// class Base {} +-// interface [|Implemented1RENAME|] {} +-// class C1 extends Base /*RENAME*/implements [|Implemented1RENAME|] { +-// get e() { return 1; } +-// set e(v) {} +-// } +-// --- (line: 7) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameDeclarationKeywords.ts === +-// class Base {} +-// interface Implemented1 {} +-// class C1 extends Base implements Implemented1 { +-// /*RENAME*/get [|eRENAME|]() { return 1; } +-// set [|eRENAME|](v) {} +-// } +-// interface I1 extends Base { } +-// type T = { } +-// --- (line: 9) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameDeclarationKeywords.ts === +-// class Base {} +-// interface Implemented1 {} +-// class C1 extends Base implements Implemented1 { +-// get [|eRENAME|]() { return 1; } +-// /*RENAME*/set [|eRENAME|](v) {} +-// } +-// interface I1 extends Base { } +-// type T = { } +-// --- (line: 9) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameDeclarationKeywords.ts === +-// --- (line: 3) skipped --- +-// get e() { return 1; } +-// set e(v) {} +-// } +-// /*RENAME*/interface [|I1RENAME|] extends Base { } +-// type T = { } +-// enum E { } +-// namespace N { } +-// --- (line: 11) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameDeclarationKeywords.ts === +-// class [|BaseRENAME|] {} +-// interface Implemented1 {} +-// class C1 extends [|BaseRENAME|] implements Implemented1 { +-// get e() { return 1; } +-// set e(v) {} +-// } +-// interface I1 /*RENAME*/extends [|BaseRENAME|] { } +-// type T = { } +-// enum E { } +-// namespace N { } +-// --- (line: 11) skipped --- ++// /*RENAME*/class C1 extends Base implements Implemented1 { ++// get e() { return 1; } ++// set e(v) {} ++// } ++// // --- (line: 7) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameDeclarationKeywords.ts === ++// class Base {} ++// interface Implemented1 {} ++// class C1 /*RENAME*/extends Base implements Implemented1 { ++// get e() { return 1; } ++// set e(v) {} ++// } ++// // --- (line: 7) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameDeclarationKeywords.ts === ++// class Base {} ++// interface Implemented1 {} ++// class C1 extends Base /*RENAME*/implements Implemented1 { ++// get e() { return 1; } ++// set e(v) {} ++// } ++// // --- (line: 7) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameDeclarationKeywords.ts === ++// class Base {} ++// interface Implemented1 {} ++// class C1 extends Base implements Implemented1 { ++// /*RENAME*/get e() { return 1; } ++// set e(v) {} ++// } ++// interface I1 extends Base { } ++// // --- (line: 8) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameDeclarationKeywords.ts === ++// class Base {} ++// interface Implemented1 {} ++// class C1 extends Base implements Implemented1 { ++// get e() { return 1; } ++// /*RENAME*/set e(v) {} ++// } ++// interface I1 extends Base { } ++// type T = { } ++// // --- (line: 9) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameDeclarationKeywords.ts === ++// --- (line: 3) skipped --- ++// get e() { return 1; } ++// set e(v) {} ++// } ++// /*RENAME*/interface I1 extends Base { } ++// type T = { } ++// enum E { } ++// namespace N { } ++// // --- (line: 11) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameDeclarationKeywords.ts === ++// --- (line: 3) skipped --- ++// get e() { return 1; } ++// set e(v) {} ++// } ++// interface I1 /*RENAME*/extends Base { } ++// type T = { } ++// enum E { } ++// namespace N { } ++// // --- (line: 11) skipped --- + + + +@@= skipped -103, +93 lines =@@ + // set e(v) {} + // } + // interface I1 extends Base { } +-// /*RENAME*/type [|TRENAME|] = { } ++// /*RENAME*/type T = { } + // enum E { } + // namespace N { } + // module M { } +-// --- (line: 12) skipped --- ++// // --- (line: 12) skipped --- + + + +@@= skipped -14, +14 lines =@@ + // } + // interface I1 extends Base { } + // type T = { } +-// /*RENAME*/enum [|ERENAME|] { } ++// /*RENAME*/enum E { } + // namespace N { } + // module M { } + // function fn() {} +-// --- (line: 13) skipped --- ++// // --- (line: 13) skipped --- + + + +@@= skipped -14, +14 lines =@@ + // interface I1 extends Base { } + // type T = { } + // enum E { } +-// /*RENAME*/namespace [|NRENAME|] { } ++// /*RENAME*/namespace N { } + // module M { } + // function fn() {} + // var x; +@@= skipped -15, +15 lines =@@ + // type T = { } + // enum E { } + // namespace N { } +-// /*RENAME*/module [|MRENAME|] { } ++// /*RENAME*/module M { } + // function fn() {} + // var x; + // let y; +@@= skipped -14, +14 lines =@@ + // enum E { } + // namespace N { } + // module M { } +-// /*RENAME*/function [|fnRENAME|]() {} ++// /*RENAME*/function fn() {} + // var x; + // let y; + // const z = 1; +@@= skipped -13, +13 lines =@@ + // namespace N { } + // module M { } + // function fn() {} +-// /*RENAME*/var [|xRENAME|]; ++// /*RENAME*/var x; + // let y; + // const z = 1; + +@@= skipped -12, +12 lines =@@ + // module M { } + // function fn() {} + // var x; +-// /*RENAME*/let [|yRENAME|]; ++// /*RENAME*/let y; + // const z = 1; + + +@@= skipped -11, +11 lines =@@ + // function fn() {} + // var x; + // let y; +-// /*RENAME*/const [|zRENAME|] = 1; ++// /*RENAME*/const z = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDefaultLibDontWork.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDefaultLibDontWork.baseline.jsonc new file mode 100644 index 0000000000..78e6d47758 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDefaultLibDontWork.baseline.jsonc @@ -0,0 +1,4 @@ +// === findRenameLocations === +// === /file1.ts === +// var /*RENAME*/[|testRENAME|] = "foo"; +// console.log([|testRENAME|]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDefaultLibDontWork.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDefaultLibDontWork.baseline.jsonc.diff new file mode 100644 index 0000000000..c1cf1d7d15 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDefaultLibDontWork.baseline.jsonc.diff @@ -0,0 +1,8 @@ +--- old.renameDefaultLibDontWork.baseline.jsonc ++++ new.renameDefaultLibDontWork.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /file1.ts === + // var /*RENAME*/[|testRENAME|] = "foo"; + // console.log([|testRENAME|]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringAssignment.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringAssignment.baseline.jsonc new file mode 100644 index 0000000000..1e5ed18275 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringAssignment.baseline.jsonc @@ -0,0 +1,19 @@ +// === findRenameLocations === +// === /renameDestructuringAssignment.ts === +// interface I { +// /*RENAME*/[|xRENAME|]: number; +// } +// var a: I; +// var x; +// ({ [|xRENAME|]: x } = a); + + + +// === findRenameLocations === +// === /renameDestructuringAssignment.ts === +// interface I { +// [|xRENAME|]: number; +// } +// var a: I; +// var x; +// ({ /*RENAME*/[|xRENAME|]: x } = a); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringAssignmentNestedInArrayLiteral.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringAssignmentNestedInArrayLiteral.baseline.jsonc new file mode 100644 index 0000000000..5f243b92f5 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringAssignmentNestedInArrayLiteral.baseline.jsonc @@ -0,0 +1,45 @@ +// === findRenameLocations === +// === /renameDestructuringAssignmentNestedInArrayLiteral.ts === +// interface I { +// /*RENAME*/[|property1RENAME|]: number; +// property2: string; +// } +// var elems: I[], p1: number, property1: number; +// [{ [|property1RENAME|]: p1 }] = elems; +// [{ [|property1RENAME|]: property1/*END SUFFIX*/ }] = elems; + + + +// === findRenameLocations === +// === /renameDestructuringAssignmentNestedInArrayLiteral.ts === +// interface I { +// [|property1RENAME|]: number; +// property2: string; +// } +// var elems: I[], p1: number, property1: number; +// [{ /*RENAME*/[|property1RENAME|]: p1 }] = elems; +// [{ [|property1RENAME|]: property1/*END SUFFIX*/ }] = elems; + + + +// === findRenameLocations === +// === /renameDestructuringAssignmentNestedInArrayLiteral.ts === +// interface I { +// property1: number; +// property2: string; +// } +// var elems: I[], p1: number, /*RENAME*/[|property1RENAME|]: number; +// [{ property1: p1 }] = elems; +// [{ /*START PREFIX*/property1: [|property1RENAME|] }] = elems; + + + +// === findRenameLocations === +// === /renameDestructuringAssignmentNestedInArrayLiteral.ts === +// interface I { +// property1: number; +// property2: string; +// } +// var elems: I[], p1: number, [|property1RENAME|]: number; +// [{ property1: p1 }] = elems; +// [{ /*START PREFIX*/property1: /*RENAME*/[|property1RENAME|] }] = elems; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringAssignmentNestedInForOf2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringAssignmentNestedInForOf2.baseline.jsonc new file mode 100644 index 0000000000..1d6d63f567 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringAssignmentNestedInForOf2.baseline.jsonc @@ -0,0 +1,83 @@ +// === findRenameLocations === +// === /renameDestructuringAssignmentNestedInForOf2.ts === +// interface MultiRobot { +// name: string; +// skills: { +// /*RENAME*/[|primaryRENAME|]: string; +// secondary: string; +// }; +// } +// let multiRobots: MultiRobot[], primary: string; +// for ({ skills: { [|primaryRENAME|]: primaryA, secondary: secondaryA } } of multiRobots) { +// console.log(primaryA); +// } +// for ({ skills: { [|primaryRENAME|]: primary/*END SUFFIX*/, secondary } } of multiRobots) { +// console.log(primary); +// } + + + +// === findRenameLocations === +// === /renameDestructuringAssignmentNestedInForOf2.ts === +// interface MultiRobot { +// name: string; +// skills: { +// [|primaryRENAME|]: string; +// secondary: string; +// }; +// } +// let multiRobots: MultiRobot[], primary: string; +// for ({ skills: { /*RENAME*/[|primaryRENAME|]: primaryA, secondary: secondaryA } } of multiRobots) { +// console.log(primaryA); +// } +// for ({ skills: { [|primaryRENAME|]: primary/*END SUFFIX*/, secondary } } of multiRobots) { +// console.log(primary); +// } + + + +// === findRenameLocations === +// === /renameDestructuringAssignmentNestedInForOf2.ts === +// --- (line: 4) skipped --- +// secondary: string; +// }; +// } +// let multiRobots: MultiRobot[], /*RENAME*/[|primaryRENAME|]: string; +// for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +// console.log(primaryA); +// } +// for ({ skills: { /*START PREFIX*/primary: [|primaryRENAME|], secondary } } of multiRobots) { +// console.log([|primaryRENAME|]); +// } + + + +// === findRenameLocations === +// === /renameDestructuringAssignmentNestedInForOf2.ts === +// --- (line: 4) skipped --- +// secondary: string; +// }; +// } +// let multiRobots: MultiRobot[], [|primaryRENAME|]: string; +// for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +// console.log(primaryA); +// } +// for ({ skills: { /*START PREFIX*/primary: /*RENAME*/[|primaryRENAME|], secondary } } of multiRobots) { +// console.log([|primaryRENAME|]); +// } + + + +// === findRenameLocations === +// === /renameDestructuringAssignmentNestedInForOf2.ts === +// --- (line: 4) skipped --- +// secondary: string; +// }; +// } +// let multiRobots: MultiRobot[], [|primaryRENAME|]: string; +// for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +// console.log(primaryA); +// } +// for ({ skills: { /*START PREFIX*/primary: [|primaryRENAME|], secondary } } of multiRobots) { +// console.log(/*RENAME*/[|primaryRENAME|]); +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringClassProperty.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringClassProperty.baseline.jsonc new file mode 100644 index 0000000000..d8e5f06926 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringClassProperty.baseline.jsonc @@ -0,0 +1,78 @@ +// === findRenameLocations === +// === /renameDestructuringClassProperty.ts === +// class A { +// /*RENAME*/[|fooRENAME|]: string; +// } +// class B { +// syntax1(a: A): void { +// let { [|fooRENAME|]: foo/*END SUFFIX*/ } = a; +// } +// syntax2(a: A): void { +// let { [|fooRENAME|]: foo } = a; +// } +// syntax11(a: A): void { +// let { [|fooRENAME|]: foo/*END SUFFIX*/ } = a; +// foo = "newString"; +// } +// } + + + +// === findRenameLocations === +// === /renameDestructuringClassProperty.ts === +// class A { +// [|fooRENAME|]: string; +// } +// class B { +// syntax1(a: A): void { +// let { [|fooRENAME|]: foo/*END SUFFIX*/ } = a; +// } +// syntax2(a: A): void { +// let { /*RENAME*/[|fooRENAME|]: foo } = a; +// } +// syntax11(a: A): void { +// let { [|fooRENAME|]: foo/*END SUFFIX*/ } = a; +// foo = "newString"; +// } +// } + + + +// === findRenameLocations === +// === /renameDestructuringClassProperty.ts === +// class A { +// foo: string; +// } +// class B { +// syntax1(a: A): void { +// let { /*START PREFIX*/foo: /*RENAME*/[|fooRENAME|] } = a; +// } +// syntax2(a: A): void { +// let { foo: foo } = a; +// // --- (line: 10) skipped --- + + + +// === findRenameLocations === +// === /renameDestructuringClassProperty.ts === +// --- (line: 8) skipped --- +// let { foo: foo } = a; +// } +// syntax11(a: A): void { +// let { /*START PREFIX*/foo: /*RENAME*/[|fooRENAME|] } = a; +// [|fooRENAME|] = "newString"; +// } +// } + + + +// === findRenameLocations === +// === /renameDestructuringClassProperty.ts === +// --- (line: 8) skipped --- +// let { foo: foo } = a; +// } +// syntax11(a: A): void { +// let { /*START PREFIX*/foo: [|fooRENAME|] } = a; +// /*RENAME*/[|fooRENAME|] = "newString"; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringClassProperty.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringClassProperty.baseline.jsonc.diff new file mode 100644 index 0000000000..c5b0529fbe --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringClassProperty.baseline.jsonc.diff @@ -0,0 +1,10 @@ +--- old.renameDestructuringClassProperty.baseline.jsonc ++++ new.renameDestructuringClassProperty.baseline.jsonc +@@= skipped -48, +48 lines =@@ + // } + // syntax2(a: A): void { + // let { foo: foo } = a; +-// --- (line: 10) skipped --- ++// // --- (line: 10) skipped --- + + diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringDeclarationInFor.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringDeclarationInFor.baseline.jsonc new file mode 100644 index 0000000000..634b62c027 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringDeclarationInFor.baseline.jsonc @@ -0,0 +1,55 @@ +// === findRenameLocations === +// === /renameDestructuringDeclarationInFor.ts === +// interface I { +// /*RENAME*/[|property1RENAME|]: number; +// property2: string; +// } +// var elems: I[]; +// +// var p2: number, property1: number; +// for (let { [|property1RENAME|]: p2 } = elems[0]; p2 < 100; p2++) { +// } +// for (let { [|property1RENAME|]: property1/*END SUFFIX*/ } = elems[0]; p2 < 100; p2++) { +// property1 = p2; +// } + + + +// === findRenameLocations === +// === /renameDestructuringDeclarationInFor.ts === +// interface I { +// [|property1RENAME|]: number; +// property2: string; +// } +// var elems: I[]; +// +// var p2: number, property1: number; +// for (let { /*RENAME*/[|property1RENAME|]: p2 } = elems[0]; p2 < 100; p2++) { +// } +// for (let { [|property1RENAME|]: property1/*END SUFFIX*/ } = elems[0]; p2 < 100; p2++) { +// property1 = p2; +// } + + + +// === findRenameLocations === +// === /renameDestructuringDeclarationInFor.ts === +// --- (line: 6) skipped --- +// var p2: number, property1: number; +// for (let { property1: p2 } = elems[0]; p2 < 100; p2++) { +// } +// for (let { /*START PREFIX*/property1: /*RENAME*/[|property1RENAME|] } = elems[0]; p2 < 100; p2++) { +// [|property1RENAME|] = p2; +// } + + + +// === findRenameLocations === +// === /renameDestructuringDeclarationInFor.ts === +// --- (line: 6) skipped --- +// var p2: number, property1: number; +// for (let { property1: p2 } = elems[0]; p2 < 100; p2++) { +// } +// for (let { /*START PREFIX*/property1: [|property1RENAME|] } = elems[0]; p2 < 100; p2++) { +// /*RENAME*/[|property1RENAME|] = p2; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringDeclarationInForOf.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringDeclarationInForOf.baseline.jsonc new file mode 100644 index 0000000000..23a7989f99 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringDeclarationInForOf.baseline.jsonc @@ -0,0 +1,57 @@ +// === findRenameLocations === +// === /renameDestructuringDeclarationInForOf.ts === +// interface I { +// /*RENAME*/[|property1RENAME|]: number; +// property2: string; +// } +// var elems: I[]; +// +// for (let { [|property1RENAME|]: property1/*END SUFFIX*/ } of elems) { +// property1++; +// } +// for (let { [|property1RENAME|]: p2 } of elems) { +// } + + + +// === findRenameLocations === +// === /renameDestructuringDeclarationInForOf.ts === +// interface I { +// [|property1RENAME|]: number; +// property2: string; +// } +// var elems: I[]; +// +// for (let { [|property1RENAME|]: property1/*END SUFFIX*/ } of elems) { +// property1++; +// } +// for (let { /*RENAME*/[|property1RENAME|]: p2 } of elems) { +// } + + + +// === findRenameLocations === +// === /renameDestructuringDeclarationInForOf.ts === +// --- (line: 3) skipped --- +// } +// var elems: I[]; +// +// for (let { /*START PREFIX*/property1: /*RENAME*/[|property1RENAME|] } of elems) { +// [|property1RENAME|]++; +// } +// for (let { property1: p2 } of elems) { +// } + + + +// === findRenameLocations === +// === /renameDestructuringDeclarationInForOf.ts === +// --- (line: 3) skipped --- +// } +// var elems: I[]; +// +// for (let { /*START PREFIX*/property1: [|property1RENAME|] } of elems) { +// /*RENAME*/[|property1RENAME|]++; +// } +// for (let { property1: p2 } of elems) { +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringFunctionParameter.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringFunctionParameter.baseline.jsonc new file mode 100644 index 0000000000..3da6d4496c --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringFunctionParameter.baseline.jsonc @@ -0,0 +1,21 @@ +// === findRenameLocations === +// === /renameDestructuringFunctionParameter.ts === +// function f({/*START PREFIX*/a: /*RENAME*/[|aRENAME|]}: {a}) { +// f({/*START PREFIX*/a: [|aRENAME|]}); +// } + + + +// === findRenameLocations === +// === /renameDestructuringFunctionParameter.ts === +// function f({/*START PREFIX*/a: [|aRENAME|]}: {a}) { +// f({/*START PREFIX*/a: /*RENAME*/[|aRENAME|]}); +// } + + + +// === findRenameLocations === +// === /renameDestructuringFunctionParameter.ts === +// function f({[|aRENAME|]: a/*END SUFFIX*/}: {/*RENAME*/[|aRENAME|]}) { +// f({[|aRENAME|]: a/*END SUFFIX*/}); +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringNestedBindingElement.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringNestedBindingElement.baseline.jsonc new file mode 100644 index 0000000000..ab3a3fab33 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameDestructuringNestedBindingElement.baseline.jsonc @@ -0,0 +1,59 @@ +// === findRenameLocations === +// === /renameDestructuringNestedBindingElement.ts === +// interface MultiRobot { +// name: string; +// skills: { +// /*RENAME*/[|primaryRENAME|]: string; +// secondary: string; +// }; +// } +// let multiRobots: MultiRobot[]; +// for (let { skills: {[|primaryRENAME|]: primaryA, secondary: secondaryA } } of multiRobots) { +// console.log(primaryA); +// } +// for (let { skills: {[|primaryRENAME|]: primary/*END SUFFIX*/, secondary } } of multiRobots) { +// console.log(primary); +// } + + + +// === findRenameLocations === +// === /renameDestructuringNestedBindingElement.ts === +// interface MultiRobot { +// name: string; +// skills: { +// [|primaryRENAME|]: string; +// secondary: string; +// }; +// } +// let multiRobots: MultiRobot[]; +// for (let { skills: {/*RENAME*/[|primaryRENAME|]: primaryA, secondary: secondaryA } } of multiRobots) { +// console.log(primaryA); +// } +// for (let { skills: {[|primaryRENAME|]: primary/*END SUFFIX*/, secondary } } of multiRobots) { +// console.log(primary); +// } + + + +// === findRenameLocations === +// === /renameDestructuringNestedBindingElement.ts === +// --- (line: 8) skipped --- +// for (let { skills: {primary: primaryA, secondary: secondaryA } } of multiRobots) { +// console.log(primaryA); +// } +// for (let { skills: {/*START PREFIX*/primary: /*RENAME*/[|primaryRENAME|], secondary } } of multiRobots) { +// console.log([|primaryRENAME|]); +// } + + + +// === findRenameLocations === +// === /renameDestructuringNestedBindingElement.ts === +// --- (line: 8) skipped --- +// for (let { skills: {primary: primaryA, secondary: secondaryA } } of multiRobots) { +// console.log(primaryA); +// } +// for (let { skills: {/*START PREFIX*/primary: [|primaryRENAME|], secondary } } of multiRobots) { +// console.log(/*RENAME*/[|primaryRENAME|]); +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportCrash.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportCrash.baseline.jsonc new file mode 100644 index 0000000000..da18660ebe --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportCrash.baseline.jsonc @@ -0,0 +1,5 @@ +// === findRenameLocations === +// === /Foo.js === +// let [|aRENAME|]; +// module.exports = /*RENAME*/[|aRENAME|]; +// exports["foo"] = [|aRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier.baseline.jsonc new file mode 100644 index 0000000000..6e30fd32c4 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier.baseline.jsonc @@ -0,0 +1,6 @@ +// === findRenameLocations === +// @useAliasesForRename: false + +// === /a.ts === +// const name = {}; +// export { name as name/*RENAME*/ }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier.baseline.jsonc.diff new file mode 100644 index 0000000000..6c108ca3a9 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier.baseline.jsonc.diff @@ -0,0 +1,12 @@ +--- old.renameExportSpecifier.baseline.jsonc ++++ new.renameExportSpecifier.baseline.jsonc +@@= skipped -2, +2 lines =@@ + + // === /a.ts === + // const name = {}; +-// export { name as [|nameRENAME|]/*RENAME*/ }; +- +-// === /b.ts === +-// import { [|nameRENAME|] } from './a'; +-// const x = [|nameRENAME|].toString(); ++// export { name as name/*RENAME*/ }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier2.baseline.jsonc new file mode 100644 index 0000000000..155c542abf --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier2.baseline.jsonc @@ -0,0 +1,6 @@ +// === findRenameLocations === +// @useAliasesForRename: false + +// === /a.ts === +// const [|nameRENAME|] = {}; +// export { name/*RENAME*/ }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier2.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier2.baseline.jsonc.diff new file mode 100644 index 0000000000..2fd41bf05f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameExportSpecifier2.baseline.jsonc.diff @@ -0,0 +1,12 @@ +--- old.renameExportSpecifier2.baseline.jsonc ++++ new.renameExportSpecifier2.baseline.jsonc +@@= skipped -2, +2 lines =@@ + + // === /a.ts === + // const [|nameRENAME|] = {}; +-// export { [|nameRENAME|]/*RENAME*/ }; +- +-// === /b.ts === +-// import { [|nameRENAME|] } from './a'; +-// const x = [|nameRENAME|].toString(); ++// export { name/*RENAME*/ }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForDefaultExport01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForDefaultExport01.baseline.jsonc new file mode 100644 index 0000000000..906a20df00 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForDefaultExport01.baseline.jsonc @@ -0,0 +1,39 @@ +// === findRenameLocations === +// === /renameForDefaultExport01.ts === +// export default class /*RENAME*/[|DefaultExportedClassRENAME|] { +// } +// /* +// * Commenting DefaultExportedClass +// */ +// +// var x: [|DefaultExportedClassRENAME|]; +// +// var y = new [|DefaultExportedClassRENAME|]; + + + +// === findRenameLocations === +// === /renameForDefaultExport01.ts === +// export default class [|DefaultExportedClassRENAME|] { +// } +// /* +// * Commenting DefaultExportedClass +// */ +// +// var x: /*RENAME*/[|DefaultExportedClassRENAME|]; +// +// var y = new [|DefaultExportedClassRENAME|]; + + + +// === findRenameLocations === +// === /renameForDefaultExport01.ts === +// export default class [|DefaultExportedClassRENAME|] { +// } +// /* +// * Commenting DefaultExportedClass +// */ +// +// var x: [|DefaultExportedClassRENAME|]; +// +// var y = new /*RENAME*/[|DefaultExportedClassRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForDefaultExport01.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForDefaultExport01.baseline.jsonc.diff new file mode 100644 index 0000000000..57beca9cff --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForDefaultExport01.baseline.jsonc.diff @@ -0,0 +1,42 @@ +--- old.renameForDefaultExport01.baseline.jsonc ++++ new.renameForDefaultExport01.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /renameForDefaultExport01.ts === + // export default class /*RENAME*/[|DefaultExportedClassRENAME|] { + // } + // /* +-// * Commenting [|DefaultExportedClassRENAME|] ++// * Commenting DefaultExportedClass + // */ + // + // var x: [|DefaultExportedClassRENAME|]; +@@= skipped -13, +12 lines =@@ + + + // === findRenameLocations === +- + // === /renameForDefaultExport01.ts === + // export default class [|DefaultExportedClassRENAME|] { + // } + // /* +-// * Commenting [|DefaultExportedClassRENAME|] ++// * Commenting DefaultExportedClass + // */ + // + // var x: /*RENAME*/[|DefaultExportedClassRENAME|]; +@@= skipped -15, +14 lines =@@ + + + // === findRenameLocations === +- + // === /renameForDefaultExport01.ts === + // export default class [|DefaultExportedClassRENAME|] { + // } + // /* +-// * Commenting [|DefaultExportedClassRENAME|] ++// * Commenting DefaultExportedClass + // */ + // + // var x: [|DefaultExportedClassRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForStringLiteral.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForStringLiteral.baseline.jsonc new file mode 100644 index 0000000000..ab37f50e22 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForStringLiteral.baseline.jsonc @@ -0,0 +1,8 @@ +// === findRenameLocations === +// === /a.ts === +// interface Foo { +// property: /*RENAME*/"foo"; +// } +// /** +// * @type {{ property: "foo"}} +// // --- (line: 6) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForStringLiteral.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForStringLiteral.baseline.jsonc.diff new file mode 100644 index 0000000000..3200f0d3c8 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameForStringLiteral.baseline.jsonc.diff @@ -0,0 +1,16 @@ +--- old.renameForStringLiteral.baseline.jsonc ++++ new.renameForStringLiteral.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /a.ts === + // interface Foo { +-// property: /*RENAME*/"[|fooRENAME|]"; ++// property: /*RENAME*/"foo"; + // } + // /** + // * @type {{ property: "foo"}} +-// */ +-// const obj: Foo = { +-// property: "[|fooRENAME|]", +-// } ++// // --- (line: 6) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter1.baseline.jsonc new file mode 100644 index 0000000000..2a4061d4f4 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter1.baseline.jsonc @@ -0,0 +1,10 @@ +// === findRenameLocations === +// === /renameFunctionParameter1.ts === +// function Foo() { +// /** +// * @param {number} p +// */ +// this.foo = function foo([|pRENAME|]/*RENAME*/) { +// return [|pRENAME|]; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter1.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter1.baseline.jsonc.diff new file mode 100644 index 0000000000..08796165aa --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter1.baseline.jsonc.diff @@ -0,0 +1,11 @@ +--- old.renameFunctionParameter1.baseline.jsonc ++++ new.renameFunctionParameter1.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /renameFunctionParameter1.ts === + // function Foo() { + // /** +-// * @param {number} [|pRENAME|] ++// * @param {number} p + // */ + // this.foo = function foo([|pRENAME|]/*RENAME*/) { + // return [|pRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter2.baseline.jsonc new file mode 100644 index 0000000000..84a2628d06 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter2.baseline.jsonc @@ -0,0 +1,8 @@ +// === findRenameLocations === +// === /renameFunctionParameter2.ts === +// /** +// * @param {number} p +// */ +// const foo = function foo([|pRENAME|]/*RENAME*/) { +// return [|pRENAME|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter2.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter2.baseline.jsonc.diff new file mode 100644 index 0000000000..b44d781335 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameFunctionParameter2.baseline.jsonc.diff @@ -0,0 +1,11 @@ +--- old.renameFunctionParameter2.baseline.jsonc ++++ new.renameFunctionParameter2.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameFunctionParameter2.ts === + // /** +-// * @param {number} [|pRENAME|] ++// * @param {number} p + // */ + // const foo = function foo([|pRENAME|]/*RENAME*/) { + // return [|pRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExport.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExport.baseline.jsonc new file mode 100644 index 0000000000..f2c7a402dd --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExport.baseline.jsonc @@ -0,0 +1,11 @@ +// === findRenameLocations === +// === /renameImportAndExport.ts === +// import /*RENAME*/[|aRENAME|] from "module"; +// export { a }; + + + +// === findRenameLocations === +// === /renameImportAndExport.ts === +// import [|aRENAME|] from "module"; +// export { /*RENAME*/a }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExport.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExport.baseline.jsonc.diff new file mode 100644 index 0000000000..7579be5fcf --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExport.baseline.jsonc.diff @@ -0,0 +1,17 @@ +--- old.renameImportAndExport.baseline.jsonc ++++ new.renameImportAndExport.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameImportAndExport.ts === + // import /*RENAME*/[|aRENAME|] from "module"; +-// export { [|aRENAME|] as a/*END SUFFIX*/ }; ++// export { a }; + + + + // === findRenameLocations === + // === /renameImportAndExport.ts === +-// import a from "module"; +-// export { /*START PREFIX*/a as /*RENAME*/[|aRENAME|] }; ++// import [|aRENAME|] from "module"; ++// export { /*RENAME*/a }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExportInDiffFiles.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExportInDiffFiles.baseline.jsonc new file mode 100644 index 0000000000..3df1b40965 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExportInDiffFiles.baseline.jsonc @@ -0,0 +1,21 @@ +// === findRenameLocations === +// === /a.ts === +// export var /*RENAME*/[|aRENAME|]; + +// === /b.ts === +// import { [|aRENAME|] } from './a'; +// export { a }; + + + +// === findRenameLocations === +// === /b.ts === +// import { /*START PREFIX*/a as /*RENAME*/[|aRENAME|] } from './a'; +// export { a }; + + + +// === findRenameLocations === +// === /b.ts === +// import { /*START PREFIX*/a as [|aRENAME|] } from './a'; +// export { /*RENAME*/a }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExportInDiffFiles.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExportInDiffFiles.baseline.jsonc.diff new file mode 100644 index 0000000000..bbe6b24e4e --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndExportInDiffFiles.baseline.jsonc.diff @@ -0,0 +1,25 @@ +--- old.renameImportAndExportInDiffFiles.baseline.jsonc ++++ new.renameImportAndExportInDiffFiles.baseline.jsonc +@@= skipped -3, +3 lines =@@ + + // === /b.ts === + // import { [|aRENAME|] } from './a'; +-// export { [|aRENAME|] as a/*END SUFFIX*/ }; ++// export { a }; + + + + // === findRenameLocations === + // === /b.ts === + // import { /*START PREFIX*/a as /*RENAME*/[|aRENAME|] } from './a'; +-// export { [|aRENAME|] as a/*END SUFFIX*/ }; ++// export { a }; + + + + // === findRenameLocations === + // === /b.ts === +-// import { a } from './a'; +-// export { /*START PREFIX*/a as /*RENAME*/[|aRENAME|] }; ++// import { /*START PREFIX*/a as [|aRENAME|] } from './a'; ++// export { /*RENAME*/a }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndShorthand.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndShorthand.baseline.jsonc new file mode 100644 index 0000000000..6ca5609808 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportAndShorthand.baseline.jsonc @@ -0,0 +1,11 @@ +// === findRenameLocations === +// === /renameImportAndShorthand.ts === +// import /*RENAME*/[|fooRENAME|] from 'bar'; +// const bar = { /*START PREFIX*/foo: [|fooRENAME|] }; + + + +// === findRenameLocations === +// === /renameImportAndShorthand.ts === +// import [|fooRENAME|] from 'bar'; +// const bar = { /*START PREFIX*/foo: /*RENAME*/[|fooRENAME|] }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportNamespaceAndShorthand.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportNamespaceAndShorthand.baseline.jsonc new file mode 100644 index 0000000000..799b0d0522 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportNamespaceAndShorthand.baseline.jsonc @@ -0,0 +1,11 @@ +// === findRenameLocations === +// === /renameImportNamespaceAndShorthand.ts === +// import * as /*RENAME*/[|fooRENAME|] from 'bar'; +// const bar = { /*START PREFIX*/foo: [|fooRENAME|] }; + + + +// === findRenameLocations === +// === /renameImportNamespaceAndShorthand.ts === +// import * as [|fooRENAME|] from 'bar'; +// const bar = { /*START PREFIX*/foo: /*RENAME*/[|fooRENAME|] }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportOfExportEquals.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportOfExportEquals.baseline.jsonc new file mode 100644 index 0000000000..98bee31a7f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportOfExportEquals.baseline.jsonc @@ -0,0 +1,121 @@ +// === findRenameLocations === +// === /renameImportOfExportEquals.ts === +// declare namespace /*RENAME*/[|NRENAME|] { +// export var x: number; +// } +// declare module "mod" { +// export = [|NRENAME|]; +// } +// declare module "a" { +// import * as [|NRENAME|] from "mod"; +// export { N }; // Renaming N here would rename +// } +// declare module "b" { +// // --- (line: 12) skipped --- + + + +// === findRenameLocations === +// === /renameImportOfExportEquals.ts === +// declare namespace [|NRENAME|] { +// export var x: number; +// } +// declare module "mod" { +// export = /*RENAME*/[|NRENAME|]; +// } +// declare module "a" { +// import * as [|NRENAME|] from "mod"; +// export { N }; // Renaming N here would rename +// } +// declare module "b" { +// // --- (line: 12) skipped --- + + + +// === findRenameLocations === +// === /renameImportOfExportEquals.ts === +// --- (line: 4) skipped --- +// export = N; +// } +// declare module "a" { +// import * as /*RENAME*/[|NRENAME|] from "mod"; +// export { N }; // Renaming N here would rename +// } +// declare module "b" { +// // --- (line: 12) skipped --- + + + +// === findRenameLocations === +// === /renameImportOfExportEquals.ts === +// --- (line: 4) skipped --- +// export = N; +// } +// declare module "a" { +// import * as [|NRENAME|] from "mod"; +// export { /*RENAME*/N }; // Renaming N here would rename +// } +// declare module "b" { +// import { N } from "a"; +// export const y: typeof N.x; +// } + + + +// === findRenameLocations === +// === /renameImportOfExportEquals.ts === +// --- (line: 8) skipped --- +// export { N }; // Renaming N here would rename +// } +// declare module "b" { +// import { /*START PREFIX*/N as /*RENAME*/[|NRENAME|] } from "a"; +// export const y: typeof [|NRENAME|].x; +// } + + + +// === findRenameLocations === +// === /renameImportOfExportEquals.ts === +// --- (line: 8) skipped --- +// export { N }; // Renaming N here would rename +// } +// declare module "b" { +// import { /*START PREFIX*/N as [|NRENAME|] } from "a"; +// export const y: typeof /*RENAME*/[|NRENAME|].x; +// } + + + +// === findRenameLocations === +// === /renameImportOfExportEquals.ts === +// declare namespace N { +// export var /*RENAME*/[|xRENAME|]: number; +// } +// declare module "mod" { +// export = N; +// // --- (line: 6) skipped --- + +// --- (line: 9) skipped --- +// } +// declare module "b" { +// import { N } from "a"; +// export const y: typeof N.[|xRENAME|]; +// } + + + +// === findRenameLocations === +// === /renameImportOfExportEquals.ts === +// declare namespace N { +// export var [|xRENAME|]: number; +// } +// declare module "mod" { +// export = N; +// // --- (line: 6) skipped --- + +// --- (line: 9) skipped --- +// } +// declare module "b" { +// import { N } from "a"; +// export const y: typeof N./*RENAME*/[|xRENAME|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportOfExportEquals.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportOfExportEquals.baseline.jsonc.diff new file mode 100644 index 0000000000..e3008bc1a8 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportOfExportEquals.baseline.jsonc.diff @@ -0,0 +1,85 @@ +--- old.renameImportOfExportEquals.baseline.jsonc ++++ new.renameImportOfExportEquals.baseline.jsonc +@@= skipped -7, +7 lines =@@ + // } + // declare module "a" { + // import * as [|NRENAME|] from "mod"; +-// export { [|NRENAME|] as N/*END SUFFIX*/ }; // Renaming N here would rename ++// export { N }; // Renaming N here would rename + // } + // declare module "b" { +-// import { N } from "a"; +-// export const y: typeof N.x; +-// } ++// // --- (line: 12) skipped --- + + + +@@= skipped -19, +17 lines =@@ + // } + // declare module "a" { + // import * as [|NRENAME|] from "mod"; +-// export { [|NRENAME|] as N/*END SUFFIX*/ }; // Renaming N here would rename ++// export { N }; // Renaming N here would rename + // } + // declare module "b" { +-// import { N } from "a"; +-// export const y: typeof N.x; +-// } ++// // --- (line: 12) skipped --- + + + +@@= skipped -16, +14 lines =@@ + // } + // declare module "a" { + // import * as /*RENAME*/[|NRENAME|] from "mod"; +-// export { [|NRENAME|] as N/*END SUFFIX*/ }; // Renaming N here would rename ++// export { N }; // Renaming N here would rename + // } + // declare module "b" { +-// import { N } from "a"; +-// export const y: typeof N.x; +-// } ++// // --- (line: 12) skipped --- + + + + // === findRenameLocations === + // === /renameImportOfExportEquals.ts === +-// --- (line: 5) skipped --- ++// --- (line: 4) skipped --- ++// export = N; + // } + // declare module "a" { +-// import * as N from "mod"; +-// export { /*START PREFIX*/N as /*RENAME*/[|NRENAME|] }; // Renaming N here would rename ++// import * as [|NRENAME|] from "mod"; ++// export { /*RENAME*/N }; // Renaming N here would rename + // } + // declare module "b" { +-// import { [|NRENAME|] } from "a"; +-// export const y: typeof [|NRENAME|].x; ++// import { N } from "a"; ++// export const y: typeof N.x; + // } + + +@@= skipped -55, +54 lines =@@ + // } + // declare module "mod" { + // export = N; +-// --- (line: 6) skipped --- ++// // --- (line: 6) skipped --- + + // --- (line: 9) skipped --- + // } +@@= skipped -18, +18 lines =@@ + // } + // declare module "mod" { + // export = N; +-// --- (line: 6) skipped --- ++// // --- (line: 6) skipped --- + + // --- (line: 9) skipped --- + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportRequire.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportRequire.baseline.jsonc new file mode 100644 index 0000000000..9a6afde3d1 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportRequire.baseline.jsonc @@ -0,0 +1,47 @@ +// === findRenameLocations === +// === /a.ts === +// import /*RENAME*/[|eRENAME|] = require("mod4"); +// [|eRENAME|]; +// a = { /*START PREFIX*/e: [|eRENAME|] }; +// export { e }; + + + +// === findRenameLocations === +// === /a.ts === +// import [|eRENAME|] = require("mod4"); +// /*RENAME*/[|eRENAME|]; +// a = { /*START PREFIX*/e: [|eRENAME|] }; +// export { e }; + + + +// === findRenameLocations === +// === /a.ts === +// import [|eRENAME|] = require("mod4"); +// [|eRENAME|]; +// a = { /*START PREFIX*/e: /*RENAME*/[|eRENAME|] }; +// export { e }; + + + +// === findRenameLocations === +// === /a.ts === +// import [|eRENAME|] = require("mod4"); +// [|eRENAME|]; +// a = { /*START PREFIX*/e: [|eRENAME|] }; +// export { /*RENAME*/e }; + + + +// === findRenameLocations === +// === /b.ts === +// import { /*START PREFIX*/e as /*RENAME*/[|eRENAME|] } from "./a"; +// export { e }; + + + +// === findRenameLocations === +// === /b.ts === +// import { /*START PREFIX*/e as [|eRENAME|] } from "./a"; +// export { /*RENAME*/e }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportRequire.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportRequire.baseline.jsonc.diff new file mode 100644 index 0000000000..f7fe0c1be4 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportRequire.baseline.jsonc.diff @@ -0,0 +1,60 @@ +--- old.renameImportRequire.baseline.jsonc ++++ new.renameImportRequire.baseline.jsonc +@@= skipped -2, +2 lines =@@ + // import /*RENAME*/[|eRENAME|] = require("mod4"); + // [|eRENAME|]; + // a = { /*START PREFIX*/e: [|eRENAME|] }; +-// export { [|eRENAME|] as e/*END SUFFIX*/ }; ++// export { e }; + + + +@@= skipped -9, +9 lines =@@ + // import [|eRENAME|] = require("mod4"); + // /*RENAME*/[|eRENAME|]; + // a = { /*START PREFIX*/e: [|eRENAME|] }; +-// export { [|eRENAME|] as e/*END SUFFIX*/ }; ++// export { e }; + + + +@@= skipped -9, +9 lines =@@ + // import [|eRENAME|] = require("mod4"); + // [|eRENAME|]; + // a = { /*START PREFIX*/e: /*RENAME*/[|eRENAME|] }; +-// export { [|eRENAME|] as e/*END SUFFIX*/ }; ++// export { e }; + + + + // === findRenameLocations === + // === /a.ts === +-// import e = require("mod4"); +-// e; +-// a = { e }; +-// export { /*START PREFIX*/e as /*RENAME*/[|eRENAME|] }; +- +-// === /b.ts === +-// import { [|eRENAME|] } from "./a"; +-// export { [|eRENAME|] as e/*END SUFFIX*/ }; ++// import [|eRENAME|] = require("mod4"); ++// [|eRENAME|]; ++// a = { /*START PREFIX*/e: [|eRENAME|] }; ++// export { /*RENAME*/e }; + + + + // === findRenameLocations === + // === /b.ts === + // import { /*START PREFIX*/e as /*RENAME*/[|eRENAME|] } from "./a"; +-// export { [|eRENAME|] as e/*END SUFFIX*/ }; ++// export { e }; + + + + // === findRenameLocations === + // === /b.ts === +-// import { e } from "./a"; +-// export { /*START PREFIX*/e as /*RENAME*/[|eRENAME|] }; ++// import { /*START PREFIX*/e as [|eRENAME|] } from "./a"; ++// export { /*RENAME*/e }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportSpecifierPropertyName.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportSpecifierPropertyName.baseline.jsonc new file mode 100644 index 0000000000..0f25847ed6 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportSpecifierPropertyName.baseline.jsonc @@ -0,0 +1,3 @@ +// === findRenameLocations === +// === /canada.ts === +// export interface /*RENAME*/[|GingerRENAME|] {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportSpecifierPropertyName.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportSpecifierPropertyName.baseline.jsonc.diff new file mode 100644 index 0000000000..8cd0cedcf3 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameImportSpecifierPropertyName.baseline.jsonc.diff @@ -0,0 +1,9 @@ +--- old.renameImportSpecifierPropertyName.baseline.jsonc ++++ new.renameImportSpecifierPropertyName.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /canada.ts === + // export interface /*RENAME*/[|GingerRENAME|] {} +- +-// === /dry.ts === +-// import { [|GingerRENAME|] as Ale } from './canada'; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInConfiguredProject.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInConfiguredProject.baseline.jsonc new file mode 100644 index 0000000000..de08a0964c --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInConfiguredProject.baseline.jsonc @@ -0,0 +1,15 @@ +// === findRenameLocations === +// === /referencesForGlobals_1.ts === +// var /*RENAME*/[|globalNameRENAME|] = 0; + +// === /referencesForGlobals_2.ts === +// var y = [|globalNameRENAME|]; + + + +// === findRenameLocations === +// === /referencesForGlobals_1.ts === +// var [|globalNameRENAME|] = 0; + +// === /referencesForGlobals_2.ts === +// var y = /*RENAME*/[|globalNameRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInConfiguredProject.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInConfiguredProject.baseline.jsonc.diff new file mode 100644 index 0000000000..853b283620 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInConfiguredProject.baseline.jsonc.diff @@ -0,0 +1,15 @@ +--- old.renameInConfiguredProject.baseline.jsonc ++++ new.renameInConfiguredProject.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === +- + // === /referencesForGlobals_1.ts === + // var /*RENAME*/[|globalNameRENAME|] = 0; + +@@= skipped -8, +7 lines =@@ + + + // === findRenameLocations === +- + // === /referencesForGlobals_1.ts === + // var [|globalNameRENAME|] = 0; diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties1.baseline.jsonc new file mode 100644 index 0000000000..5a3291ede7 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties1.baseline.jsonc @@ -0,0 +1,19 @@ +// === findRenameLocations === +// === /renameInheritedProperties1.ts === +// class class1 extends class1 { +// /*RENAME*/[|propNameRENAME|]: string; +// } +// +// var v: class1; +// v.[|propNameRENAME|]; + + + +// === findRenameLocations === +// === /renameInheritedProperties1.ts === +// class class1 extends class1 { +// [|propNameRENAME|]: string; +// } +// +// var v: class1; +// v./*RENAME*/[|propNameRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties2.baseline.jsonc new file mode 100644 index 0000000000..2fedcff7c5 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties2.baseline.jsonc @@ -0,0 +1,19 @@ +// === findRenameLocations === +// === /renameInheritedProperties2.ts === +// class class1 extends class1 { +// /*RENAME*/[|doStuffRENAME|]() { } +// } +// +// var v: class1; +// v.[|doStuffRENAME|](); + + + +// === findRenameLocations === +// === /renameInheritedProperties2.ts === +// class class1 extends class1 { +// [|doStuffRENAME|]() { } +// } +// +// var v: class1; +// v./*RENAME*/[|doStuffRENAME|](); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties3.baseline.jsonc new file mode 100644 index 0000000000..ee9f8d9c40 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties3.baseline.jsonc @@ -0,0 +1,19 @@ +// === findRenameLocations === +// === /renameInheritedProperties3.ts === +// interface interface1 extends interface1 { +// /*RENAME*/[|propNameRENAME|]: string; +// } +// +// var v: interface1; +// v.[|propNameRENAME|]; + + + +// === findRenameLocations === +// === /renameInheritedProperties3.ts === +// interface interface1 extends interface1 { +// [|propNameRENAME|]: string; +// } +// +// var v: interface1; +// v./*RENAME*/[|propNameRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties4.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties4.baseline.jsonc new file mode 100644 index 0000000000..9139098e98 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties4.baseline.jsonc @@ -0,0 +1,19 @@ +// === findRenameLocations === +// === /renameInheritedProperties4.ts === +// interface interface1 extends interface1 { +// /*RENAME*/[|doStuffRENAME|](): string; +// } +// +// var v: interface1; +// v.[|doStuffRENAME|](); + + + +// === findRenameLocations === +// === /renameInheritedProperties4.ts === +// interface interface1 extends interface1 { +// [|doStuffRENAME|](): string; +// } +// +// var v: interface1; +// v./*RENAME*/[|doStuffRENAME|](); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties5.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties5.baseline.jsonc new file mode 100644 index 0000000000..1989617a59 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties5.baseline.jsonc @@ -0,0 +1,23 @@ +// === findRenameLocations === +// === /renameInheritedProperties5.ts === +// interface C extends D { +// propC: number; +// } +// interface D extends C { +// /*RENAME*/[|propDRENAME|]: string; +// } +// var d: D; +// d.[|propDRENAME|]; + + + +// === findRenameLocations === +// === /renameInheritedProperties5.ts === +// interface C extends D { +// propC: number; +// } +// interface D extends C { +// [|propDRENAME|]: string; +// } +// var d: D; +// d./*RENAME*/[|propDRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties6.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties6.baseline.jsonc new file mode 100644 index 0000000000..263f842451 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties6.baseline.jsonc @@ -0,0 +1,23 @@ +// === findRenameLocations === +// === /renameInheritedProperties6.ts === +// interface C extends D { +// propD: number; +// } +// interface D extends C { +// /*RENAME*/[|propCRENAME|]: number; +// } +// var d: D; +// d.[|propCRENAME|]; + + + +// === findRenameLocations === +// === /renameInheritedProperties6.ts === +// interface C extends D { +// propD: number; +// } +// interface D extends C { +// [|propCRENAME|]: number; +// } +// var d: D; +// d./*RENAME*/[|propCRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties7.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties7.baseline.jsonc new file mode 100644 index 0000000000..550e2bc2df --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties7.baseline.jsonc @@ -0,0 +1,27 @@ +// === findRenameLocations === +// === /renameInheritedProperties7.ts === +// class C extends D { +// /*RENAME*/[|prop1RENAME|]: string; +// } +// +// class D extends C { +// prop1: string; +// } +// +// var c: C; +// c.[|prop1RENAME|]; + + + +// === findRenameLocations === +// === /renameInheritedProperties7.ts === +// class C extends D { +// [|prop1RENAME|]: string; +// } +// +// class D extends C { +// prop1: string; +// } +// +// var c: C; +// c./*RENAME*/[|prop1RENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties8.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties8.baseline.jsonc new file mode 100644 index 0000000000..bc9cc36b03 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameInheritedProperties8.baseline.jsonc @@ -0,0 +1,42 @@ +// === findRenameLocations === +// === /renameInheritedProperties8.ts === +// class C implements D { +// /*RENAME*/[|prop1RENAME|]: string; +// } +// +// interface D extends C { +// [|prop1RENAME|]: string; +// } +// +// var c: C; +// c.[|prop1RENAME|]; + + + +// === findRenameLocations === +// === /renameInheritedProperties8.ts === +// class C implements D { +// [|prop1RENAME|]: string; +// } +// +// interface D extends C { +// /*RENAME*/[|prop1RENAME|]: string; +// } +// +// var c: C; +// c.[|prop1RENAME|]; + + + +// === findRenameLocations === +// === /renameInheritedProperties8.ts === +// class C implements D { +// [|prop1RENAME|]: string; +// } +// +// interface D extends C { +// [|prop1RENAME|]: string; +// } +// +// var c: C; +// c./*RENAME*/[|prop1RENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJSDocNamepath.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJSDocNamepath.baseline.jsonc new file mode 100644 index 0000000000..a07fe39451 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJSDocNamepath.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /renameJSDocNamepath.ts === +// /** +// * @type {module:foo/A} x +// */ +// var x = 1 +// var /*RENAME*/[|ARENAME|] = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsDocImportTag.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsDocImportTag.baseline.jsonc new file mode 100644 index 0000000000..af497bac66 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsDocImportTag.baseline.jsonc @@ -0,0 +1,10 @@ +// === findRenameLocations === +// === /a.js === +// /** +// * @import { /*START PREFIX*/A as [|ARENAME|] } from "./b"; +// */ +// +// /** +// * @param { [|ARENAME|]/*RENAME*/ } a +// */ +// function f(a) {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsDocTypeLiteral.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsDocTypeLiteral.baseline.jsonc new file mode 100644 index 0000000000..979df89b8a --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsDocTypeLiteral.baseline.jsonc @@ -0,0 +1,8 @@ +// === findRenameLocations === +// === /a.js === +// /** +// * @param {Object} [|optionsRENAME|] +// * @param {string} options.foo +// * @param {number} options.bar +// */ +// function foo(/*RENAME*/[|optionsRENAME|]) {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsDocTypeLiteral.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsDocTypeLiteral.baseline.jsonc.diff new file mode 100644 index 0000000000..c1414b114d --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsDocTypeLiteral.baseline.jsonc.diff @@ -0,0 +1,12 @@ +--- old.renameJsDocTypeLiteral.baseline.jsonc ++++ new.renameJsDocTypeLiteral.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /a.js === + // /** + // * @param {Object} [|optionsRENAME|] +-// * @param {string} [|optionsRENAME|].foo +-// * @param {number} [|optionsRENAME|].bar ++// * @param {string} options.foo ++// * @param {number} options.bar + // */ + // function foo(/*RENAME*/[|optionsRENAME|]) {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsExports01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsExports01.baseline.jsonc new file mode 100644 index 0000000000..728d902299 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsExports01.baseline.jsonc @@ -0,0 +1,13 @@ +// === findRenameLocations === +// === /a.js === +// exports./*RENAME*/[|areaRENAME|] = function (r) { return r * r; } + + + +// === findRenameLocations === +// === /a.js === +// exports.[|areaRENAME|] = function (r) { return r * r; } + +// === /b.js === +// var mod = require('./a'); +// var t = mod./*RENAME*/area(10); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsExports01.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsExports01.baseline.jsonc.diff new file mode 100644 index 0000000000..5642a65463 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsExports01.baseline.jsonc.diff @@ -0,0 +1,19 @@ +--- old.renameJsExports01.baseline.jsonc ++++ new.renameJsExports01.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /a.js === + // exports./*RENAME*/[|areaRENAME|] = function (r) { return r * r; } + +-// === /b.js === +-// var mod = require('./a'); +-// var t = mod.[|areaRENAME|](10); +- + + + // === findRenameLocations === +@@= skipped -12, +8 lines =@@ + + // === /b.js === + // var mod = require('./a'); +-// var t = mod./*RENAME*/[|areaRENAME|](10); ++// var t = mod./*RENAME*/area(10); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsOverloadedFunctionParameter.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsOverloadedFunctionParameter.baseline.jsonc new file mode 100644 index 0000000000..8edc3921a1 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsOverloadedFunctionParameter.baseline.jsonc @@ -0,0 +1,17 @@ +// === findRenameLocations === +// === /foo.js === +// /** +// * @overload +// * @param {number} [|xRENAME|] +// * @returns {number} +// * +// * @overload +// * @param {string} [|xRENAME|] +// * @returns {string} +// * +// * @param {unknown} [|xRENAME|] +// * @returns {unknown} +// */ +// function foo([|xRENAME|]/*RENAME*/) { +// return [|xRENAME|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsOverloadedFunctionParameter.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsOverloadedFunctionParameter.baseline.jsonc.diff new file mode 100644 index 0000000000..c54ef15d77 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsOverloadedFunctionParameter.baseline.jsonc.diff @@ -0,0 +1,23 @@ +--- old.renameJsOverloadedFunctionParameter.baseline.jsonc ++++ new.renameJsOverloadedFunctionParameter.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /foo.js === +-// --- (line: 6) skipped --- +-// * @param {string} x +-// * @returns {string} ++// /** ++// * @overload ++// * @param {number} [|xRENAME|] ++// * @returns {number} ++// * ++// * @overload ++// * @param {string} [|xRENAME|] ++// * @returns {string} + // * + // * @param {unknown} [|xRENAME|] +-// * @returns {unknown} ++// * @returns {unknown} + // */ + // function foo([|xRENAME|]/*RENAME*/) { + // return [|xRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment.baseline.jsonc new file mode 100644 index 0000000000..c7598eb8bf --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment.baseline.jsonc @@ -0,0 +1,15 @@ +// === findRenameLocations === +// === /a.js === +// function bar() { +// } +// bar./*RENAME*/[|fooRENAME|] = "foo"; +// console.log(bar.[|fooRENAME|]); + + + +// === findRenameLocations === +// === /a.js === +// function bar() { +// } +// bar.[|fooRENAME|] = "foo"; +// console.log(bar./*RENAME*/[|fooRENAME|]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment2.baseline.jsonc new file mode 100644 index 0000000000..7c121f1b50 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment2.baseline.jsonc @@ -0,0 +1,15 @@ +// === findRenameLocations === +// === /a.js === +// class Minimatch { +// } +// Minimatch./*RENAME*/[|staticPropertyRENAME|] = "string"; +// console.log(Minimatch.[|staticPropertyRENAME|]); + + + +// === findRenameLocations === +// === /a.js === +// class Minimatch { +// } +// Minimatch.[|staticPropertyRENAME|] = "string"; +// console.log(Minimatch./*RENAME*/[|staticPropertyRENAME|]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment3.baseline.jsonc new file mode 100644 index 0000000000..b16dbefb5b --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment3.baseline.jsonc @@ -0,0 +1,15 @@ +// === findRenameLocations === +// === /a.js === +// var C = class { +// } +// C./*RENAME*/[|staticPropertyRENAME|] = "string"; +// console.log(C.[|staticPropertyRENAME|]); + + + +// === findRenameLocations === +// === /a.js === +// var C = class { +// } +// C.[|staticPropertyRENAME|] = "string"; +// console.log(C./*RENAME*/[|staticPropertyRENAME|]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment4.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment4.baseline.jsonc new file mode 100644 index 0000000000..ccc36e45c5 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPropertyAssignment4.baseline.jsonc @@ -0,0 +1,15 @@ +// === findRenameLocations === +// === /a.js === +// function f() { +// var /*RENAME*/[|fooRENAME|] = this; +// [|fooRENAME|].x = 1; +// } + + + +// === findRenameLocations === +// === /a.js === +// function f() { +// var [|fooRENAME|] = this; +// /*RENAME*/[|fooRENAME|].x = 1; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty01.baseline.jsonc new file mode 100644 index 0000000000..b922a2a5c8 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty01.baseline.jsonc @@ -0,0 +1,17 @@ +// === findRenameLocations === +// === /a.js === +// function bar() { +// } +// bar.prototype./*RENAME*/x = 10; +// var t = new bar(); +// t.x = 11; + + + +// === findRenameLocations === +// === /a.js === +// function bar() { +// } +// bar.prototype.x = 10; +// var t = new bar(); +// t./*RENAME*/x = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty01.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty01.baseline.jsonc.diff new file mode 100644 index 0000000000..76f94ed41c --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty01.baseline.jsonc.diff @@ -0,0 +1,23 @@ +--- old.renameJsPrototypeProperty01.baseline.jsonc ++++ new.renameJsPrototypeProperty01.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /a.js === + // function bar() { + // } +-// bar.prototype./*RENAME*/[|xRENAME|] = 10; ++// bar.prototype./*RENAME*/x = 10; + // var t = new bar(); +-// t.[|xRENAME|] = 11; ++// t.x = 11; + + + +@@= skipped -10, +10 lines =@@ + // === /a.js === + // function bar() { + // } +-// bar.prototype.[|xRENAME|] = 10; ++// bar.prototype.x = 10; + // var t = new bar(); +-// t./*RENAME*/[|xRENAME|] = 11; ++// t./*RENAME*/x = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty02.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty02.baseline.jsonc new file mode 100644 index 0000000000..b922a2a5c8 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty02.baseline.jsonc @@ -0,0 +1,17 @@ +// === findRenameLocations === +// === /a.js === +// function bar() { +// } +// bar.prototype./*RENAME*/x = 10; +// var t = new bar(); +// t.x = 11; + + + +// === findRenameLocations === +// === /a.js === +// function bar() { +// } +// bar.prototype.x = 10; +// var t = new bar(); +// t./*RENAME*/x = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty02.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty02.baseline.jsonc.diff new file mode 100644 index 0000000000..8aada728d8 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsPrototypeProperty02.baseline.jsonc.diff @@ -0,0 +1,23 @@ +--- old.renameJsPrototypeProperty02.baseline.jsonc ++++ new.renameJsPrototypeProperty02.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /a.js === + // function bar() { + // } +-// bar.prototype./*RENAME*/[|xRENAME|] = 10; ++// bar.prototype./*RENAME*/x = 10; + // var t = new bar(); +-// t.[|xRENAME|] = 11; ++// t.x = 11; + + + +@@= skipped -10, +10 lines =@@ + // === /a.js === + // function bar() { + // } +-// bar.prototype.[|xRENAME|] = 10; ++// bar.prototype.x = 10; + // var t = new bar(); +-// t./*RENAME*/[|xRENAME|] = 11; ++// t./*RENAME*/x = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty01.baseline.jsonc new file mode 100644 index 0000000000..a0549e437b --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty01.baseline.jsonc @@ -0,0 +1,17 @@ +// === findRenameLocations === +// === /a.js === +// function bar() { +// this./*RENAME*/x = 10; +// } +// var t = new bar(); +// t.x = 11; + + + +// === findRenameLocations === +// === /a.js === +// function bar() { +// this.x = 10; +// } +// var t = new bar(); +// t./*RENAME*/x = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty01.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty01.baseline.jsonc.diff new file mode 100644 index 0000000000..fe28363d63 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty01.baseline.jsonc.diff @@ -0,0 +1,24 @@ +--- old.renameJsThisProperty01.baseline.jsonc ++++ new.renameJsThisProperty01.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /a.js === + // function bar() { +-// this./*RENAME*/[|xRENAME|] = 10; ++// this./*RENAME*/x = 10; + // } + // var t = new bar(); +-// t.[|xRENAME|] = 11; ++// t.x = 11; + + + + // === findRenameLocations === + // === /a.js === + // function bar() { +-// this.[|xRENAME|] = 10; ++// this.x = 10; + // } + // var t = new bar(); +-// t./*RENAME*/[|xRENAME|] = 11; ++// t./*RENAME*/x = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty03.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty03.baseline.jsonc new file mode 100644 index 0000000000..3b6a47c315 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty03.baseline.jsonc @@ -0,0 +1,21 @@ +// === findRenameLocations === +// === /a.js === +// class C { +// constructor(y) { +// this./*RENAME*/[|xRENAME|] = y; +// } +// } +// var t = new C(12); +// t.[|xRENAME|] = 11; + + + +// === findRenameLocations === +// === /a.js === +// class C { +// constructor(y) { +// this.[|xRENAME|] = y; +// } +// } +// var t = new C(12); +// t./*RENAME*/[|xRENAME|] = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty05.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty05.baseline.jsonc new file mode 100644 index 0000000000..fdc3564244 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty05.baseline.jsonc @@ -0,0 +1,20 @@ +// === findRenameLocations === +// === /a.js === +// class C { +// constructor(y) { +// this.x = y; +// } +// } +// C.prototype./*RENAME*/z = 1; +// var t = new C(12); +// t.z = 11; + + + +// === findRenameLocations === +// === /a.js === +// --- (line: 4) skipped --- +// } +// C.prototype.z = 1; +// var t = new C(12); +// t./*RENAME*/z = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty05.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty05.baseline.jsonc.diff new file mode 100644 index 0000000000..0d3d071a7c --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty05.baseline.jsonc.diff @@ -0,0 +1,27 @@ +--- old.renameJsThisProperty05.baseline.jsonc ++++ new.renameJsThisProperty05.baseline.jsonc +@@= skipped -4, +4 lines =@@ + // this.x = y; + // } + // } +-// C.prototype./*RENAME*/[|zRENAME|] = 1; ++// C.prototype./*RENAME*/z = 1; + // var t = new C(12); +-// t.[|zRENAME|] = 11; ++// t.z = 11; + + + + // === findRenameLocations === + // === /a.js === +-// class C { +-// constructor(y) { +-// this.x = y; +-// } ++// --- (line: 4) skipped --- + // } +-// C.prototype.[|zRENAME|] = 1; ++// C.prototype.z = 1; + // var t = new C(12); +-// t./*RENAME*/[|zRENAME|] = 11; ++// t./*RENAME*/z = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty06.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty06.baseline.jsonc new file mode 100644 index 0000000000..5a3028466a --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty06.baseline.jsonc @@ -0,0 +1,20 @@ +// === findRenameLocations === +// === /a.js === +// var C = class { +// constructor(y) { +// this.x = y; +// } +// } +// C.prototype./*RENAME*/z = 1; +// var t = new C(12); +// t.z = 11; + + + +// === findRenameLocations === +// === /a.js === +// --- (line: 4) skipped --- +// } +// C.prototype.z = 1; +// var t = new C(12); +// t./*RENAME*/z = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty06.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty06.baseline.jsonc.diff new file mode 100644 index 0000000000..305a180969 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameJsThisProperty06.baseline.jsonc.diff @@ -0,0 +1,27 @@ +--- old.renameJsThisProperty06.baseline.jsonc ++++ new.renameJsThisProperty06.baseline.jsonc +@@= skipped -4, +4 lines =@@ + // this.x = y; + // } + // } +-// C.prototype./*RENAME*/[|zRENAME|] = 1; ++// C.prototype./*RENAME*/z = 1; + // var t = new C(12); +-// t.[|zRENAME|] = 11; ++// t.z = 11; + + + + // === findRenameLocations === + // === /a.js === +-// var C = class { +-// constructor(y) { +-// this.x = y; +-// } ++// --- (line: 4) skipped --- + // } +-// C.prototype.[|zRENAME|] = 1; ++// C.prototype.z = 1; + // var t = new C(12); +-// t./*RENAME*/[|zRENAME|] = 11; ++// t./*RENAME*/z = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel1.baseline.jsonc new file mode 100644 index 0000000000..75f3440c6f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel1.baseline.jsonc @@ -0,0 +1,5 @@ +// === findRenameLocations === +// === /renameLabel1.ts === +// [|fooRENAME|]: { +// break /*RENAME*/[|fooRENAME|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel2.baseline.jsonc new file mode 100644 index 0000000000..a24d4c6036 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel2.baseline.jsonc @@ -0,0 +1,5 @@ +// === findRenameLocations === +// === /renameLabel2.ts === +// /*RENAME*/[|fooRENAME|]: { +// break [|fooRENAME|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel3.baseline.jsonc new file mode 100644 index 0000000000..1c73641bed --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel3.baseline.jsonc @@ -0,0 +1,8 @@ +// === findRenameLocations === +// === /renameLabel3.ts === +// /*RENAME*/[|loopRENAME|]: +// for (let i = 0; i <= 10; i++) { +// if (i === 0) continue [|loopRENAME|]; +// if (i === 1) continue [|loopRENAME|]; +// if (i === 10) break [|loopRENAME|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel4.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel4.baseline.jsonc new file mode 100644 index 0000000000..a4a63d1097 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel4.baseline.jsonc @@ -0,0 +1,8 @@ +// === findRenameLocations === +// === /renameLabel4.ts === +// [|loopRENAME|]: +// for (let i = 0; i <= 10; i++) { +// if (i === 0) continue [|loopRENAME|]; +// if (i === 1) continue /*RENAME*/[|loopRENAME|]; +// if (i === 10) break [|loopRENAME|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel5.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel5.baseline.jsonc new file mode 100644 index 0000000000..860407a962 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel5.baseline.jsonc @@ -0,0 +1,8 @@ +// === findRenameLocations === +// === /renameLabel5.ts === +// [|loop1RENAME|]: for (let i = 0; i <= 10; i++) { +// loop2: for (let j = 0; j <= 10; j++) { +// if (i === 5) continue /*RENAME*/[|loop1RENAME|]; +// if (j === 5) break loop2; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel6.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel6.baseline.jsonc new file mode 100644 index 0000000000..41cdf7d4e0 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLabel6.baseline.jsonc @@ -0,0 +1,8 @@ +// === findRenameLocations === +// === /renameLabel6.ts === +// loop1: for (let i = 0; i <= 10; i++) { +// [|loop2RENAME|]: for (let j = 0; j <= 10; j++) { +// if (i === 5) continue loop1; +// if (j === 5) break /*RENAME*/[|loop2RENAME|]; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForClassExpression01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForClassExpression01.baseline.jsonc new file mode 100644 index 0000000000..176f9c4566 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForClassExpression01.baseline.jsonc @@ -0,0 +1,54 @@ +// === findRenameLocations === +// === /renameLocationsForClassExpression01.ts === +// class Foo { +// } +// +// var x = class /*RENAME*/[|FooRENAME|] { +// doIt() { +// return [|FooRENAME|]; +// } +// +// static doItStatically() { +// return [|FooRENAME|].y; +// } +// } +// +// // --- (line: 14) skipped --- + + + +// === findRenameLocations === +// === /renameLocationsForClassExpression01.ts === +// class Foo { +// } +// +// var x = class [|FooRENAME|] { +// doIt() { +// return /*RENAME*/[|FooRENAME|]; +// } +// +// static doItStatically() { +// return [|FooRENAME|].y; +// } +// } +// +// // --- (line: 14) skipped --- + + + +// === findRenameLocations === +// === /renameLocationsForClassExpression01.ts === +// class Foo { +// } +// +// var x = class [|FooRENAME|] { +// doIt() { +// return [|FooRENAME|]; +// } +// +// static doItStatically() { +// return /*RENAME*/[|FooRENAME|].y; +// } +// } +// +// // --- (line: 14) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForClassExpression01.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForClassExpression01.baseline.jsonc.diff new file mode 100644 index 0000000000..c2ad5857b3 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForClassExpression01.baseline.jsonc.diff @@ -0,0 +1,32 @@ +--- old.renameLocationsForClassExpression01.baseline.jsonc ++++ new.renameLocationsForClassExpression01.baseline.jsonc +@@= skipped -12, +12 lines =@@ + // } + // } + // +-// var y = class { +-// getSomeName() { +-// --- (line: 16) skipped --- ++// // --- (line: 14) skipped --- + + + +@@= skipped -21, +19 lines =@@ + // } + // } + // +-// var y = class { +-// getSomeName() { +-// --- (line: 16) skipped --- ++// // --- (line: 14) skipped --- + + + +@@= skipped -21, +19 lines =@@ + // } + // } + // +-// var y = class { +-// getSomeName() { +-// --- (line: 16) skipped --- ++// // --- (line: 14) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForFunctionExpression01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForFunctionExpression01.baseline.jsonc new file mode 100644 index 0000000000..b587486a51 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForFunctionExpression01.baseline.jsonc @@ -0,0 +1,21 @@ +// === findRenameLocations === +// === /renameLocationsForFunctionExpression01.ts === +// var x = function /*RENAME*/[|fRENAME|](g: any, h: any) { +// [|fRENAME|]([|fRENAME|], g); +// } + + + +// === findRenameLocations === +// === /renameLocationsForFunctionExpression01.ts === +// var x = function [|fRENAME|](g: any, h: any) { +// /*RENAME*/[|fRENAME|]([|fRENAME|], g); +// } + + + +// === findRenameLocations === +// === /renameLocationsForFunctionExpression01.ts === +// var x = function [|fRENAME|](g: any, h: any) { +// [|fRENAME|](/*RENAME*/[|fRENAME|], g); +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForFunctionExpression02.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForFunctionExpression02.baseline.jsonc new file mode 100644 index 0000000000..af2e744390 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameLocationsForFunctionExpression02.baseline.jsonc @@ -0,0 +1,39 @@ +// === findRenameLocations === +// === /renameLocationsForFunctionExpression02.ts === +// function f() { +// +// } +// var x = function /*RENAME*/[|fRENAME|](g: any, h: any) { +// +// let helper = function f(): any { f(); } +// +// let foo = () => [|fRENAME|]([|fRENAME|], g); +// } + + + +// === findRenameLocations === +// === /renameLocationsForFunctionExpression02.ts === +// function f() { +// +// } +// var x = function [|fRENAME|](g: any, h: any) { +// +// let helper = function f(): any { f(); } +// +// let foo = () => /*RENAME*/[|fRENAME|]([|fRENAME|], g); +// } + + + +// === findRenameLocations === +// === /renameLocationsForFunctionExpression02.ts === +// function f() { +// +// } +// var x = function [|fRENAME|](g: any, h: any) { +// +// let helper = function f(): any { f(); } +// +// let foo = () => [|fRENAME|](/*RENAME*/[|fRENAME|], g); +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModifiers.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModifiers.baseline.jsonc new file mode 100644 index 0000000000..9220b601c8 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModifiers.baseline.jsonc @@ -0,0 +1,127 @@ +// === findRenameLocations === +// === /renameModifiers.ts === +// /*RENAME*/declare abstract class C1 { +// static a; +// readonly b; +// public c; +// // --- (line: 5) skipped --- + + + +// === findRenameLocations === +// === /renameModifiers.ts === +// declare /*RENAME*/abstract class C1 { +// static a; +// readonly b; +// public c; +// // --- (line: 5) skipped --- + + + +// === findRenameLocations === +// === /renameModifiers.ts === +// declare abstract class C1 { +// /*RENAME*/static a; +// readonly b; +// public c; +// protected d; +// // --- (line: 6) skipped --- + + + +// === findRenameLocations === +// === /renameModifiers.ts === +// declare abstract class C1 { +// static a; +// /*RENAME*/readonly b; +// public c; +// protected d; +// private e; +// // --- (line: 7) skipped --- + + + +// === findRenameLocations === +// === /renameModifiers.ts === +// declare abstract class C1 { +// static a; +// readonly b; +// /*RENAME*/public c; +// protected d; +// private e; +// } +// // --- (line: 8) skipped --- + + + +// === findRenameLocations === +// === /renameModifiers.ts === +// declare abstract class C1 { +// static a; +// readonly b; +// public c; +// /*RENAME*/protected d; +// private e; +// } +// const enum E { +// // --- (line: 9) skipped --- + + + +// === findRenameLocations === +// === /renameModifiers.ts === +// declare abstract class C1 { +// static a; +// readonly b; +// public c; +// protected d; +// /*RENAME*/private e; +// } +// const enum E { +// } +// async function fn() {} +// export default class C2 {} + + + +// === findRenameLocations === +// === /renameModifiers.ts === +// --- (line: 4) skipped --- +// protected d; +// private e; +// } +// /*RENAME*/const enum E { +// } +// async function fn() {} +// export default class C2 {} + + + +// === findRenameLocations === +// === /renameModifiers.ts === +// --- (line: 6) skipped --- +// } +// const enum E { +// } +// /*RENAME*/async function fn() {} +// export default class C2 {} + + + +// === findRenameLocations === +// === /renameModifiers.ts === +// --- (line: 7) skipped --- +// const enum E { +// } +// async function fn() {} +// /*RENAME*/export default class C2 {} + + + +// === findRenameLocations === +// === /renameModifiers.ts === +// --- (line: 7) skipped --- +// const enum E { +// } +// async function fn() {} +// export /*RENAME*/default class C2 {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModifiers.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModifiers.baseline.jsonc.diff new file mode 100644 index 0000000000..fe40e1eecd --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModifiers.baseline.jsonc.diff @@ -0,0 +1,205 @@ +--- old.renameModifiers.baseline.jsonc ++++ new.renameModifiers.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameModifiers.ts === +-// /*RENAME*/declare abstract class [|C1RENAME|] { +-// static a; +-// readonly b; +-// public c; +-// protected d; +-// private e; +-// } +-// const enum E { +-// } +-// async function fn() {} +-// export default class C2 {} +- +- +- +-// === findRenameLocations === +-// === /renameModifiers.ts === +-// declare /*RENAME*/abstract class [|C1RENAME|] { +-// static a; +-// readonly b; +-// public c; +-// protected d; +-// private e; +-// } +-// const enum E { +-// } +-// async function fn() {} +-// export default class C2 {} +- +- +- +-// === findRenameLocations === +-// === /renameModifiers.ts === +-// declare abstract class C1 { +-// /*RENAME*/static [|aRENAME|]; +-// readonly b; +-// public c; +-// protected d; +-// --- (line: 6) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameModifiers.ts === +-// declare abstract class C1 { +-// static a; +-// /*RENAME*/readonly [|bRENAME|]; +-// public c; +-// protected d; +-// private e; +-// --- (line: 7) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameModifiers.ts === +-// declare abstract class C1 { +-// static a; +-// readonly b; +-// /*RENAME*/public [|cRENAME|]; +-// protected d; +-// private e; +-// } +-// --- (line: 8) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameModifiers.ts === +-// declare abstract class C1 { +-// static a; +-// readonly b; +-// public c; +-// /*RENAME*/protected [|dRENAME|]; +-// private e; +-// } +-// const enum E { +-// --- (line: 9) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameModifiers.ts === +-// declare abstract class C1 { +-// static a; +-// readonly b; +-// public c; +-// protected d; +-// /*RENAME*/private [|eRENAME|]; ++// /*RENAME*/declare abstract class C1 { ++// static a; ++// readonly b; ++// public c; ++// // --- (line: 5) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameModifiers.ts === ++// declare /*RENAME*/abstract class C1 { ++// static a; ++// readonly b; ++// public c; ++// // --- (line: 5) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameModifiers.ts === ++// declare abstract class C1 { ++// /*RENAME*/static a; ++// readonly b; ++// public c; ++// protected d; ++// // --- (line: 6) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameModifiers.ts === ++// declare abstract class C1 { ++// static a; ++// /*RENAME*/readonly b; ++// public c; ++// protected d; ++// private e; ++// // --- (line: 7) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameModifiers.ts === ++// declare abstract class C1 { ++// static a; ++// readonly b; ++// /*RENAME*/public c; ++// protected d; ++// private e; ++// } ++// // --- (line: 8) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameModifiers.ts === ++// declare abstract class C1 { ++// static a; ++// readonly b; ++// public c; ++// /*RENAME*/protected d; ++// private e; ++// } ++// const enum E { ++// // --- (line: 9) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameModifiers.ts === ++// declare abstract class C1 { ++// static a; ++// readonly b; ++// public c; ++// protected d; ++// /*RENAME*/private e; + // } + // const enum E { + // } +@@= skipped -101, +89 lines =@@ + // protected d; + // private e; + // } +-// /*RENAME*/const enum [|ERENAME|] { ++// /*RENAME*/const enum E { + // } + // async function fn() {} + // export default class C2 {} +@@= skipped -13, +13 lines =@@ + // } + // const enum E { + // } +-// /*RENAME*/async function [|fnRENAME|]() {} ++// /*RENAME*/async function fn() {} + // export default class C2 {} + + +@@= skipped -11, +11 lines =@@ + // const enum E { + // } + // async function fn() {} +-// /*RENAME*/export default class [|C2RENAME|] {} ++// /*RENAME*/export default class C2 {} + + + +@@= skipped -10, +10 lines =@@ + // const enum E { + // } + // async function fn() {} +-// export /*RENAME*/default class [|C2RENAME|] {} ++// export /*RENAME*/default class C2 {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModuleExportsProperties1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModuleExportsProperties1.baseline.jsonc new file mode 100644 index 0000000000..93eaefdfbb --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModuleExportsProperties1.baseline.jsonc @@ -0,0 +1,15 @@ +// === findRenameLocations === +// @useAliasesForRename: true + +// === /renameModuleExportsProperties1.ts === +// class /*RENAME*/[|ARENAME|] {} +// module.exports = { /*START PREFIX*/A: [|ARENAME|] } + + + +// === findRenameLocations === +// @useAliasesForRename: true + +// === /renameModuleExportsProperties1.ts === +// class [|ARENAME|] {} +// module.exports = { /*START PREFIX*/A: /*RENAME*/[|ARENAME|] } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModuleExportsProperties2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModuleExportsProperties2.baseline.jsonc new file mode 100644 index 0000000000..848173961a --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModuleExportsProperties2.baseline.jsonc @@ -0,0 +1,11 @@ +// === findRenameLocations === +// === /renameModuleExportsProperties2.ts === +// class /*RENAME*/[|ARENAME|] {} +// module.exports = { B: [|ARENAME|] } + + + +// === findRenameLocations === +// === /renameModuleExportsProperties2.ts === +// class [|ARENAME|] {} +// module.exports = { B: /*RENAME*/[|ARENAME|] } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModuleExportsProperties3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModuleExportsProperties3.baseline.jsonc new file mode 100644 index 0000000000..d195c0d246 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameModuleExportsProperties3.baseline.jsonc @@ -0,0 +1,15 @@ +// === findRenameLocations === +// @useAliasesForRename: true + +// === /a.js === +// class /*RENAME*/[|ARENAME|] {} +// module.exports = { /*START PREFIX*/A: [|ARENAME|] } + + + +// === findRenameLocations === +// @useAliasesForRename: true + +// === /a.js === +// class [|ARENAME|] {} +// module.exports = { /*START PREFIX*/A: /*RENAME*/[|ARENAME|] } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNamedImport.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNamedImport.baseline.jsonc new file mode 100644 index 0000000000..9b09f45022 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNamedImport.baseline.jsonc @@ -0,0 +1,6 @@ +// === findRenameLocations === +// @useAliasesForRename: true + +// === /home/src/workspaces/project/src/index.ts === +// import { /*START PREFIX*/someExportedVariable as /*RENAME*/[|someExportedVariableRENAME|] } from '../lib/index'; +// [|someExportedVariableRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNamespaceImport.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNamespaceImport.baseline.jsonc new file mode 100644 index 0000000000..b10ee0dc25 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNamespaceImport.baseline.jsonc @@ -0,0 +1,4 @@ +// === findRenameLocations === +// === /home/src/workspaces/project/src/index.ts === +// import * as /*RENAME*/[|libRENAME|] from '../lib/index'; +// [|libRENAME|].someExportedVariable; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndex.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndex.baseline.jsonc new file mode 100644 index 0000000000..6efc99fea6 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndex.baseline.jsonc @@ -0,0 +1,11 @@ +// === findRenameLocations === +// === /renameNumericalIndex.ts === +// const foo = { /*RENAME*/0: true }; +// foo[0]; + + + +// === findRenameLocations === +// === /renameNumericalIndex.ts === +// const foo = { 0: true }; +// foo[/*RENAME*/0]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndex.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndex.baseline.jsonc.diff new file mode 100644 index 0000000000..b7f752f9b1 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndex.baseline.jsonc.diff @@ -0,0 +1,18 @@ +--- old.renameNumericalIndex.baseline.jsonc ++++ new.renameNumericalIndex.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameNumericalIndex.ts === +-// const foo = { /*RENAME*/[|0RENAME|]: true }; +-// foo[/*START PREFIX*/"[|0RENAME|]"/*END SUFFIX*/]; ++// const foo = { /*RENAME*/0: true }; ++// foo[0]; + + + + // === findRenameLocations === + // === /renameNumericalIndex.ts === +-// const foo = { [|0RENAME|]: true }; +-// foo[/*START PREFIX*/"/*RENAME*/[|0RENAME|]"/*END SUFFIX*/]; ++// const foo = { 0: true }; ++// foo[/*RENAME*/0]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndexSingleQuoted.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndexSingleQuoted.baseline.jsonc new file mode 100644 index 0000000000..d219f28677 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndexSingleQuoted.baseline.jsonc @@ -0,0 +1,15 @@ +// === findRenameLocations === +// @quotePreference: single + +// === /renameNumericalIndexSingleQuoted.ts === +// const foo = { /*RENAME*/0: true }; +// foo[0]; + + + +// === findRenameLocations === +// @quotePreference: single + +// === /renameNumericalIndexSingleQuoted.ts === +// const foo = { 0: true }; +// foo[/*RENAME*/0]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndexSingleQuoted.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndexSingleQuoted.baseline.jsonc.diff new file mode 100644 index 0000000000..13d07f4adb --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameNumericalIndexSingleQuoted.baseline.jsonc.diff @@ -0,0 +1,21 @@ +--- old.renameNumericalIndexSingleQuoted.baseline.jsonc ++++ new.renameNumericalIndexSingleQuoted.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // @quotePreference: single + + // === /renameNumericalIndexSingleQuoted.ts === +-// const foo = { /*RENAME*/[|0RENAME|]: true }; +-// foo[/*START PREFIX*/'[|0RENAME|]'/*END SUFFIX*/]; ++// const foo = { /*RENAME*/0: true }; ++// foo[0]; + + + +@@= skipped -9, +9 lines =@@ + // @quotePreference: single + + // === /renameNumericalIndexSingleQuoted.ts === +-// const foo = { [|0RENAME|]: true }; +-// foo[/*START PREFIX*/'/*RENAME*/[|0RENAME|]'/*END SUFFIX*/]; ++// const foo = { 0: true }; ++// foo[/*RENAME*/0]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameObjectBindingElementPropertyName01.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameObjectBindingElementPropertyName01.baseline.jsonc new file mode 100644 index 0000000000..06fd8a80b7 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameObjectBindingElementPropertyName01.baseline.jsonc @@ -0,0 +1,21 @@ +// === findRenameLocations === +// === /renameObjectBindingElementPropertyName01.ts === +// interface I { +// /*RENAME*/[|property1RENAME|]: number; +// property2: string; +// } +// +// var foo: I; +// var { [|property1RENAME|]: prop1 } = foo; + + + +// === findRenameLocations === +// === /renameObjectBindingElementPropertyName01.ts === +// interface I { +// [|property1RENAME|]: number; +// property2: string; +// } +// +// var foo: I; +// var { /*RENAME*/[|property1RENAME|]: prop1 } = foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameObjectSpread.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameObjectSpread.baseline.jsonc new file mode 100644 index 0000000000..45184c6886 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameObjectSpread.baseline.jsonc @@ -0,0 +1,30 @@ +// === findRenameLocations === +// === /renameObjectSpread.ts === +// interface A1 { /*RENAME*/[|aRENAME|]: number }; +// interface A2 { a?: number }; +// let a1: A1; +// let a2: A2; +// let a12 = { ...a1, ...a2 }; +// a12.[|aRENAME|]; + + + +// === findRenameLocations === +// === /renameObjectSpread.ts === +// interface A1 { a: number }; +// interface A2 { /*RENAME*/[|aRENAME|]?: number }; +// let a1: A1; +// let a2: A2; +// let a12 = { ...a1, ...a2 }; +// a12.[|aRENAME|]; + + + +// === findRenameLocations === +// === /renameObjectSpread.ts === +// interface A1 { [|aRENAME|]: number }; +// interface A2 { [|aRENAME|]?: number }; +// let a1: A1; +// let a2: A2; +// let a12 = { ...a1, ...a2 }; +// a12./*RENAME*/[|aRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameObjectSpreadAssignment.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameObjectSpreadAssignment.baseline.jsonc new file mode 100644 index 0000000000..10a4cd8889 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameObjectSpreadAssignment.baseline.jsonc @@ -0,0 +1,37 @@ +// === findRenameLocations === +// === /renameObjectSpreadAssignment.ts === +// interface A1 { a: number }; +// interface A2 { a?: number }; +// let /*RENAME*/[|a1RENAME|]: A1; +// let a2: A2; +// let a12 = { ...[|a1RENAME|], ...a2 }; + + + +// === findRenameLocations === +// === /renameObjectSpreadAssignment.ts === +// interface A1 { a: number }; +// interface A2 { a?: number }; +// let [|a1RENAME|]: A1; +// let a2: A2; +// let a12 = { .../*RENAME*/[|a1RENAME|], ...a2 }; + + + +// === findRenameLocations === +// === /renameObjectSpreadAssignment.ts === +// interface A1 { a: number }; +// interface A2 { a?: number }; +// let a1: A1; +// let /*RENAME*/[|a2RENAME|]: A2; +// let a12 = { ...a1, ...[|a2RENAME|] }; + + + +// === findRenameLocations === +// === /renameObjectSpreadAssignment.ts === +// interface A1 { a: number }; +// interface A2 { a?: number }; +// let a1: A1; +// let [|a2RENAME|]: A2; +// let a12 = { ...a1, .../*RENAME*/[|a2RENAME|] }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration1.baseline.jsonc new file mode 100644 index 0000000000..b55e80b306 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration1.baseline.jsonc @@ -0,0 +1,30 @@ +// === findRenameLocations === +// === /renameParameterPropertyDeclaration1.ts === +// class Foo { +// constructor(private /*RENAME*/[|privateParamRENAME|]: number) { +// let localPrivate = [|privateParamRENAME|]; +// this.[|privateParamRENAME|] += 10; +// } +// } + + + +// === findRenameLocations === +// === /renameParameterPropertyDeclaration1.ts === +// class Foo { +// constructor(private [|privateParamRENAME|]: number) { +// let localPrivate = /*RENAME*/[|privateParamRENAME|]; +// this.[|privateParamRENAME|] += 10; +// } +// } + + + +// === findRenameLocations === +// === /renameParameterPropertyDeclaration1.ts === +// class Foo { +// constructor(private [|privateParamRENAME|]: number) { +// let localPrivate = [|privateParamRENAME|]; +// this./*RENAME*/[|privateParamRENAME|] += 10; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration2.baseline.jsonc new file mode 100644 index 0000000000..b354259e54 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration2.baseline.jsonc @@ -0,0 +1,30 @@ +// === findRenameLocations === +// === /renameParameterPropertyDeclaration2.ts === +// class Foo { +// constructor(public /*RENAME*/[|publicParamRENAME|]: number) { +// let publicParam = [|publicParamRENAME|]; +// this.[|publicParamRENAME|] += 10; +// } +// } + + + +// === findRenameLocations === +// === /renameParameterPropertyDeclaration2.ts === +// class Foo { +// constructor(public [|publicParamRENAME|]: number) { +// let publicParam = /*RENAME*/[|publicParamRENAME|]; +// this.[|publicParamRENAME|] += 10; +// } +// } + + + +// === findRenameLocations === +// === /renameParameterPropertyDeclaration2.ts === +// class Foo { +// constructor(public [|publicParamRENAME|]: number) { +// let publicParam = [|publicParamRENAME|]; +// this./*RENAME*/[|publicParamRENAME|] += 10; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration3.baseline.jsonc new file mode 100644 index 0000000000..f9de0f7ff3 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration3.baseline.jsonc @@ -0,0 +1,30 @@ +// === findRenameLocations === +// === /renameParameterPropertyDeclaration3.ts === +// class Foo { +// constructor(protected /*RENAME*/[|protectedParamRENAME|]: number) { +// let protectedParam = [|protectedParamRENAME|]; +// this.[|protectedParamRENAME|] += 10; +// } +// } + + + +// === findRenameLocations === +// === /renameParameterPropertyDeclaration3.ts === +// class Foo { +// constructor(protected [|protectedParamRENAME|]: number) { +// let protectedParam = /*RENAME*/[|protectedParamRENAME|]; +// this.[|protectedParamRENAME|] += 10; +// } +// } + + + +// === findRenameLocations === +// === /renameParameterPropertyDeclaration3.ts === +// class Foo { +// constructor(protected [|protectedParamRENAME|]: number) { +// let protectedParam = [|protectedParamRENAME|]; +// this./*RENAME*/[|protectedParamRENAME|] += 10; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration4.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration4.baseline.jsonc new file mode 100644 index 0000000000..c9b8794ff8 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration4.baseline.jsonc @@ -0,0 +1,17 @@ +// === findRenameLocations === +// === /renameParameterPropertyDeclaration4.ts === +// class Foo { +// constructor(protected { /*START PREFIX*/protectedParam: /*RENAME*/[|protectedParamRENAME|] }) { +// let myProtectedParam = [|protectedParamRENAME|]; +// } +// } + + + +// === findRenameLocations === +// === /renameParameterPropertyDeclaration4.ts === +// class Foo { +// constructor(protected { /*START PREFIX*/protectedParam: [|protectedParamRENAME|] }) { +// let myProtectedParam = /*RENAME*/[|protectedParamRENAME|]; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration5.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration5.baseline.jsonc new file mode 100644 index 0000000000..8c0eaa91cc --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameParameterPropertyDeclaration5.baseline.jsonc @@ -0,0 +1,17 @@ +// === findRenameLocations === +// === /renameParameterPropertyDeclaration5.ts === +// class Foo { +// constructor(protected [ /*RENAME*/[|protectedParamRENAME|] ]) { +// let myProtectedParam = [|protectedParamRENAME|]; +// } +// } + + + +// === findRenameLocations === +// === /renameParameterPropertyDeclaration5.ts === +// class Foo { +// constructor(protected [ [|protectedParamRENAME|] ]) { +// let myProtectedParam = /*RENAME*/[|protectedParamRENAME|]; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateAccessor.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateAccessor.baseline.jsonc new file mode 100644 index 0000000000..c17fa1b962 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateAccessor.baseline.jsonc @@ -0,0 +1,33 @@ +// === findRenameLocations === +// === /renamePrivateAccessor.ts === +// class Foo { +// get /*RENAME*/#foo() { return 1 } +// set #foo(value: number) { } +// retFoo() { +// return this.#foo; +// } +// } + + + +// === findRenameLocations === +// === /renamePrivateAccessor.ts === +// class Foo { +// get #foo() { return 1 } +// set /*RENAME*/#foo(value: number) { } +// retFoo() { +// return this.#foo; +// } +// } + + + +// === findRenameLocations === +// === /renamePrivateAccessor.ts === +// class Foo { +// get #foo() { return 1 } +// set #foo(value: number) { } +// retFoo() { +// return this./*RENAME*/#foo; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateAccessor.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateAccessor.baseline.jsonc.diff new file mode 100644 index 0000000000..66ba385c4f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateAccessor.baseline.jsonc.diff @@ -0,0 +1,64 @@ +--- old.renamePrivateAccessor.baseline.jsonc ++++ new.renamePrivateAccessor.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renamePrivateAccessor.ts === + // class Foo { +-// get /*RENAME*/[|#fooRENAME|]() { return 1 } +-// set [|#fooRENAME|](value: number) { } +-// retFoo() { +-// return this.[|#fooRENAME|]; +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renamePrivateAccessor.ts === +-// class Foo { +-// get [|#fooRENAME|]() { return 1 } +-// set /*RENAME*/[|#fooRENAME|](value: number) { } +-// retFoo() { +-// return this.[|#fooRENAME|]; +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renamePrivateAccessor.ts === +-// class Foo { +-// get [|#fooRENAME|]() { return 1 } +-// set [|#fooRENAME|](value: number) { } +-// retFoo() { +-// return this./*RENAME*/[|#fooRENAME|]; ++// get /*RENAME*/#foo() { return 1 } ++// set #foo(value: number) { } ++// retFoo() { ++// return this.#foo; ++// } ++// } ++ ++ ++ ++// === findRenameLocations === ++// === /renamePrivateAccessor.ts === ++// class Foo { ++// get #foo() { return 1 } ++// set /*RENAME*/#foo(value: number) { } ++// retFoo() { ++// return this.#foo; ++// } ++// } ++ ++ ++ ++// === findRenameLocations === ++// === /renamePrivateAccessor.ts === ++// class Foo { ++// get #foo() { return 1 } ++// set #foo(value: number) { } ++// retFoo() { ++// return this./*RENAME*/#foo; + // } + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateFields1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateFields1.baseline.jsonc new file mode 100644 index 0000000000..87b4d058a8 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateFields1.baseline.jsonc @@ -0,0 +1,21 @@ +// === findRenameLocations === +// === /renamePrivateFields1.ts === +// class Foo { +// /*RENAME*/#foo = 1; +// +// getFoo() { +// return this.#foo; +// } +// } + + + +// === findRenameLocations === +// === /renamePrivateFields1.ts === +// class Foo { +// #foo = 1; +// +// getFoo() { +// return this./*RENAME*/#foo; +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateFields1.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateFields1.baseline.jsonc.diff new file mode 100644 index 0000000000..6cf4b1b70f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateFields1.baseline.jsonc.diff @@ -0,0 +1,27 @@ +--- old.renamePrivateFields1.baseline.jsonc ++++ new.renamePrivateFields1.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renamePrivateFields1.ts === + // class Foo { +-// /*RENAME*/[|#fooRENAME|] = 1; ++// /*RENAME*/#foo = 1; + // + // getFoo() { +-// return this.[|#fooRENAME|]; ++// return this.#foo; + // } + // } + +@@= skipped -12, +12 lines =@@ + // === findRenameLocations === + // === /renamePrivateFields1.ts === + // class Foo { +-// [|#fooRENAME|] = 1; ++// #foo = 1; + // + // getFoo() { +-// return this./*RENAME*/[|#fooRENAME|]; ++// return this./*RENAME*/#foo; + // } + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateMethod.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateMethod.baseline.jsonc new file mode 100644 index 0000000000..0e2eda2824 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateMethod.baseline.jsonc @@ -0,0 +1,19 @@ +// === findRenameLocations === +// === /renamePrivateMethod.ts === +// class Foo { +// /*RENAME*/#foo() { } +// callFoo() { +// return this.#foo(); +// } +// } + + + +// === findRenameLocations === +// === /renamePrivateMethod.ts === +// class Foo { +// #foo() { } +// callFoo() { +// return this./*RENAME*/#foo(); +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateMethod.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateMethod.baseline.jsonc.diff new file mode 100644 index 0000000000..8748dce412 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePrivateMethod.baseline.jsonc.diff @@ -0,0 +1,25 @@ +--- old.renamePrivateMethod.baseline.jsonc ++++ new.renamePrivateMethod.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renamePrivateMethod.ts === + // class Foo { +-// /*RENAME*/[|#fooRENAME|]() { } ++// /*RENAME*/#foo() { } + // callFoo() { +-// return this.[|#fooRENAME|](); ++// return this.#foo(); + // } + // } + +@@= skipped -11, +11 lines =@@ + // === findRenameLocations === + // === /renamePrivateMethod.ts === + // class Foo { +-// [|#fooRENAME|]() { } ++// #foo() { } + // callFoo() { +-// return this./*RENAME*/[|#fooRENAME|](); ++// return this./*RENAME*/#foo(); + // } + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePropertyAccessExpressionHeritageClause.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePropertyAccessExpressionHeritageClause.baseline.jsonc new file mode 100644 index 0000000000..f1a0995307 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renamePropertyAccessExpressionHeritageClause.baseline.jsonc @@ -0,0 +1,30 @@ +// === findRenameLocations === +// === /renamePropertyAccessExpressionHeritageClause.ts === +// class B {} +// function foo() { +// return {/*RENAME*/[|BRENAME|]: B}; +// } +// class C extends (foo()).[|BRENAME|] {} +// class C1 extends foo().[|BRENAME|] {} + + + +// === findRenameLocations === +// === /renamePropertyAccessExpressionHeritageClause.ts === +// class B {} +// function foo() { +// return {[|BRENAME|]: B}; +// } +// class C extends (foo())./*RENAME*/[|BRENAME|] {} +// class C1 extends foo().[|BRENAME|] {} + + + +// === findRenameLocations === +// === /renamePropertyAccessExpressionHeritageClause.ts === +// class B {} +// function foo() { +// return {[|BRENAME|]: B}; +// } +// class C extends (foo()).[|BRENAME|] {} +// class C1 extends foo()./*RENAME*/[|BRENAME|] {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReExportDefault.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReExportDefault.baseline.jsonc new file mode 100644 index 0000000000..450c8648bd --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReExportDefault.baseline.jsonc @@ -0,0 +1,60 @@ +// === findRenameLocations === +// === /a.ts === +// export { default } from "./b"; +// export { default as /*RENAME*/b } from "./b"; +// export { default as bee } from "./b"; +// import { default as b } from "./b"; +// import { default as bee } from "./b"; +// import b from "./b"; + + + +// === findRenameLocations === +// === /a.ts === +// export { default } from "./b"; +// export { default as b } from "./b"; +// export { default as bee } from "./b"; +// import { default as /*RENAME*/[|bRENAME|] } from "./b"; +// import { default as bee } from "./b"; +// import b from "./b"; + + + +// === findRenameLocations === +// === /a.ts === +// export { default } from "./b"; +// export { default as b } from "./b"; +// export { default as bee } from "./b"; +// import { default as b } from "./b"; +// import { default as bee } from "./b"; +// import /*RENAME*/[|bRENAME|] from "./b"; + + + +// === findRenameLocations === +// === /a.ts === +// export { default } from "./b"; +// export { default as b } from "./b"; +// export { default as bee } from "./b"; +// import { default as [|bRENAME|] } from "./b"; +// import { default as bee } from "./b"; +// import [|bRENAME|] from "./b"; + +// === /b.ts === +// const /*RENAME*/[|bRENAME|] = 0; +// export default [|bRENAME|]; + + + +// === findRenameLocations === +// === /a.ts === +// export { default } from "./b"; +// export { default as b } from "./b"; +// export { default as bee } from "./b"; +// import { default as [|bRENAME|] } from "./b"; +// import { default as bee } from "./b"; +// import [|bRENAME|] from "./b"; + +// === /b.ts === +// const [|bRENAME|] = 0; +// export default /*RENAME*/[|bRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReExportDefault.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReExportDefault.baseline.jsonc.diff new file mode 100644 index 0000000000..37732e586e --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReExportDefault.baseline.jsonc.diff @@ -0,0 +1,53 @@ +--- old.renameReExportDefault.baseline.jsonc ++++ new.renameReExportDefault.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /a.ts === + // export { default } from "./b"; +-// export { default as /*RENAME*/[|bRENAME|] } from "./b"; ++// export { default as /*RENAME*/b } from "./b"; + // export { default as bee } from "./b"; + // import { default as b } from "./b"; + // import { default as bee } from "./b"; +@@= skipped -31, +31 lines =@@ + + + // === findRenameLocations === ++// === /a.ts === ++// export { default } from "./b"; ++// export { default as b } from "./b"; ++// export { default as bee } from "./b"; ++// import { default as [|bRENAME|] } from "./b"; ++// import { default as bee } from "./b"; ++// import [|bRENAME|] from "./b"; ++ + // === /b.ts === + // const /*RENAME*/[|bRENAME|] = 0; + // export default [|bRENAME|]; + ++ ++ ++// === findRenameLocations === + // === /a.ts === + // export { default } from "./b"; +-// export { default as [|bRENAME|] } from "./b"; ++// export { default as b } from "./b"; + // export { default as bee } from "./b"; + // import { default as [|bRENAME|] } from "./b"; + // import { default as bee } from "./b"; + // import [|bRENAME|] from "./b"; + +- +- +-// === findRenameLocations === + // === /b.ts === + // const [|bRENAME|] = 0; + // export default /*RENAME*/[|bRENAME|]; +- +-// === /a.ts === +-// export { default } from "./b"; +-// export { default as [|bRENAME|] } from "./b"; +-// export { default as bee } from "./b"; +-// import { default as [|bRENAME|] } from "./b"; +-// import { default as bee } from "./b"; +-// import [|bRENAME|] from "./b"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag1.baseline.jsonc new file mode 100644 index 0000000000..d932689aca --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag1.baseline.jsonc @@ -0,0 +1,6 @@ +// === findRenameLocations === +// === /renameReferenceFromLinkTag1.ts === +// enum E { +// /** {@link /*RENAME*/[|ARENAME|]} */ +// [|ARENAME|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag2.baseline.jsonc new file mode 100644 index 0000000000..45f05c2902 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag2.baseline.jsonc @@ -0,0 +1,9 @@ +// === findRenameLocations === +// === /a.ts === +// enum E { +// /** {@link /*RENAME*/[|FooRENAME|]} */ +// [|FooRENAME|] +// } +// interface Foo { +// foo: E.[|FooRENAME|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag2.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag2.baseline.jsonc.diff new file mode 100644 index 0000000000..5df33af14a --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag2.baseline.jsonc.diff @@ -0,0 +1,14 @@ +--- old.renameReferenceFromLinkTag2.baseline.jsonc ++++ new.renameReferenceFromLinkTag2.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /a.ts === + // enum E { + // /** {@link /*RENAME*/[|FooRENAME|]} */ +-// Foo ++// [|FooRENAME|] + // } +-// interface [|FooRENAME|] { +-// foo: E.Foo; ++// interface Foo { ++// foo: E.[|FooRENAME|]; + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag3.baseline.jsonc new file mode 100644 index 0000000000..b21b1c40c7 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag3.baseline.jsonc @@ -0,0 +1,11 @@ +// === findRenameLocations === +// === /a.ts === +// interface Foo { +// foo: E.[|FooRENAME|]; +// } + +// === /b.ts === +// enum E { +// /** {@link /*RENAME*/[|FooRENAME|]} */ +// [|FooRENAME|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag3.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag3.baseline.jsonc.diff new file mode 100644 index 0000000000..3999adde9f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag3.baseline.jsonc.diff @@ -0,0 +1,17 @@ +--- old.renameReferenceFromLinkTag3.baseline.jsonc ++++ new.renameReferenceFromLinkTag3.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /a.ts === +-// interface [|FooRENAME|] { +-// foo: E.Foo; ++// interface Foo { ++// foo: E.[|FooRENAME|]; + // } + + // === /b.ts === + // enum E { + // /** {@link /*RENAME*/[|FooRENAME|]} */ +-// Foo ++// [|FooRENAME|] + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag4.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag4.baseline.jsonc new file mode 100644 index 0000000000..490ae91a94 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag4.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /renameReferenceFromLinkTag4.ts === +// enum E { +// /** {@link /*RENAME*/[|BRENAME|]} */ +// A, +// [|BRENAME|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag5.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag5.baseline.jsonc new file mode 100644 index 0000000000..930da5e226 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameReferenceFromLinkTag5.baseline.jsonc @@ -0,0 +1,6 @@ +// === findRenameLocations === +// === /renameReferenceFromLinkTag5.ts === +// enum E { +// /** {@link E./*RENAME*/[|ARENAME|]} */ +// [|ARENAME|] +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameRest.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameRest.baseline.jsonc new file mode 100644 index 0000000000..9ae2a09d73 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameRest.baseline.jsonc @@ -0,0 +1,23 @@ +// === findRenameLocations === +// === /renameRest.ts === +// interface Gen { +// x: number; +// /*RENAME*/[|parentRENAME|]: Gen; +// millenial: string; +// } +// let t: Gen; +// var { x, ...rest } = t; +// rest.[|parentRENAME|]; + + + +// === findRenameLocations === +// === /renameRest.ts === +// interface Gen { +// x: number; +// [|parentRENAME|]: Gen; +// millenial: string; +// } +// let t: Gen; +// var { x, ...rest } = t; +// rest./*RENAME*/[|parentRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameRestBindingElement.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameRestBindingElement.baseline.jsonc new file mode 100644 index 0000000000..9bfb1953d6 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameRestBindingElement.baseline.jsonc @@ -0,0 +1,12 @@ +// === findRenameLocations === +// @useAliasesForRename: true + +// === /renameRestBindingElement.ts === +// interface I { +// a: number; +// b: number; +// c: number; +// } +// function foo({ a, .../*RENAME*/[|restRENAME|] }: I) { +// [|restRENAME|]; +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk.baseline.jsonc new file mode 100644 index 0000000000..af955e4968 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk.baseline.jsonc @@ -0,0 +1,31 @@ +// === findRenameLocations === +// === /renameStringLiteralOk.ts === +// interface Foo { +// f: '/*RENAME*/foo' | 'bar' +// } +// const d: 'foo' = 'foo' +// declare const f: Foo +// f.f = 'foo' +// f.f = `foo` + + + +// === findRenameLocations === +// === /renameStringLiteralOk.ts === +// interface Foo { +// f: 'foo' | 'bar' +// } +// const d: 'foo' = 'foo' +// declare const f: Foo +// f.f = '/*RENAME*/foo' +// f.f = `foo` + + + +// === findRenameLocations === +// === /renameStringLiteralOk.ts === +// --- (line: 3) skipped --- +// const d: 'foo' = 'foo' +// declare const f: Foo +// f.f = 'foo' +// f.f = `/*RENAME*/foo` \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk.baseline.jsonc.diff new file mode 100644 index 0000000000..af6f24538f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk.baseline.jsonc.diff @@ -0,0 +1,64 @@ +--- old.renameStringLiteralOk.baseline.jsonc ++++ new.renameStringLiteralOk.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameStringLiteralOk.ts === + // interface Foo { +-// f: '/*RENAME*/[|fooRENAME|]' | 'bar' +-// } +-// const d: 'foo' = 'foo' +-// declare const f: Foo +-// f.f = '[|fooRENAME|]' +-// f.f = `[|fooRENAME|]` +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralOk.ts === +-// interface Foo { +-// f: '[|fooRENAME|]' | 'bar' +-// } +-// const d: 'foo' = 'foo' +-// declare const f: Foo +-// f.f = '/*RENAME*/[|fooRENAME|]' +-// f.f = `[|fooRENAME|]` +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralOk.ts === +-// interface Foo { +-// f: '[|fooRENAME|]' | 'bar' +-// } +-// const d: 'foo' = 'foo' +-// declare const f: Foo +-// f.f = '[|fooRENAME|]' +-// f.f = `/*RENAME*/[|fooRENAME|]` ++// f: '/*RENAME*/foo' | 'bar' ++// } ++// const d: 'foo' = 'foo' ++// declare const f: Foo ++// f.f = 'foo' ++// f.f = `foo` ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralOk.ts === ++// interface Foo { ++// f: 'foo' | 'bar' ++// } ++// const d: 'foo' = 'foo' ++// declare const f: Foo ++// f.f = '/*RENAME*/foo' ++// f.f = `foo` ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralOk.ts === ++// --- (line: 3) skipped --- ++// const d: 'foo' = 'foo' ++// declare const f: Foo ++// f.f = 'foo' ++// f.f = `/*RENAME*/foo` \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk1.baseline.jsonc new file mode 100644 index 0000000000..63c08bb37f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk1.baseline.jsonc @@ -0,0 +1,17 @@ +// === findRenameLocations === +// === /renameStringLiteralOk1.ts === +// declare function f(): '/*RENAME*/foo' | 'bar' +// class Foo { +// f = f() +// } +// // --- (line: 5) skipped --- + + + +// === findRenameLocations === +// === /renameStringLiteralOk1.ts === +// --- (line: 3) skipped --- +// } +// const d: 'foo' = 'foo' +// declare const ff: Foo +// ff.f = '/*RENAME*/foo' \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk1.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk1.baseline.jsonc.diff new file mode 100644 index 0000000000..614668ad48 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralOk1.baseline.jsonc.diff @@ -0,0 +1,28 @@ +--- old.renameStringLiteralOk1.baseline.jsonc ++++ new.renameStringLiteralOk1.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameStringLiteralOk1.ts === +-// declare function f(): '/*RENAME*/[|fooRENAME|]' | 'bar' ++// declare function f(): '/*RENAME*/foo' | 'bar' + // class Foo { + // f = f() + // } +-// const d: 'foo' = 'foo' +-// declare const ff: Foo +-// ff.f = '[|fooRENAME|]' ++// // --- (line: 5) skipped --- + + + + // === findRenameLocations === + // === /renameStringLiteralOk1.ts === +-// declare function f(): '[|fooRENAME|]' | 'bar' +-// class Foo { +-// f = f() ++// --- (line: 3) skipped --- + // } + // const d: 'foo' = 'foo' + // declare const ff: Foo +-// ff.f = '/*RENAME*/[|fooRENAME|]' ++// ff.f = '/*RENAME*/foo' \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes1.baseline.jsonc new file mode 100644 index 0000000000..43b7c665e5 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes1.baseline.jsonc @@ -0,0 +1,21 @@ +// === findRenameLocations === +// === /renameStringLiteralTypes1.ts === +// interface AnimationOptions { +// deltaX: number; +// deltaY: number; +// easing: "ease-in" | "ease-out" | "/*RENAME*/ease-in-out"; +// } +// +// function animate(o: AnimationOptions) { } +// +// animate({ deltaX: 100, deltaY: 100, easing: "ease-in-out" }); + + + +// === findRenameLocations === +// === /renameStringLiteralTypes1.ts === +// --- (line: 5) skipped --- +// +// function animate(o: AnimationOptions) { } +// +// animate({ deltaX: 100, deltaY: 100, easing: "/*RENAME*/ease-in-out" }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes1.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes1.baseline.jsonc.diff new file mode 100644 index 0000000000..4800cdb997 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes1.baseline.jsonc.diff @@ -0,0 +1,30 @@ +--- old.renameStringLiteralTypes1.baseline.jsonc ++++ new.renameStringLiteralTypes1.baseline.jsonc +@@= skipped -2, +2 lines =@@ + // interface AnimationOptions { + // deltaX: number; + // deltaY: number; +-// easing: "ease-in" | "ease-out" | "/*RENAME*/[|ease-in-outRENAME|]"; ++// easing: "ease-in" | "ease-out" | "/*RENAME*/ease-in-out"; + // } + // + // function animate(o: AnimationOptions) { } + // +-// animate({ deltaX: 100, deltaY: 100, easing: "[|ease-in-outRENAME|]" }); ++// animate({ deltaX: 100, deltaY: 100, easing: "ease-in-out" }); + + + + // === findRenameLocations === + // === /renameStringLiteralTypes1.ts === +-// interface AnimationOptions { +-// deltaX: number; +-// deltaY: number; +-// easing: "ease-in" | "ease-out" | "[|ease-in-outRENAME|]"; +-// } ++// --- (line: 5) skipped --- + // + // function animate(o: AnimationOptions) { } + // +-// animate({ deltaX: 100, deltaY: 100, easing: "/*RENAME*/[|ease-in-outRENAME|]" }); ++// animate({ deltaX: 100, deltaY: 100, easing: "/*RENAME*/ease-in-out" }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes2.baseline.jsonc new file mode 100644 index 0000000000..0640c3fdc4 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes2.baseline.jsonc @@ -0,0 +1,131 @@ +// === findRenameLocations === +// === /renameStringLiteralTypes2.ts === +// type Foo = "/*RENAME*/a" | "b"; +// +// class C { +// p: Foo = "a"; +// // --- (line: 5) skipped --- + + + +// === findRenameLocations === +// === /renameStringLiteralTypes2.ts === +// type Foo = "a" | "b"; +// +// class C { +// p: Foo = "/*RENAME*/a"; +// m() { +// if (this.p === "a") {} +// if ("a" === this.p) {} +// // --- (line: 8) skipped --- + + + +// === findRenameLocations === +// === /renameStringLiteralTypes2.ts === +// type Foo = "a" | "b"; +// +// class C { +// p: Foo = "a"; +// m() { +// if (this.p === "/*RENAME*/a") {} +// if ("a" === this.p) {} +// +// if (this.p !== "a") {} +// // --- (line: 10) skipped --- + + + +// === findRenameLocations === +// === /renameStringLiteralTypes2.ts === +// --- (line: 3) skipped --- +// p: Foo = "a"; +// m() { +// if (this.p === "a") {} +// if ("/*RENAME*/a" === this.p) {} +// +// if (this.p !== "a") {} +// if ("a" !== this.p) {} +// // --- (line: 11) skipped --- + + + +// === findRenameLocations === +// === /renameStringLiteralTypes2.ts === +// --- (line: 5) skipped --- +// if (this.p === "a") {} +// if ("a" === this.p) {} +// +// if (this.p !== "/*RENAME*/a") {} +// if ("a" !== this.p) {} +// +// if (this.p == "a") {} +// // --- (line: 13) skipped --- + + + +// === findRenameLocations === +// === /renameStringLiteralTypes2.ts === +// --- (line: 6) skipped --- +// if ("a" === this.p) {} +// +// if (this.p !== "a") {} +// if ("/*RENAME*/a" !== this.p) {} +// +// if (this.p == "a") {} +// if ("a" == this.p) {} +// // --- (line: 14) skipped --- + + + +// === findRenameLocations === +// === /renameStringLiteralTypes2.ts === +// --- (line: 8) skipped --- +// if (this.p !== "a") {} +// if ("a" !== this.p) {} +// +// if (this.p == "/*RENAME*/a") {} +// if ("a" == this.p) {} +// +// if (this.p != "a") {} +// // --- (line: 16) skipped --- + + + +// === findRenameLocations === +// === /renameStringLiteralTypes2.ts === +// --- (line: 9) skipped --- +// if ("a" !== this.p) {} +// +// if (this.p == "a") {} +// if ("/*RENAME*/a" == this.p) {} +// +// if (this.p != "a") {} +// if ("a" != this.p) {} +// } +// } + + + +// === findRenameLocations === +// === /renameStringLiteralTypes2.ts === +// --- (line: 11) skipped --- +// if (this.p == "a") {} +// if ("a" == this.p) {} +// +// if (this.p != "/*RENAME*/a") {} +// if ("a" != this.p) {} +// } +// } + + + +// === findRenameLocations === +// === /renameStringLiteralTypes2.ts === +// --- (line: 12) skipped --- +// if ("a" == this.p) {} +// +// if (this.p != "a") {} +// if ("/*RENAME*/a" != this.p) {} +// } +// } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes2.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes2.baseline.jsonc.diff new file mode 100644 index 0000000000..b3dbc96cb5 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes2.baseline.jsonc.diff @@ -0,0 +1,357 @@ +--- old.renameStringLiteralTypes2.baseline.jsonc ++++ new.renameStringLiteralTypes2.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameStringLiteralTypes2.ts === +-// type Foo = "/*RENAME*/[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// if (this.p === "[|aRENAME|]") {} +-// if ("[|aRENAME|]" === this.p) {} +-// +-// if (this.p !== "[|aRENAME|]") {} +-// if ("[|aRENAME|]" !== this.p) {} +-// +-// if (this.p == "[|aRENAME|]") {} +-// if ("[|aRENAME|]" == this.p) {} +-// +-// if (this.p != "[|aRENAME|]") {} +-// if ("[|aRENAME|]" != this.p) {} +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes2.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "/*RENAME*/[|aRENAME|]"; +-// m() { +-// if (this.p === "[|aRENAME|]") {} +-// if ("[|aRENAME|]" === this.p) {} +-// +-// if (this.p !== "[|aRENAME|]") {} +-// if ("[|aRENAME|]" !== this.p) {} +-// +-// if (this.p == "[|aRENAME|]") {} +-// if ("[|aRENAME|]" == this.p) {} +-// +-// if (this.p != "[|aRENAME|]") {} +-// if ("[|aRENAME|]" != this.p) {} +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes2.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// if (this.p === "/*RENAME*/[|aRENAME|]") {} +-// if ("[|aRENAME|]" === this.p) {} +-// +-// if (this.p !== "[|aRENAME|]") {} +-// if ("[|aRENAME|]" !== this.p) {} +-// +-// if (this.p == "[|aRENAME|]") {} +-// if ("[|aRENAME|]" == this.p) {} +-// +-// if (this.p != "[|aRENAME|]") {} +-// if ("[|aRENAME|]" != this.p) {} +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes2.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// if (this.p === "[|aRENAME|]") {} +-// if ("/*RENAME*/[|aRENAME|]" === this.p) {} +-// +-// if (this.p !== "[|aRENAME|]") {} +-// if ("[|aRENAME|]" !== this.p) {} +-// +-// if (this.p == "[|aRENAME|]") {} +-// if ("[|aRENAME|]" == this.p) {} +-// +-// if (this.p != "[|aRENAME|]") {} +-// if ("[|aRENAME|]" != this.p) {} +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes2.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// if (this.p === "[|aRENAME|]") {} +-// if ("[|aRENAME|]" === this.p) {} +-// +-// if (this.p !== "/*RENAME*/[|aRENAME|]") {} +-// if ("[|aRENAME|]" !== this.p) {} +-// +-// if (this.p == "[|aRENAME|]") {} +-// if ("[|aRENAME|]" == this.p) {} +-// +-// if (this.p != "[|aRENAME|]") {} +-// if ("[|aRENAME|]" != this.p) {} +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes2.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// if (this.p === "[|aRENAME|]") {} +-// if ("[|aRENAME|]" === this.p) {} +-// +-// if (this.p !== "[|aRENAME|]") {} +-// if ("/*RENAME*/[|aRENAME|]" !== this.p) {} +-// +-// if (this.p == "[|aRENAME|]") {} +-// if ("[|aRENAME|]" == this.p) {} +-// +-// if (this.p != "[|aRENAME|]") {} +-// if ("[|aRENAME|]" != this.p) {} +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes2.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// if (this.p === "[|aRENAME|]") {} +-// if ("[|aRENAME|]" === this.p) {} +-// +-// if (this.p !== "[|aRENAME|]") {} +-// if ("[|aRENAME|]" !== this.p) {} +-// +-// if (this.p == "/*RENAME*/[|aRENAME|]") {} +-// if ("[|aRENAME|]" == this.p) {} +-// +-// if (this.p != "[|aRENAME|]") {} +-// if ("[|aRENAME|]" != this.p) {} +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes2.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// if (this.p === "[|aRENAME|]") {} +-// if ("[|aRENAME|]" === this.p) {} +-// +-// if (this.p !== "[|aRENAME|]") {} +-// if ("[|aRENAME|]" !== this.p) {} +-// +-// if (this.p == "[|aRENAME|]") {} +-// if ("/*RENAME*/[|aRENAME|]" == this.p) {} +-// +-// if (this.p != "[|aRENAME|]") {} +-// if ("[|aRENAME|]" != this.p) {} +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes2.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// if (this.p === "[|aRENAME|]") {} +-// if ("[|aRENAME|]" === this.p) {} +-// +-// if (this.p !== "[|aRENAME|]") {} +-// if ("[|aRENAME|]" !== this.p) {} +-// +-// if (this.p == "[|aRENAME|]") {} +-// if ("[|aRENAME|]" == this.p) {} +-// +-// if (this.p != "/*RENAME*/[|aRENAME|]") {} +-// if ("[|aRENAME|]" != this.p) {} +-// } +-// } +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes2.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// if (this.p === "[|aRENAME|]") {} +-// if ("[|aRENAME|]" === this.p) {} +-// +-// if (this.p !== "[|aRENAME|]") {} +-// if ("[|aRENAME|]" !== this.p) {} +-// +-// if (this.p == "[|aRENAME|]") {} +-// if ("[|aRENAME|]" == this.p) {} +-// +-// if (this.p != "[|aRENAME|]") {} +-// if ("/*RENAME*/[|aRENAME|]" != this.p) {} ++// type Foo = "/*RENAME*/a" | "b"; ++// ++// class C { ++// p: Foo = "a"; ++// // --- (line: 5) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes2.ts === ++// type Foo = "a" | "b"; ++// ++// class C { ++// p: Foo = "/*RENAME*/a"; ++// m() { ++// if (this.p === "a") {} ++// if ("a" === this.p) {} ++// // --- (line: 8) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes2.ts === ++// type Foo = "a" | "b"; ++// ++// class C { ++// p: Foo = "a"; ++// m() { ++// if (this.p === "/*RENAME*/a") {} ++// if ("a" === this.p) {} ++// ++// if (this.p !== "a") {} ++// // --- (line: 10) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes2.ts === ++// --- (line: 3) skipped --- ++// p: Foo = "a"; ++// m() { ++// if (this.p === "a") {} ++// if ("/*RENAME*/a" === this.p) {} ++// ++// if (this.p !== "a") {} ++// if ("a" !== this.p) {} ++// // --- (line: 11) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes2.ts === ++// --- (line: 5) skipped --- ++// if (this.p === "a") {} ++// if ("a" === this.p) {} ++// ++// if (this.p !== "/*RENAME*/a") {} ++// if ("a" !== this.p) {} ++// ++// if (this.p == "a") {} ++// // --- (line: 13) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes2.ts === ++// --- (line: 6) skipped --- ++// if ("a" === this.p) {} ++// ++// if (this.p !== "a") {} ++// if ("/*RENAME*/a" !== this.p) {} ++// ++// if (this.p == "a") {} ++// if ("a" == this.p) {} ++// // --- (line: 14) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes2.ts === ++// --- (line: 8) skipped --- ++// if (this.p !== "a") {} ++// if ("a" !== this.p) {} ++// ++// if (this.p == "/*RENAME*/a") {} ++// if ("a" == this.p) {} ++// ++// if (this.p != "a") {} ++// // --- (line: 16) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes2.ts === ++// --- (line: 9) skipped --- ++// if ("a" !== this.p) {} ++// ++// if (this.p == "a") {} ++// if ("/*RENAME*/a" == this.p) {} ++// ++// if (this.p != "a") {} ++// if ("a" != this.p) {} ++// } ++// } ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes2.ts === ++// --- (line: 11) skipped --- ++// if (this.p == "a") {} ++// if ("a" == this.p) {} ++// ++// if (this.p != "/*RENAME*/a") {} ++// if ("a" != this.p) {} ++// } ++// } ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes2.ts === ++// --- (line: 12) skipped --- ++// if ("a" == this.p) {} ++// ++// if (this.p != "a") {} ++// if ("/*RENAME*/a" != this.p) {} + // } + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes3.baseline.jsonc new file mode 100644 index 0000000000..ccc899d6ec --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes3.baseline.jsonc @@ -0,0 +1,34 @@ +// === findRenameLocations === +// === /renameStringLiteralTypes3.ts === +// type Foo = "/*RENAME*/a" | "b"; +// +// class C { +// p: Foo = "a"; +// // --- (line: 5) skipped --- + + + +// === findRenameLocations === +// === /renameStringLiteralTypes3.ts === +// type Foo = "a" | "b"; +// +// class C { +// p: Foo = "/*RENAME*/a"; +// m() { +// switch (this.p) { +// case "a": +// // --- (line: 8) skipped --- + + + +// === findRenameLocations === +// === /renameStringLiteralTypes3.ts === +// --- (line: 3) skipped --- +// p: Foo = "a"; +// m() { +// switch (this.p) { +// case "/*RENAME*/a": +// return 1; +// case "b": +// return 2; +// // --- (line: 11) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes3.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes3.baseline.jsonc.diff new file mode 100644 index 0000000000..e31257d7b7 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes3.baseline.jsonc.diff @@ -0,0 +1,80 @@ +--- old.renameStringLiteralTypes3.baseline.jsonc ++++ new.renameStringLiteralTypes3.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameStringLiteralTypes3.ts === +-// type Foo = "/*RENAME*/[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// switch (this.p) { +-// case "[|aRENAME|]": +-// return 1; +-// case "b": +-// return 2; +-// --- (line: 11) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes3.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "/*RENAME*/[|aRENAME|]"; +-// m() { +-// switch (this.p) { +-// case "[|aRENAME|]": +-// return 1; +-// case "b": +-// return 2; +-// --- (line: 11) skipped --- +- +- +- +-// === findRenameLocations === +-// === /renameStringLiteralTypes3.ts === +-// type Foo = "[|aRENAME|]" | "b"; +-// +-// class C { +-// p: Foo = "[|aRENAME|]"; +-// m() { +-// switch (this.p) { +-// case "/*RENAME*/[|aRENAME|]": +-// return 1; +-// case "b": +-// return 2; +-// --- (line: 11) skipped --- ++// type Foo = "/*RENAME*/a" | "b"; ++// ++// class C { ++// p: Foo = "a"; ++// // --- (line: 5) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes3.ts === ++// type Foo = "a" | "b"; ++// ++// class C { ++// p: Foo = "/*RENAME*/a"; ++// m() { ++// switch (this.p) { ++// case "a": ++// // --- (line: 8) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringLiteralTypes3.ts === ++// --- (line: 3) skipped --- ++// p: Foo = "a"; ++// m() { ++// switch (this.p) { ++// case "/*RENAME*/a": ++// return 1; ++// case "b": ++// return 2; ++// // --- (line: 11) skipped --- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes4.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes4.baseline.jsonc new file mode 100644 index 0000000000..12fad48b96 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes4.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /renameStringLiteralTypes4.ts === +// --- (line: 3) skipped --- +// +// declare const fn: (p: K) => void +// +// fn("Prop 1"/*RENAME*/) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes4.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes4.baseline.jsonc.diff new file mode 100644 index 0000000000..9f06762085 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes4.baseline.jsonc.diff @@ -0,0 +1,14 @@ +--- old.renameStringLiteralTypes4.baseline.jsonc ++++ new.renameStringLiteralTypes4.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameStringLiteralTypes4.ts === +-// interface I { +-// "[|Prop 1RENAME|]": string; +-// } ++// --- (line: 3) skipped --- + // + // declare const fn: (p: K) => void + // +-// fn("[|Prop 1RENAME|]"/*RENAME*/) ++// fn("Prop 1"/*RENAME*/) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes5.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes5.baseline.jsonc new file mode 100644 index 0000000000..31e195ba65 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes5.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /renameStringLiteralTypes5.ts === +// --- (line: 3) skipped --- +// +// declare const fn: (p: K) => void +// +// fn("Prop 1"/*RENAME*/) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes5.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes5.baseline.jsonc.diff new file mode 100644 index 0000000000..df134a3255 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringLiteralTypes5.baseline.jsonc.diff @@ -0,0 +1,14 @@ +--- old.renameStringLiteralTypes5.baseline.jsonc ++++ new.renameStringLiteralTypes5.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameStringLiteralTypes5.ts === +-// type T = { +-// "[|Prop 1RENAME|]": string; +-// } ++// --- (line: 3) skipped --- + // + // declare const fn: (p: K) => void + // +-// fn("[|Prop 1RENAME|]"/*RENAME*/) ++// fn("Prop 1"/*RENAME*/) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames.baseline.jsonc new file mode 100644 index 0000000000..ba82999e6c --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames.baseline.jsonc @@ -0,0 +1,68 @@ +// === findRenameLocations === +// === /renameStringPropertyNames.ts === +// var o = { +// /*RENAME*/[|propRENAME|]: 0 +// }; +// +// o = { +// "[|propRENAME|]": 1 +// }; +// +// o["[|propRENAME|]"]; +// o['[|propRENAME|]']; +// o.[|propRENAME|]; + + + +// === findRenameLocations === +// === /renameStringPropertyNames.ts === +// var o = { +// prop: 0 +// }; +// +// o = { +// "/*RENAME*/prop": 1 +// }; +// +// o["prop"]; +// o['prop']; +// o.prop; + + + +// === findRenameLocations === +// === /renameStringPropertyNames.ts === +// --- (line: 5) skipped --- +// "prop": 1 +// }; +// +// o["/*RENAME*/prop"]; +// o['prop']; +// o.prop; + + + +// === findRenameLocations === +// === /renameStringPropertyNames.ts === +// --- (line: 6) skipped --- +// }; +// +// o["prop"]; +// o['/*RENAME*/prop']; +// o.prop; + + + +// === findRenameLocations === +// === /renameStringPropertyNames.ts === +// var o = { +// [|propRENAME|]: 0 +// }; +// +// o = { +// "[|propRENAME|]": 1 +// }; +// +// o["[|propRENAME|]"]; +// o['[|propRENAME|]']; +// o./*RENAME*/[|propRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames.baseline.jsonc.diff new file mode 100644 index 0000000000..3e4ddebfd3 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames.baseline.jsonc.diff @@ -0,0 +1,83 @@ +--- old.renameStringPropertyNames.baseline.jsonc ++++ new.renameStringPropertyNames.baseline.jsonc +@@= skipped -16, +16 lines =@@ + // === findRenameLocations === + // === /renameStringPropertyNames.ts === + // var o = { +-// [|propRENAME|]: 0 +-// }; +-// +-// o = { +-// "/*RENAME*/[|propRENAME|]": 1 +-// }; +-// +-// o["[|propRENAME|]"]; +-// o['[|propRENAME|]']; +-// o.[|propRENAME|]; +- +- +- +-// === findRenameLocations === +-// === /renameStringPropertyNames.ts === +-// var o = { +-// [|propRENAME|]: 0 +-// }; +-// +-// o = { +-// "[|propRENAME|]": 1 +-// }; +-// +-// o["/*RENAME*/[|propRENAME|]"]; +-// o['[|propRENAME|]']; +-// o.[|propRENAME|]; +- +- +- +-// === findRenameLocations === +-// === /renameStringPropertyNames.ts === +-// var o = { +-// [|propRENAME|]: 0 +-// }; +-// +-// o = { +-// "[|propRENAME|]": 1 +-// }; +-// +-// o["[|propRENAME|]"]; +-// o['/*RENAME*/[|propRENAME|]']; +-// o.[|propRENAME|]; ++// prop: 0 ++// }; ++// ++// o = { ++// "/*RENAME*/prop": 1 ++// }; ++// ++// o["prop"]; ++// o['prop']; ++// o.prop; ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringPropertyNames.ts === ++// --- (line: 5) skipped --- ++// "prop": 1 ++// }; ++// ++// o["/*RENAME*/prop"]; ++// o['prop']; ++// o.prop; ++ ++ ++ ++// === findRenameLocations === ++// === /renameStringPropertyNames.ts === ++// --- (line: 6) skipped --- ++// }; ++// ++// o["prop"]; ++// o['/*RENAME*/prop']; ++// o.prop; + + diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames2.baseline.jsonc new file mode 100644 index 0000000000..31f0c7a560 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames2.baseline.jsonc @@ -0,0 +1,7 @@ +// === findRenameLocations === +// === /renameStringPropertyNames2.ts === +// --- (line: 4) skipped --- +// let { foo }: Props = null as any; +// foo; +// +// let asd: Props = { "foo"/*RENAME*/: true }; // rename foo here \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames2.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames2.baseline.jsonc.diff new file mode 100644 index 0000000000..48096d12df --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameStringPropertyNames2.baseline.jsonc.diff @@ -0,0 +1,16 @@ +--- old.renameStringPropertyNames2.baseline.jsonc ++++ new.renameStringPropertyNames2.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /renameStringPropertyNames2.ts === +-// type Props = { +-// [|fooRENAME|]: boolean; +-// } +-// +-// let { [|fooRENAME|]: foo/*END SUFFIX*/ }: Props = null as any; ++// --- (line: 4) skipped --- ++// let { foo }: Props = null as any; + // foo; + // +-// let asd: Props = { "[|fooRENAME|]"/*RENAME*/: true }; // rename foo here ++// let asd: Props = { "foo"/*RENAME*/: true }; // rename foo here \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsComputedProperties.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsComputedProperties.baseline.jsonc new file mode 100644 index 0000000000..25095184a2 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsComputedProperties.baseline.jsonc @@ -0,0 +1,333 @@ +// === findRenameLocations === +// === /a.ts === +// interface Obj { +// [`/*RENAME*/num`]: number; +// ['bool']: boolean; +// } +// +// // --- (line: 6) skipped --- + + + +// === findRenameLocations === +// === /a.ts === +// --- (line: 3) skipped --- +// } +// +// let o: Obj = { +// [`/*RENAME*/num`]: 0, +// ['bool']: true, +// }; +// +// // --- (line: 11) skipped --- + + + +// === findRenameLocations === +// === /a.ts === +// --- (line: 8) skipped --- +// }; +// +// o = { +// ['/*RENAME*/num']: 1, +// [`bool`]: false, +// }; +// +// // --- (line: 16) skipped --- + + + +// === findRenameLocations === +// === /a.ts === +// interface Obj { +// [`[|numRENAME|]`]: number; +// ['bool']: boolean; +// } +// +// let o: Obj = { +// [`[|numRENAME|]`]: 0, +// ['bool']: true, +// }; +// +// o = { +// ['[|numRENAME|]']: 1, +// [`bool`]: false, +// }; +// +// o./*RENAME*/[|numRENAME|]; +// o['[|numRENAME|]']; +// o["[|numRENAME|]"]; +// o[`[|numRENAME|]`]; +// +// o.bool; +// o['bool']; +// // --- (line: 23) skipped --- + +// === /b.js === +// import { o as obj } from './a'; +// +// obj.[|numRENAME|]; +// obj[`[|numRENAME|]`]; +// +// obj.bool; +// obj[`bool`]; + + + +// === findRenameLocations === +// === /a.ts === +// --- (line: 13) skipped --- +// }; +// +// o.num; +// o['/*RENAME*/num']; +// o["num"]; +// o[`num`]; +// +// // --- (line: 21) skipped --- + + + +// === findRenameLocations === +// === /a.ts === +// --- (line: 14) skipped --- +// +// o.num; +// o['num']; +// o["/*RENAME*/num"]; +// o[`num`]; +// +// o.bool; +// // --- (line: 22) skipped --- + + + +// === findRenameLocations === +// === /a.ts === +// --- (line: 15) skipped --- +// o.num; +// o['num']; +// o["num"]; +// o[`/*RENAME*/num`]; +// +// o.bool; +// o['bool']; +// // --- (line: 23) skipped --- + + + +// === findRenameLocations === +// === /a.ts === +// interface Obj { +// [`[|numRENAME|]`]: number; +// ['bool']: boolean; +// } +// +// let o: Obj = { +// [`[|numRENAME|]`]: 0, +// ['bool']: true, +// }; +// +// o = { +// ['[|numRENAME|]']: 1, +// [`bool`]: false, +// }; +// +// o.[|numRENAME|]; +// o['[|numRENAME|]']; +// o["[|numRENAME|]"]; +// o[`[|numRENAME|]`]; +// +// o.bool; +// o['bool']; +// // --- (line: 23) skipped --- + +// === /b.js === +// import { o as obj } from './a'; +// +// obj./*RENAME*/[|numRENAME|]; +// obj[`[|numRENAME|]`]; +// +// obj.bool; +// obj[`bool`]; + + + +// === findRenameLocations === +// === /b.js === +// import { o as obj } from './a'; +// +// obj.num; +// obj[`/*RENAME*/num`]; +// +// obj.bool; +// obj[`bool`]; + + + +// === findRenameLocations === +// === /a.ts === +// interface Obj { +// [`num`]: number; +// ['/*RENAME*/bool']: boolean; +// } +// +// let o: Obj = { +// // --- (line: 7) skipped --- + + + +// === findRenameLocations === +// === /a.ts === +// --- (line: 4) skipped --- +// +// let o: Obj = { +// [`num`]: 0, +// ['/*RENAME*/bool']: true, +// }; +// +// o = { +// // --- (line: 12) skipped --- + + + +// === findRenameLocations === +// === /a.ts === +// --- (line: 9) skipped --- +// +// o = { +// ['num']: 1, +// [`/*RENAME*/bool`]: false, +// }; +// +// o.num; +// // --- (line: 17) skipped --- + + + +// === findRenameLocations === +// === /a.ts === +// interface Obj { +// [`num`]: number; +// ['[|boolRENAME|]']: boolean; +// } +// +// let o: Obj = { +// [`num`]: 0, +// ['[|boolRENAME|]']: true, +// }; +// +// o = { +// ['num']: 1, +// [`[|boolRENAME|]`]: false, +// }; +// +// o.num; +// o['num']; +// o["num"]; +// o[`num`]; +// +// o./*RENAME*/[|boolRENAME|]; +// o['[|boolRENAME|]']; +// o["[|boolRENAME|]"]; +// o[`[|boolRENAME|]`]; +// +// export { o }; + +// === /b.js === +// import { o as obj } from './a'; +// +// obj.num; +// obj[`num`]; +// +// obj.[|boolRENAME|]; +// obj[`[|boolRENAME|]`]; + + + +// === findRenameLocations === +// === /a.ts === +// --- (line: 18) skipped --- +// o[`num`]; +// +// o.bool; +// o['/*RENAME*/bool']; +// o["bool"]; +// o[`bool`]; +// +// export { o }; + + + +// === findRenameLocations === +// === /a.ts === +// --- (line: 19) skipped --- +// +// o.bool; +// o['bool']; +// o["/*RENAME*/bool"]; +// o[`bool`]; +// +// export { o }; + + + +// === findRenameLocations === +// === /a.ts === +// --- (line: 20) skipped --- +// o.bool; +// o['bool']; +// o["bool"]; +// o[`/*RENAME*/bool`]; +// +// export { o }; + + + +// === findRenameLocations === +// === /a.ts === +// interface Obj { +// [`num`]: number; +// ['[|boolRENAME|]']: boolean; +// } +// +// let o: Obj = { +// [`num`]: 0, +// ['[|boolRENAME|]']: true, +// }; +// +// o = { +// ['num']: 1, +// [`[|boolRENAME|]`]: false, +// }; +// +// o.num; +// o['num']; +// o["num"]; +// o[`num`]; +// +// o.[|boolRENAME|]; +// o['[|boolRENAME|]']; +// o["[|boolRENAME|]"]; +// o[`[|boolRENAME|]`]; +// +// export { o }; + +// === /b.js === +// import { o as obj } from './a'; +// +// obj.num; +// obj[`num`]; +// +// obj./*RENAME*/[|boolRENAME|]; +// obj[`[|boolRENAME|]`]; + + + +// === findRenameLocations === +// === /b.js === +// --- (line: 3) skipped --- +// obj[`num`]; +// +// obj.bool; +// obj[`/*RENAME*/bool`]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsComputedProperties.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsComputedProperties.baseline.jsonc.diff new file mode 100644 index 0000000000..242764bf5c --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsComputedProperties.baseline.jsonc.diff @@ -0,0 +1,774 @@ +--- old.renameTemplateLiteralsComputedProperties.baseline.jsonc ++++ new.renameTemplateLiteralsComputedProperties.baseline.jsonc +@@= skipped -0, +0 lines =@@ + // === findRenameLocations === + // === /a.ts === + // interface Obj { +-// [`/*RENAME*/[|numRENAME|]`]: number; +-// ['bool']: boolean; +-// } +-// +-// let o: Obj = { +-// [`[|numRENAME|]`]: 0, +-// ['bool']: true, +-// }; +-// +-// o = { +-// ['[|numRENAME|]']: 1, +-// [`bool`]: false, +-// }; +-// +-// o.[|numRENAME|]; +-// o['[|numRENAME|]']; +-// o["[|numRENAME|]"]; +-// o[`[|numRENAME|]`]; +-// +-// o.bool; +-// o['bool']; +-// --- (line: 23) skipped --- +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.[|numRENAME|]; +-// obj[`[|numRENAME|]`]; +-// +-// obj.bool; +-// obj[`bool`]; +- +- +- +-// === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`[|numRENAME|]`]: number; +-// ['bool']: boolean; +-// } +-// +-// let o: Obj = { +-// [`/*RENAME*/[|numRENAME|]`]: 0, +-// ['bool']: true, +-// }; +-// +-// o = { +-// ['[|numRENAME|]']: 1, +-// [`bool`]: false, +-// }; +-// +-// o.[|numRENAME|]; +-// o['[|numRENAME|]']; +-// o["[|numRENAME|]"]; +-// o[`[|numRENAME|]`]; +-// +-// o.bool; +-// o['bool']; +-// --- (line: 23) skipped --- +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.[|numRENAME|]; +-// obj[`[|numRENAME|]`]; +-// +-// obj.bool; +-// obj[`bool`]; +- +- +- +-// === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`[|numRENAME|]`]: number; +-// ['bool']: boolean; +-// } +-// +-// let o: Obj = { +-// [`[|numRENAME|]`]: 0, +-// ['bool']: true, +-// }; +-// +-// o = { +-// ['/*RENAME*/[|numRENAME|]']: 1, +-// [`bool`]: false, +-// }; +-// +-// o.[|numRENAME|]; +-// o['[|numRENAME|]']; +-// o["[|numRENAME|]"]; +-// o[`[|numRENAME|]`]; +-// +-// o.bool; +-// o['bool']; +-// --- (line: 23) skipped --- +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.[|numRENAME|]; +-// obj[`[|numRENAME|]`]; +-// +-// obj.bool; +-// obj[`bool`]; ++// [`/*RENAME*/num`]: number; ++// ['bool']: boolean; ++// } ++// ++// // --- (line: 6) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /a.ts === ++// --- (line: 3) skipped --- ++// } ++// ++// let o: Obj = { ++// [`/*RENAME*/num`]: 0, ++// ['bool']: true, ++// }; ++// ++// // --- (line: 11) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /a.ts === ++// --- (line: 8) skipped --- ++// }; ++// ++// o = { ++// ['/*RENAME*/num']: 1, ++// [`bool`]: false, ++// }; ++// ++// // --- (line: 16) skipped --- + + + +@@= skipped -132, +60 lines =@@ + // + // o.bool; + // o['bool']; +-// --- (line: 23) skipped --- +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.[|numRENAME|]; +-// obj[`[|numRENAME|]`]; +-// +-// obj.bool; +-// obj[`bool`]; +- +- +- +-// === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`[|numRENAME|]`]: number; +-// ['bool']: boolean; +-// } +-// +-// let o: Obj = { +-// [`[|numRENAME|]`]: 0, +-// ['bool']: true, +-// }; +-// +-// o = { +-// ['[|numRENAME|]']: 1, +-// [`bool`]: false, +-// }; +-// +-// o.[|numRENAME|]; +-// o['/*RENAME*/[|numRENAME|]']; +-// o["[|numRENAME|]"]; +-// o[`[|numRENAME|]`]; +-// +-// o.bool; +-// o['bool']; +-// --- (line: 23) skipped --- +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.[|numRENAME|]; +-// obj[`[|numRENAME|]`]; +-// +-// obj.bool; +-// obj[`bool`]; +- +- +- +-// === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`[|numRENAME|]`]: number; +-// ['bool']: boolean; +-// } +-// +-// let o: Obj = { +-// [`[|numRENAME|]`]: 0, +-// ['bool']: true, +-// }; +-// +-// o = { +-// ['[|numRENAME|]']: 1, +-// [`bool`]: false, +-// }; +-// +-// o.[|numRENAME|]; +-// o['[|numRENAME|]']; +-// o["/*RENAME*/[|numRENAME|]"]; +-// o[`[|numRENAME|]`]; +-// +-// o.bool; +-// o['bool']; +-// --- (line: 23) skipped --- +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.[|numRENAME|]; +-// obj[`[|numRENAME|]`]; +-// +-// obj.bool; +-// obj[`bool`]; +- +- +- +-// === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`[|numRENAME|]`]: number; +-// ['bool']: boolean; +-// } +-// +-// let o: Obj = { +-// [`[|numRENAME|]`]: 0, +-// ['bool']: true, +-// }; +-// +-// o = { +-// ['[|numRENAME|]']: 1, +-// [`bool`]: false, +-// }; +-// +-// o.[|numRENAME|]; +-// o['[|numRENAME|]']; +-// o["[|numRENAME|]"]; +-// o[`/*RENAME*/[|numRENAME|]`]; +-// +-// o.bool; +-// o['bool']; +-// --- (line: 23) skipped --- +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.[|numRENAME|]; +-// obj[`[|numRENAME|]`]; +-// +-// obj.bool; +-// obj[`bool`]; +- +- +- +-// === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`[|numRENAME|]`]: number; +-// ['bool']: boolean; +-// } +-// +-// let o: Obj = { +-// [`[|numRENAME|]`]: 0, +-// ['bool']: true, +-// }; +-// +-// o = { +-// ['[|numRENAME|]']: 1, +-// [`bool`]: false, +-// }; +-// +-// o.[|numRENAME|]; +-// o['[|numRENAME|]']; +-// o["[|numRENAME|]"]; +-// o[`[|numRENAME|]`]; +-// +-// o.bool; +-// o['bool']; +-// --- (line: 23) skipped --- ++// // --- (line: 23) skipped --- ++ ++// === /b.js === ++// import { o as obj } from './a'; ++// ++// obj.[|numRENAME|]; ++// obj[`[|numRENAME|]`]; ++// ++// obj.bool; ++// obj[`bool`]; ++ ++ ++ ++// === findRenameLocations === ++// === /a.ts === ++// --- (line: 13) skipped --- ++// }; ++// ++// o.num; ++// o['/*RENAME*/num']; ++// o["num"]; ++// o[`num`]; ++// ++// // --- (line: 21) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /a.ts === ++// --- (line: 14) skipped --- ++// ++// o.num; ++// o['num']; ++// o["/*RENAME*/num"]; ++// o[`num`]; ++// ++// o.bool; ++// // --- (line: 22) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /a.ts === ++// --- (line: 15) skipped --- ++// o.num; ++// o['num']; ++// o["num"]; ++// o[`/*RENAME*/num`]; ++// ++// o.bool; ++// o['bool']; ++// // --- (line: 23) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /a.ts === ++// interface Obj { ++// [`[|numRENAME|]`]: number; ++// ['bool']: boolean; ++// } ++// ++// let o: Obj = { ++// [`[|numRENAME|]`]: 0, ++// ['bool']: true, ++// }; ++// ++// o = { ++// ['[|numRENAME|]']: 1, ++// [`bool`]: false, ++// }; ++// ++// o.[|numRENAME|]; ++// o['[|numRENAME|]']; ++// o["[|numRENAME|]"]; ++// o[`[|numRENAME|]`]; ++// ++// o.bool; ++// o['bool']; ++// // --- (line: 23) skipped --- + + // === /b.js === + // import { o as obj } from './a'; +@@= skipped -162, +93 lines =@@ + + + // === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`[|numRENAME|]`]: number; +-// ['bool']: boolean; +-// } +-// +-// let o: Obj = { +-// [`[|numRENAME|]`]: 0, +-// ['bool']: true, +-// }; +-// +-// o = { +-// ['[|numRENAME|]']: 1, +-// [`bool`]: false, +-// }; +-// +-// o.[|numRENAME|]; +-// o['[|numRENAME|]']; +-// o["[|numRENAME|]"]; +-// o[`[|numRENAME|]`]; +-// +-// o.bool; +-// o['bool']; +-// --- (line: 23) skipped --- +- + // === /b.js === + // import { o as obj } from './a'; + // +-// obj.[|numRENAME|]; +-// obj[`/*RENAME*/[|numRENAME|]`]; ++// obj.num; ++// obj[`/*RENAME*/num`]; + // + // obj.bool; + // obj[`bool`]; +@@= skipped -40, +15 lines =@@ + // === /a.ts === + // interface Obj { + // [`num`]: number; +-// ['/*RENAME*/[|boolRENAME|]']: boolean; +-// } +-// +-// let o: Obj = { +-// [`num`]: 0, +-// ['[|boolRENAME|]']: true, +-// }; +-// +-// o = { +-// ['num']: 1, +-// [`[|boolRENAME|]`]: false, +-// }; +-// +-// o.num; +-// o['num']; +-// o["num"]; +-// o[`num`]; +-// +-// o.[|boolRENAME|]; +-// o['[|boolRENAME|]']; +-// o["[|boolRENAME|]"]; +-// o[`[|boolRENAME|]`]; +-// +-// export { o }; +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.num; +-// obj[`num`]; +-// +-// obj.[|boolRENAME|]; +-// obj[`[|boolRENAME|]`]; +- +- +- +-// === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`num`]: number; +-// ['[|boolRENAME|]']: boolean; +-// } +-// +-// let o: Obj = { +-// [`num`]: 0, +-// ['/*RENAME*/[|boolRENAME|]']: true, +-// }; +-// +-// o = { +-// ['num']: 1, +-// [`[|boolRENAME|]`]: false, +-// }; +-// +-// o.num; +-// o['num']; +-// o["num"]; +-// o[`num`]; +-// +-// o.[|boolRENAME|]; +-// o['[|boolRENAME|]']; +-// o["[|boolRENAME|]"]; +-// o[`[|boolRENAME|]`]; +-// +-// export { o }; +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.num; +-// obj[`num`]; +-// +-// obj.[|boolRENAME|]; +-// obj[`[|boolRENAME|]`]; +- +- +- +-// === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`num`]: number; +-// ['[|boolRENAME|]']: boolean; +-// } +-// +-// let o: Obj = { +-// [`num`]: 0, +-// ['[|boolRENAME|]']: true, +-// }; +-// +-// o = { +-// ['num']: 1, +-// [`/*RENAME*/[|boolRENAME|]`]: false, +-// }; +-// +-// o.num; +-// o['num']; +-// o["num"]; +-// o[`num`]; +-// +-// o.[|boolRENAME|]; +-// o['[|boolRENAME|]']; +-// o["[|boolRENAME|]"]; +-// o[`[|boolRENAME|]`]; +-// +-// export { o }; +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.num; +-// obj[`num`]; +-// +-// obj.[|boolRENAME|]; +-// obj[`[|boolRENAME|]`]; ++// ['/*RENAME*/bool']: boolean; ++// } ++// ++// let o: Obj = { ++// // --- (line: 7) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /a.ts === ++// --- (line: 4) skipped --- ++// ++// let o: Obj = { ++// [`num`]: 0, ++// ['/*RENAME*/bool']: true, ++// }; ++// ++// o = { ++// // --- (line: 12) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /a.ts === ++// --- (line: 9) skipped --- ++// ++// o = { ++// ['num']: 1, ++// [`/*RENAME*/bool`]: false, ++// }; ++// ++// o.num; ++// // --- (line: 17) skipped --- + + + +@@= skipped -158, +78 lines =@@ + + // === findRenameLocations === + // === /a.ts === +-// interface Obj { +-// [`num`]: number; +-// ['[|boolRENAME|]']: boolean; +-// } +-// +-// let o: Obj = { +-// [`num`]: 0, +-// ['[|boolRENAME|]']: true, +-// }; +-// +-// o = { +-// ['num']: 1, +-// [`[|boolRENAME|]`]: false, +-// }; +-// +-// o.num; +-// o['num']; +-// o["num"]; +-// o[`num`]; +-// +-// o.[|boolRENAME|]; +-// o['/*RENAME*/[|boolRENAME|]']; +-// o["[|boolRENAME|]"]; +-// o[`[|boolRENAME|]`]; +-// +-// export { o }; +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.num; +-// obj[`num`]; +-// +-// obj.[|boolRENAME|]; +-// obj[`[|boolRENAME|]`]; +- +- +- +-// === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`num`]: number; +-// ['[|boolRENAME|]']: boolean; +-// } +-// +-// let o: Obj = { +-// [`num`]: 0, +-// ['[|boolRENAME|]']: true, +-// }; +-// +-// o = { +-// ['num']: 1, +-// [`[|boolRENAME|]`]: false, +-// }; +-// +-// o.num; +-// o['num']; +-// o["num"]; +-// o[`num`]; +-// +-// o.[|boolRENAME|]; +-// o['[|boolRENAME|]']; +-// o["/*RENAME*/[|boolRENAME|]"]; +-// o[`[|boolRENAME|]`]; +-// +-// export { o }; +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.num; +-// obj[`num`]; +-// +-// obj.[|boolRENAME|]; +-// obj[`[|boolRENAME|]`]; +- +- +- +-// === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`num`]: number; +-// ['[|boolRENAME|]']: boolean; +-// } +-// +-// let o: Obj = { +-// [`num`]: 0, +-// ['[|boolRENAME|]']: true, +-// }; +-// +-// o = { +-// ['num']: 1, +-// [`[|boolRENAME|]`]: false, +-// }; +-// +-// o.num; +-// o['num']; +-// o["num"]; +-// o[`num`]; +-// +-// o.[|boolRENAME|]; +-// o['[|boolRENAME|]']; +-// o["[|boolRENAME|]"]; +-// o[`/*RENAME*/[|boolRENAME|]`]; +-// +-// export { o }; +- +-// === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.num; +-// obj[`num`]; +-// +-// obj.[|boolRENAME|]; +-// obj[`[|boolRENAME|]`]; ++// --- (line: 18) skipped --- ++// o[`num`]; ++// ++// o.bool; ++// o['/*RENAME*/bool']; ++// o["bool"]; ++// o[`bool`]; ++// ++// export { o }; ++ ++ ++ ++// === findRenameLocations === ++// === /a.ts === ++// --- (line: 19) skipped --- ++// ++// o.bool; ++// o['bool']; ++// o["/*RENAME*/bool"]; ++// o[`bool`]; ++// ++// export { o }; ++ ++ ++ ++// === findRenameLocations === ++// === /a.ts === ++// --- (line: 20) skipped --- ++// o.bool; ++// o['bool']; ++// o["bool"]; ++// o[`/*RENAME*/bool`]; ++// ++// export { o }; + + + +@@= skipped -159, +78 lines =@@ + + + // === findRenameLocations === +-// === /a.ts === +-// interface Obj { +-// [`num`]: number; +-// ['[|boolRENAME|]']: boolean; +-// } +-// +-// let o: Obj = { +-// [`num`]: 0, +-// ['[|boolRENAME|]']: true, +-// }; +-// +-// o = { +-// ['num']: 1, +-// [`[|boolRENAME|]`]: false, +-// }; +-// +-// o.num; +-// o['num']; +-// o["num"]; +-// o[`num`]; +-// +-// o.[|boolRENAME|]; +-// o['[|boolRENAME|]']; +-// o["[|boolRENAME|]"]; +-// o[`[|boolRENAME|]`]; +-// +-// export { o }; +- + // === /b.js === +-// import { o as obj } from './a'; +-// +-// obj.num; ++// --- (line: 3) skipped --- + // obj[`num`]; + // +-// obj.[|boolRENAME|]; +-// obj[`/*RENAME*/[|boolRENAME|]`]; ++// obj.bool; ++// obj[`/*RENAME*/bool`]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsDefinePropertyJs.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsDefinePropertyJs.baseline.jsonc new file mode 100644 index 0000000000..0b2c07002b --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsDefinePropertyJs.baseline.jsonc @@ -0,0 +1,70 @@ +// === findRenameLocations === +// === /a.js === +// let obj = {}; +// +// Object.defineProperty(obj, `/*RENAME*/prop`, { value: 0 }); +// +// obj = { +// [`prop`]: 1 +// // --- (line: 7) skipped --- + + + +// === findRenameLocations === +// === /a.js === +// let obj = {}; +// +// Object.defineProperty(obj, `prop`, { value: 0 }); +// +// obj = { +// [`/*RENAME*/prop`]: 1 +// }; +// +// obj.prop; +// // --- (line: 10) skipped --- + + + +// === findRenameLocations === +// === /a.js === +// --- (line: 5) skipped --- +// [`prop`]: 1 +// }; +// +// obj./*RENAME*/prop; +// obj['prop']; +// obj["prop"]; +// obj[`prop`]; + + + +// === findRenameLocations === +// === /a.js === +// --- (line: 6) skipped --- +// }; +// +// obj.prop; +// obj['/*RENAME*/prop']; +// obj["prop"]; +// obj[`prop`]; + + + +// === findRenameLocations === +// === /a.js === +// --- (line: 7) skipped --- +// +// obj.prop; +// obj['prop']; +// obj["/*RENAME*/prop"]; +// obj[`prop`]; + + + +// === findRenameLocations === +// === /a.js === +// --- (line: 8) skipped --- +// obj.prop; +// obj['prop']; +// obj["prop"]; +// obj[`/*RENAME*/prop`]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsDefinePropertyJs.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsDefinePropertyJs.baseline.jsonc.diff new file mode 100644 index 0000000000..631991ae7e --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameTemplateLiteralsDefinePropertyJs.baseline.jsonc.diff @@ -0,0 +1,167 @@ +--- old.renameTemplateLiteralsDefinePropertyJs.baseline.jsonc ++++ new.renameTemplateLiteralsDefinePropertyJs.baseline.jsonc +@@= skipped -1, +1 lines =@@ + // === /a.js === + // let obj = {}; + // +-// Object.defineProperty(obj, `/*RENAME*/[|propRENAME|]`, { value: 0 }); +-// +-// obj = { +-// [`[|propRENAME|]`]: 1 +-// }; +-// +-// obj.[|propRENAME|]; +-// obj['[|propRENAME|]']; +-// obj["[|propRENAME|]"]; +-// obj[`[|propRENAME|]`]; +- +- +- +-// === findRenameLocations === +-// === /a.js === +-// let obj = {}; +-// +-// Object.defineProperty(obj, `[|propRENAME|]`, { value: 0 }); +-// +-// obj = { +-// [`/*RENAME*/[|propRENAME|]`]: 1 +-// }; +-// +-// obj.[|propRENAME|]; +-// obj['[|propRENAME|]']; +-// obj["[|propRENAME|]"]; +-// obj[`[|propRENAME|]`]; +- +- +- +-// === findRenameLocations === +-// === /a.js === +-// let obj = {}; +-// +-// Object.defineProperty(obj, `[|propRENAME|]`, { value: 0 }); +-// +-// obj = { +-// [`[|propRENAME|]`]: 1 +-// }; +-// +-// obj./*RENAME*/[|propRENAME|]; +-// obj['[|propRENAME|]']; +-// obj["[|propRENAME|]"]; +-// obj[`[|propRENAME|]`]; +- +- +- +-// === findRenameLocations === +-// === /a.js === +-// let obj = {}; +-// +-// Object.defineProperty(obj, `[|propRENAME|]`, { value: 0 }); +-// +-// obj = { +-// [`[|propRENAME|]`]: 1 +-// }; +-// +-// obj.[|propRENAME|]; +-// obj['/*RENAME*/[|propRENAME|]']; +-// obj["[|propRENAME|]"]; +-// obj[`[|propRENAME|]`]; +- +- +- +-// === findRenameLocations === +-// === /a.js === +-// let obj = {}; +-// +-// Object.defineProperty(obj, `[|propRENAME|]`, { value: 0 }); +-// +-// obj = { +-// [`[|propRENAME|]`]: 1 +-// }; +-// +-// obj.[|propRENAME|]; +-// obj['[|propRENAME|]']; +-// obj["/*RENAME*/[|propRENAME|]"]; +-// obj[`[|propRENAME|]`]; +- +- +- +-// === findRenameLocations === +-// === /a.js === +-// let obj = {}; +-// +-// Object.defineProperty(obj, `[|propRENAME|]`, { value: 0 }); +-// +-// obj = { +-// [`[|propRENAME|]`]: 1 +-// }; +-// +-// obj.[|propRENAME|]; +-// obj['[|propRENAME|]']; +-// obj["[|propRENAME|]"]; +-// obj[`/*RENAME*/[|propRENAME|]`]; ++// Object.defineProperty(obj, `/*RENAME*/prop`, { value: 0 }); ++// ++// obj = { ++// [`prop`]: 1 ++// // --- (line: 7) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /a.js === ++// let obj = {}; ++// ++// Object.defineProperty(obj, `prop`, { value: 0 }); ++// ++// obj = { ++// [`/*RENAME*/prop`]: 1 ++// }; ++// ++// obj.prop; ++// // --- (line: 10) skipped --- ++ ++ ++ ++// === findRenameLocations === ++// === /a.js === ++// --- (line: 5) skipped --- ++// [`prop`]: 1 ++// }; ++// ++// obj./*RENAME*/prop; ++// obj['prop']; ++// obj["prop"]; ++// obj[`prop`]; ++ ++ ++ ++// === findRenameLocations === ++// === /a.js === ++// --- (line: 6) skipped --- ++// }; ++// ++// obj.prop; ++// obj['/*RENAME*/prop']; ++// obj["prop"]; ++// obj[`prop`]; ++ ++ ++ ++// === findRenameLocations === ++// === /a.js === ++// --- (line: 7) skipped --- ++// ++// obj.prop; ++// obj['prop']; ++// obj["/*RENAME*/prop"]; ++// obj[`prop`]; ++ ++ ++ ++// === findRenameLocations === ++// === /a.js === ++// --- (line: 8) skipped --- ++// obj.prop; ++// obj['prop']; ++// obj["prop"]; ++// obj[`/*RENAME*/prop`]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameThis.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameThis.baseline.jsonc new file mode 100644 index 0000000000..39b62b900f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameThis.baseline.jsonc @@ -0,0 +1,37 @@ +// === findRenameLocations === +// === /renameThis.ts === +// function f(/*RENAME*/[|thisRENAME|]) { +// return [|thisRENAME|]; +// } +// this; +// const _ = { this: 0 }.this; + + + +// === findRenameLocations === +// === /renameThis.ts === +// function f(this) { +// return /*RENAME*/this; +// } +// this; +// const _ = { this: 0 }.this; + + + +// === findRenameLocations === +// === /renameThis.ts === +// function f(this) { +// return this; +// } +// this; +// const _ = { /*RENAME*/[|thisRENAME|]: 0 }.[|thisRENAME|]; + + + +// === findRenameLocations === +// === /renameThis.ts === +// function f(this) { +// return this; +// } +// this; +// const _ = { [|thisRENAME|]: 0 }./*RENAME*/[|thisRENAME|]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameThis.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameThis.baseline.jsonc.diff new file mode 100644 index 0000000000..7c1f424971 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameThis.baseline.jsonc.diff @@ -0,0 +1,13 @@ +--- old.renameThis.baseline.jsonc ++++ new.renameThis.baseline.jsonc +@@= skipped -9, +9 lines =@@ + + // === findRenameLocations === + // === /renameThis.ts === +-// function f([|thisRENAME|]) { +-// return /*RENAME*/[|thisRENAME|]; ++// function f(this) { ++// return /*RENAME*/this; + // } + // this; + // const _ = { this: 0 }.this; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameUMDModuleAlias1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameUMDModuleAlias1.baseline.jsonc new file mode 100644 index 0000000000..2cc30311d9 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameUMDModuleAlias1.baseline.jsonc @@ -0,0 +1,21 @@ +// === findRenameLocations === +// === /0.d.ts === +// export function doThing(): string; +// export function doTheOtherThing(): void; +// export as namespace /*RENAME*/[|myLibRENAME|]; + +// === /1.ts === +// /// +// [|myLibRENAME|].doThing(); + + + +// === findRenameLocations === +// === /0.d.ts === +// export function doThing(): string; +// export function doTheOtherThing(): void; +// export as namespace [|myLibRENAME|]; + +// === /1.ts === +// /// +// /*RENAME*/[|myLibRENAME|].doThing(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename1.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename1.baseline.jsonc new file mode 100644 index 0000000000..09a71e42e1 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename1.baseline.jsonc @@ -0,0 +1,29 @@ +// === findRenameLocations === +// === /file.tsx === +// declare module JSX { +// interface Element { } +// interface IntrinsicElements { +// /*RENAME*/[|divRENAME|]: { +// name?: string; +// isOpen?: boolean; +// }; +// span: { n: string; }; +// } +// } +// var x = <[|divRENAME|] />; + + + +// === findRenameLocations === +// === /file.tsx === +// declare module JSX { +// interface Element { } +// interface IntrinsicElements { +// [|divRENAME|]: { +// name?: string; +// isOpen?: boolean; +// }; +// span: { n: string; }; +// } +// } +// var x = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename2.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename2.baseline.jsonc new file mode 100644 index 0000000000..c9d4b07aa1 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename2.baseline.jsonc @@ -0,0 +1,21 @@ +// === findRenameLocations === +// === /file.tsx === +// declare module JSX { +// interface Element { } +// interface IntrinsicElements { +// div: { +// /*RENAME*/[|nameRENAME|]?: string; +// isOpen?: boolean; +// }; +// span: { n: string; }; +// // --- (line: 9) skipped --- + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 7) skipped --- +// span: { n: string; }; +// } +// } +// var x =
; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename2.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename2.baseline.jsonc.diff new file mode 100644 index 0000000000..b4ca831c75 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename2.baseline.jsonc.diff @@ -0,0 +1,26 @@ +--- old.tsxRename2.baseline.jsonc ++++ new.tsxRename2.baseline.jsonc +@@= skipped -7, +7 lines =@@ + // isOpen?: boolean; + // }; + // span: { n: string; }; +-// } +-// } +-// var x =
; ++// // --- (line: 9) skipped --- + + + + // === findRenameLocations === + // === /file.tsx === +-// declare module JSX { +-// interface Element { } +-// interface IntrinsicElements { +-// div: { +-// [|nameRENAME|]?: string; +-// isOpen?: boolean; +-// }; ++// --- (line: 7) skipped --- + // span: { n: string; }; + // } + // } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename3.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename3.baseline.jsonc new file mode 100644 index 0000000000..a4963b39a6 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename3.baseline.jsonc @@ -0,0 +1,22 @@ +// === findRenameLocations === +// === /file.tsx === +// --- (line: 5) skipped --- +// } +// class MyClass { +// props: { +// /*RENAME*/[|nameRENAME|]?: string; +// size?: number; +// } +// +// +// var x = ; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 10) skipped --- +// } +// +// +// var x = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename3.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename3.baseline.jsonc.diff new file mode 100644 index 0000000000..02c57a3f30 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename3.baseline.jsonc.diff @@ -0,0 +1,23 @@ +--- old.tsxRename3.baseline.jsonc ++++ new.tsxRename3.baseline.jsonc +@@= skipped -8, +8 lines =@@ + // } + // + // +-// var x = ; ++// var x = ; + + + + // === findRenameLocations === + // === /file.tsx === +-// --- (line: 5) skipped --- +-// } +-// class MyClass { +-// props: { +-// [|nameRENAME|]?: string; +-// size?: number; ++// --- (line: 10) skipped --- + // } + // + // \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename5.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename5.baseline.jsonc new file mode 100644 index 0000000000..93acdaddbf --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename5.baseline.jsonc @@ -0,0 +1,19 @@ +// === findRenameLocations === +// === /file.tsx === +// --- (line: 9) skipped --- +// size?: number; +// } +// +// var /*RENAME*/[|nnRENAME|]: string; +// var x = ; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 9) skipped --- +// size?: number; +// } +// +// var [|nnRENAME|]: string; +// var x = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename6.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename6.baseline.jsonc new file mode 100644 index 0000000000..b5319c0e42 --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename6.baseline.jsonc @@ -0,0 +1,87 @@ +// === findRenameLocations === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function /*RENAME*/[|OptRENAME|](attributes: OptionPropBag): JSX.Element; +// let opt = <[|OptRENAME|] />; +// let opt1 = <[|OptRENAME|] propx={100} propString />; +// let opt2 = <[|OptRENAME|] propx={100} optional/>; +// let opt3 = <[|OptRENAME|] wrong />; +// let opt4 = <[|OptRENAME|] propx={100} propString="hi" />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function [|OptRENAME|](attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = <[|OptRENAME|] propx={100} propString />; +// let opt2 = <[|OptRENAME|] propx={100} optional/>; +// let opt3 = <[|OptRENAME|] wrong />; +// let opt4 = <[|OptRENAME|] propx={100} propString="hi" />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function [|OptRENAME|](attributes: OptionPropBag): JSX.Element; +// let opt = <[|OptRENAME|] />; +// let opt1 = ; +// let opt2 = <[|OptRENAME|] propx={100} optional/>; +// let opt3 = <[|OptRENAME|] wrong />; +// let opt4 = <[|OptRENAME|] propx={100} propString="hi" />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function [|OptRENAME|](attributes: OptionPropBag): JSX.Element; +// let opt = <[|OptRENAME|] />; +// let opt1 = <[|OptRENAME|] propx={100} propString />; +// let opt2 = ; +// let opt3 = <[|OptRENAME|] wrong />; +// let opt4 = <[|OptRENAME|] propx={100} propString="hi" />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function [|OptRENAME|](attributes: OptionPropBag): JSX.Element; +// let opt = <[|OptRENAME|] />; +// let opt1 = <[|OptRENAME|] propx={100} propString />; +// let opt2 = <[|OptRENAME|] propx={100} optional/>; +// let opt3 = ; +// let opt4 = <[|OptRENAME|] propx={100} propString="hi" />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 8) skipped --- +// propString: string +// optional?: boolean +// } +// declare function [|OptRENAME|](attributes: OptionPropBag): JSX.Element; +// let opt = <[|OptRENAME|] />; +// let opt1 = <[|OptRENAME|] propx={100} propString />; +// let opt2 = <[|OptRENAME|] propx={100} optional/>; +// let opt3 = <[|OptRENAME|] wrong />; +// let opt4 = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename7.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename7.baseline.jsonc new file mode 100644 index 0000000000..295648425f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename7.baseline.jsonc @@ -0,0 +1,34 @@ +// === findRenameLocations === +// === /file.tsx === +// --- (line: 4) skipped --- +// interface ElementAttributesProperty { props; } +// } +// interface OptionPropBag { +// /*RENAME*/[|propxRENAME|]: number +// propString: string +// optional?: boolean +// } +// // --- (line: 12) skipped --- + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 10) skipped --- +// } +// declare function Opt(attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 11) skipped --- +// declare function Opt(attributes: OptionPropBag): JSX.Element; +// let opt = ; +// let opt1 = ; +// let opt2 = ; +// let opt3 = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename7.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename7.baseline.jsonc.diff new file mode 100644 index 0000000000..7b8a814c5b --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename7.baseline.jsonc.diff @@ -0,0 +1,52 @@ +--- old.tsxRename7.baseline.jsonc ++++ new.tsxRename7.baseline.jsonc +@@= skipped -7, +7 lines =@@ + // propString: string + // optional?: boolean + // } +-// declare function Opt(attributes: OptionPropBag): JSX.Element; +-// let opt = ; +-// let opt1 = ; +-// let opt2 = ; +-// let opt3 = ; ++// // --- (line: 12) skipped --- + + + + // === findRenameLocations === + // === /file.tsx === +-// --- (line: 4) skipped --- +-// interface ElementAttributesProperty { props; } +-// } +-// interface OptionPropBag { +-// [|propxRENAME|]: number +-// propString: string +-// optional?: boolean ++// --- (line: 10) skipped --- + // } + // declare function Opt(attributes: OptionPropBag): JSX.Element; + // let opt = ; + // let opt1 = ; +-// let opt2 = ; ++// let opt2 = ; + // let opt3 = ; + + + + // === findRenameLocations === + // === /file.tsx === +-// --- (line: 4) skipped --- +-// interface ElementAttributesProperty { props; } +-// } +-// interface OptionPropBag { +-// [|propxRENAME|]: number +-// propString: string +-// optional?: boolean +-// } ++// --- (line: 11) skipped --- + // declare function Opt(attributes: OptionPropBag): JSX.Element; + // let opt = ; +-// let opt1 = ; ++// let opt1 = ; + // let opt2 = ; + // let opt3 = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename9.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename9.baseline.jsonc new file mode 100644 index 0000000000..ee06cf2f9f --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename9.baseline.jsonc @@ -0,0 +1,245 @@ +// === findRenameLocations === +// === /file.tsx === +// --- (line: 8) skipped --- +// className?: string; +// } +// interface ButtonProps extends ClickableProps { +// /*RENAME*/[|onClickRENAME|](event?: React.MouseEvent): void; +// } +// interface LinkProps extends ClickableProps { +// goTo: string; +// // --- (line: 16) skipped --- + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 18) skipped --- +// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = ; +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 19) skipped --- +// let opt = ; +// let opt = ; +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 11) skipped --- +// onClick(event?: React.MouseEvent): void; +// } +// interface LinkProps extends ClickableProps { +// /*RENAME*/[|goToRENAME|]: string; +// } +// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +// declare function MainButton(linkProps: LinkProps): JSX.Element; +// // --- (line: 19) skipped --- + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 20) skipped --- +// let opt = ; +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = ; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function /*RENAME*/[|MainButtonRENAME|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButtonRENAME|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButtonRENAME|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButtonRENAME|] />; +// let opt = <[|MainButtonRENAME|] children="chidlren" />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButtonRENAME|] goTo="goTo" />; +// let opt = <[|MainButtonRENAME|] wrong />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButtonRENAME|](buttonProps: ButtonProps): JSX.Element; +// declare function /*RENAME*/[|MainButtonRENAME|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButtonRENAME|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButtonRENAME|] />; +// let opt = <[|MainButtonRENAME|] children="chidlren" />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButtonRENAME|] goTo="goTo" />; +// let opt = <[|MainButtonRENAME|] wrong />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButtonRENAME|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButtonRENAME|](linkProps: LinkProps): JSX.Element; +// declare function /*RENAME*/[|MainButtonRENAME|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButtonRENAME|] />; +// let opt = <[|MainButtonRENAME|] children="chidlren" />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButtonRENAME|] goTo="goTo" />; +// let opt = <[|MainButtonRENAME|] wrong />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButtonRENAME|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButtonRENAME|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButtonRENAME|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = ; +// let opt = <[|MainButtonRENAME|] children="chidlren" />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButtonRENAME|] goTo="goTo" />; +// let opt = <[|MainButtonRENAME|] wrong />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButtonRENAME|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButtonRENAME|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButtonRENAME|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButtonRENAME|] />; +// let opt = ; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButtonRENAME|] goTo="goTo" />; +// let opt = <[|MainButtonRENAME|] wrong />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButtonRENAME|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButtonRENAME|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButtonRENAME|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButtonRENAME|] />; +// let opt = <[|MainButtonRENAME|] children="chidlren" />; +// let opt = {}} />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButtonRENAME|] goTo="goTo" />; +// let opt = <[|MainButtonRENAME|] wrong />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButtonRENAME|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButtonRENAME|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButtonRENAME|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButtonRENAME|] />; +// let opt = <[|MainButtonRENAME|] children="chidlren" />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} />; +// let opt = {}} ignore-prop />; +// let opt = <[|MainButtonRENAME|] goTo="goTo" />; +// let opt = <[|MainButtonRENAME|] wrong />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButtonRENAME|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButtonRENAME|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButtonRENAME|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButtonRENAME|] />; +// let opt = <[|MainButtonRENAME|] children="chidlren" />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} ignore-prop />; +// let opt = ; +// let opt = <[|MainButtonRENAME|] wrong />; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 13) skipped --- +// interface LinkProps extends ClickableProps { +// goTo: string; +// } +// declare function [|MainButtonRENAME|](buttonProps: ButtonProps): JSX.Element; +// declare function [|MainButtonRENAME|](linkProps: LinkProps): JSX.Element; +// declare function [|MainButtonRENAME|](props: ButtonProps | LinkProps): JSX.Element; +// let opt = <[|MainButtonRENAME|] />; +// let opt = <[|MainButtonRENAME|] children="chidlren" />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} />; +// let opt = <[|MainButtonRENAME|] onClick={()=>{}} ignore-prop />; +// let opt = <[|MainButtonRENAME|] goTo="goTo" />; +// let opt = ; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 19) skipped --- +// let opt = ; +// let opt = ; +// let opt = {}} />; +// let opt = {}} /*RENAME*/[|ignore-propRENAME|] />; +// let opt = ; +// let opt = ; + + + +// === findRenameLocations === +// === /file.tsx === +// --- (line: 21) skipped --- +// let opt = {}} />; +// let opt = {}} ignore-prop />; +// let opt = ; +// let opt = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename9.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename9.baseline.jsonc.diff new file mode 100644 index 0000000000..40ae19c4bc --- /dev/null +++ b/testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename9.baseline.jsonc.diff @@ -0,0 +1,98 @@ +--- old.tsxRename9.baseline.jsonc ++++ new.tsxRename9.baseline.jsonc +@@= skipped -7, +7 lines =@@ + // } + // interface LinkProps extends ClickableProps { + // goTo: string; +-// } +-// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +-// declare function MainButton(linkProps: LinkProps): JSX.Element; +-// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +-// let opt = ; +-// let opt = ; +-// let opt = {}} />; +-// let opt = {}} ignore-prop />; +-// let opt = ; +-// let opt = ; ++// // --- (line: 16) skipped --- + + + + // === findRenameLocations === + // === /file.tsx === +-// --- (line: 8) skipped --- +-// className?: string; +-// } +-// interface ButtonProps extends ClickableProps { +-// [|onClickRENAME|](event?: React.MouseEvent): void; +-// } +-// interface LinkProps extends ClickableProps { +-// goTo: string; +-// } +-// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +-// declare function MainButton(linkProps: LinkProps): JSX.Element; ++// --- (line: 18) skipped --- + // declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; + // let opt = ; + // let opt = ; + // let opt = {}} />; +-// let opt = {}} ignore-prop />; ++// let opt = {}} ignore-prop />; + // let opt = ; + // let opt = ; + +@@= skipped -38, +19 lines =@@ + + // === findRenameLocations === + // === /file.tsx === +-// --- (line: 8) skipped --- +-// className?: string; +-// } +-// interface ButtonProps extends ClickableProps { +-// [|onClickRENAME|](event?: React.MouseEvent): void; +-// } +-// interface LinkProps extends ClickableProps { +-// goTo: string; +-// } +-// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +-// declare function MainButton(linkProps: LinkProps): JSX.Element; +-// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; ++// --- (line: 19) skipped --- + // let opt = ; + // let opt = ; +-// let opt = {}} />; ++// let opt = {}} />; + // let opt = {}} ignore-prop />; + // let opt = ; + // let opt = ; +@@= skipped -31, +20 lines =@@ + // } + // declare function MainButton(buttonProps: ButtonProps): JSX.Element; + // declare function MainButton(linkProps: LinkProps): JSX.Element; +-// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +-// let opt = ; +-// let opt = ; +-// let opt = {}} />; +-// let opt = {}} ignore-prop />; +-// let opt = ; +-// let opt = ; ++// // --- (line: 19) skipped --- + + + + // === findRenameLocations === + // === /file.tsx === +-// --- (line: 11) skipped --- +-// onClick(event?: React.MouseEvent): void; +-// } +-// interface LinkProps extends ClickableProps { +-// [|goToRENAME|]: string; +-// } +-// declare function MainButton(buttonProps: ButtonProps): JSX.Element; +-// declare function MainButton(linkProps: LinkProps): JSX.Element; +-// declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +-// let opt = ; ++// --- (line: 20) skipped --- + // let opt = ; + // let opt = {}} />; + // let opt = {}} ignore-prop />; \ No newline at end of file