diff --git a/internal/compiler/fileloader.go b/internal/compiler/fileloader.go index fbb96adf93..90120fafc8 100644 --- a/internal/compiler/fileloader.go +++ b/internal/compiler/fileloader.go @@ -235,7 +235,14 @@ func (p *fileLoader) addRootTasks(files []string, isLib bool) { for _, fileName := range files { absPath := tspath.GetNormalizedAbsolutePath(fileName, p.opts.Host.GetCurrentDirectory()) if core.Tristate.IsTrue(p.opts.Config.CompilerOptions().AllowNonTsExtensions) || slices.Contains(p.supportedExtensions, tspath.TryGetExtensionFromPath(absPath)) { - p.rootTasks = append(p.rootTasks, &parseTask{normalizedFilePath: absPath, isLib: isLib, root: true}) + p.rootTasks = append( + p.rootTasks, + &parseTask{ + normalizedFilePath: absPath, + isLib: isLib, + root: true, + path: p.toPath(absPath), + }) } } } @@ -249,7 +256,14 @@ func (p *fileLoader) addAutomaticTypeDirectiveTasks() { containingDirectory = p.opts.Host.GetCurrentDirectory() } containingFileName := tspath.CombinePaths(containingDirectory, module.InferredTypesContainingFile) - p.rootTasks = append(p.rootTasks, &parseTask{normalizedFilePath: containingFileName, isLib: false, isForAutomaticTypeDirective: true}) + p.rootTasks = append( + p.rootTasks, + &parseTask{ + normalizedFilePath: containingFileName, + isLib: false, + isForAutomaticTypeDirective: true, + path: p.toPath(containingFileName), + }) } func (p *fileLoader) resolveAutomaticTypeDirectives(containingFileName string) ( @@ -304,12 +318,24 @@ func (p *fileLoader) addProjectReferenceTasks(singleThreaded bool) { } if p.opts.canUseProjectReferenceSource() { for _, fileName := range resolved.FileNames() { - p.rootTasks = append(p.rootTasks, &parseTask{normalizedFilePath: fileName, isLib: false}) + p.rootTasks = append( + p.rootTasks, + &parseTask{ + normalizedFilePath: fileName, + isLib: false, + path: p.toPath(fileName), + }) } } else { for outputDts := range resolved.GetOutputDeclarationFileNames() { if outputDts != "" { - p.rootTasks = append(p.rootTasks, &parseTask{normalizedFilePath: outputDts, isLib: false}) + p.rootTasks = append( + p.rootTasks, + &parseTask{ + normalizedFilePath: outputDts, + isLib: false, + path: p.toPath(outputDts), + }) } } } @@ -405,7 +431,7 @@ func (p *fileLoader) resolveTypeReferenceDirectives(t *parseTask) { increaseDepth: resolved.IsExternalLibraryImport, elideOnDepth: false, isFromExternalLibrary: resolved.IsExternalLibraryImport, - }, false) + }, false, p) } } @@ -496,7 +522,7 @@ func (p *fileLoader) resolveImportsAndModuleAugmentations(t *parseTask) { increaseDepth: resolvedModule.IsExternalLibraryImport, elideOnDepth: isJsFileFromNodeModules, isFromExternalLibrary: resolvedModule.IsExternalLibraryImport, - }, false) + }, false, p) } } diff --git a/internal/compiler/filesparser.go b/internal/compiler/filesparser.go index de3f2994c3..034251a951 100644 --- a/internal/compiler/filesparser.go +++ b/internal/compiler/filesparser.go @@ -47,7 +47,6 @@ func (t *parseTask) Path() tspath.Path { func (t *parseTask) load(loader *fileLoader) { t.loaded = true - t.path = loader.toPath(t.normalizedFilePath) if t.isForAutomaticTypeDirective { t.loadAutomaticTypeDirectives(loader) return @@ -74,7 +73,7 @@ func (t *parseTask) load(loader *fileLoader) { for _, ref := range file.ReferencedFiles { resolvedPath := loader.resolveTripleslashPathReference(ref.FileName, file.FileName()) - t.addSubTask(resolvedPath, false) + t.addSubTask(resolvedPath, false, loader) } compilerOptions := loader.opts.Config.CompilerOptions() @@ -83,7 +82,7 @@ func (t *parseTask) load(loader *fileLoader) { if compilerOptions.NoLib != core.TSTrue { for _, lib := range file.LibReferenceDirectives { if name, ok := tsoptions.GetLibFileName(lib.FileName); ok { - t.addSubTask(resolvedRef{fileName: loader.pathForLibFile(name)}, true) + t.addSubTask(resolvedRef{fileName: loader.pathForLibFile(name)}, true, loader) } } } @@ -94,14 +93,20 @@ func (t *parseTask) load(loader *fileLoader) { func (t *parseTask) redirect(loader *fileLoader, fileName string) { t.isRedirected = true // increaseDepth and elideOnDepth are not copied to redirects, otherwise their depth would be double counted. - t.subTasks = []*parseTask{{normalizedFilePath: tspath.NormalizePath(fileName), isLib: t.isLib, fromExternalLibrary: t.fromExternalLibrary}} + normalizedFilePath := tspath.NormalizePath(fileName) + t.subTasks = []*parseTask{{ + normalizedFilePath: normalizedFilePath, + isLib: t.isLib, + fromExternalLibrary: t.fromExternalLibrary, + path: loader.toPath(normalizedFilePath), + }} } func (t *parseTask) loadAutomaticTypeDirectives(loader *fileLoader) { toParseTypeRefs, typeResolutionsInFile := loader.resolveAutomaticTypeDirectives(t.normalizedFilePath) t.typeResolutionsInFile = typeResolutionsInFile for _, typeResolution := range toParseTypeRefs { - t.addSubTask(typeResolution, false) + t.addSubTask(typeResolution, false, loader) } } @@ -112,7 +117,7 @@ type resolvedRef struct { isFromExternalLibrary bool } -func (t *parseTask) addSubTask(ref resolvedRef, isLib bool) { +func (t *parseTask) addSubTask(ref resolvedRef, isLib bool, loader *fileLoader) { normalizedFilePath := tspath.NormalizePath(ref.fileName) subTask := &parseTask{ normalizedFilePath: normalizedFilePath, @@ -120,13 +125,14 @@ func (t *parseTask) addSubTask(ref resolvedRef, isLib bool) { increaseDepth: ref.increaseDepth, elideOnDepth: ref.elideOnDepth, fromExternalLibrary: ref.isFromExternalLibrary, + path: loader.toPath(normalizedFilePath), } t.subTasks = append(t.subTasks, subTask) } type filesParser struct { wg core.WorkGroup - tasksByFileName collections.SyncMap[string, *queuedParseTask] + tasksByFilePath collections.SyncMap[tspath.Path, *queuedParseTask] maxDepth int } @@ -146,7 +152,7 @@ func (w *filesParser) start(loader *fileLoader, tasks []*parseTask, depth int, i for i, task := range tasks { taskIsFromExternalLibrary := isFromExternalLibrary || task.fromExternalLibrary newTask := &queuedParseTask{task: task, lowestDepth: math.MaxInt} - loadedTask, loaded := w.tasksByFileName.LoadOrStore(task.FileName(), newTask) + loadedTask, loaded := w.tasksByFilePath.LoadOrStore(task.Path(), newTask) task = loadedTask.task if loaded { tasks[i] = task @@ -195,7 +201,7 @@ func (w *filesParser) start(loader *fileLoader, tasks []*parseTask, depth int, i func (w *filesParser) collect(loader *fileLoader, tasks []*parseTask, iterate func(*parseTask)) []tspath.Path { // Mark all tasks we saw as external after the fact. - w.tasksByFileName.Range(func(key string, value *queuedParseTask) bool { + w.tasksByFilePath.Range(func(_ tspath.Path, value *queuedParseTask) bool { if value.fromExternalLibrary { value.task.fromExternalLibrary = true } @@ -216,7 +222,7 @@ func (w *filesParser) collectWorker(loader *fileLoader, tasks []*parseTask, iter w.collectWorker(loader, subTasks, iterate, seen) } iterate(task) - results = append(results, loader.toPath(task.FileName())) + results = append(results, task.Path()) } return results } diff --git a/internal/compiler/projectreferenceparser.go b/internal/compiler/projectreferenceparser.go index 8943b1805d..112871caff 100644 --- a/internal/compiler/projectreferenceparser.go +++ b/internal/compiler/projectreferenceparser.go @@ -39,7 +39,7 @@ func createProjectReferenceParseTasks(projectReferences []string) []*projectRefe type projectReferenceParser struct { loader *fileLoader wg core.WorkGroup - tasksByFileName collections.SyncMap[tspath.Path, *projectReferenceParseTask] + tasksByFilePath collections.SyncMap[tspath.Path, *projectReferenceParseTask] } func (p *projectReferenceParser) parse(tasks []*projectReferenceParseTask) { @@ -52,7 +52,7 @@ func (p *projectReferenceParser) parse(tasks []*projectReferenceParseTask) { func (p *projectReferenceParser) start(tasks []*projectReferenceParseTask) { for i, task := range tasks { path := p.loader.toPath(task.configName) - if loadedTask, loaded := p.tasksByFileName.LoadOrStore(path, task); loaded { + if loadedTask, loaded := p.tasksByFilePath.LoadOrStore(path, task); loaded { // dedup tasks to ensure correct file order, regardless of which task would be started first tasks[i] = loadedTask } else { @@ -65,7 +65,7 @@ func (p *projectReferenceParser) start(tasks []*projectReferenceParseTask) { } func (p *projectReferenceParser) initMapper(tasks []*projectReferenceParseTask) { - totalReferences := p.tasksByFileName.Size() + 1 + totalReferences := p.tasksByFilePath.Size() + 1 p.loader.projectReferenceFileMapper.configToProjectReference = make(map[tspath.Path]*tsoptions.ParsedCommandLine, totalReferences) p.loader.projectReferenceFileMapper.referencesInConfigFile = make(map[tspath.Path][]tspath.Path, totalReferences) p.loader.projectReferenceFileMapper.sourceToOutput = make(map[tspath.Path]*tsoptions.OutputDtsAndProjectReference) diff --git a/internal/execute/testsys_test.go b/internal/execute/testsys_test.go index 67ff726cec..471b077776 100644 --- a/internal/execute/testsys_test.go +++ b/internal/execute/testsys_test.go @@ -50,14 +50,14 @@ interface Symbol { declare const console: { log(msg: any): void; }; `) -func newTestSys(fileOrFolderList FileMap, cwd string) *testSys { +func newTestSys(fileOrFolderList FileMap, cwd string, useCaseSensitiveFileNames bool) *testSys { if cwd == "" { cwd = "/home/src/workspaces/project" } sys := &testSys{ fs: &incrementaltestutil.FsHandlingBuildInfo{ FS: &testFs{ - FS: vfstest.FromMap(fileOrFolderList, true /*useCaseSensitiveFileNames*/), + FS: vfstest.FromMap(fileOrFolderList, useCaseSensitiveFileNames), }, }, defaultLibraryPath: tscLibPath, @@ -185,10 +185,10 @@ func (s *testSys) baselineProgram(baseline *strings.Builder, program *incrementa for _, file := range program.GetProgram().GetSourceFiles() { if diagnostics, ok := testingData.SemanticDiagnosticsPerFile.Load(file.Path()); ok { if oldDiagnostics, ok := testingData.OldProgramSemanticDiagnosticsPerFile.Load(file.Path()); !ok || oldDiagnostics != diagnostics { - baseline.WriteString("*refresh* " + file.FileName() + "\n") + baseline.WriteString("*refresh* " + string(file.Path()) + "\n") } } else { - baseline.WriteString("*not cached* " + file.FileName() + "\n") + baseline.WriteString("*not cached* " + string(file.Path()) + "\n") } } @@ -198,11 +198,11 @@ func (s *testSys) baselineProgram(baseline *strings.Builder, program *incrementa if kind, ok := testingData.UpdatedSignatureKinds[file.Path()]; ok { switch kind { case incremental.SignatureUpdateKindComputedDts: - baseline.WriteString("(computed .d.ts) " + file.FileName() + "\n") + baseline.WriteString("(computed .d.ts) " + string(file.Path()) + "\n") case incremental.SignatureUpdateKindStoredAtEmit: - baseline.WriteString("(stored at emit) " + file.FileName() + "\n") + baseline.WriteString("(stored at emit) " + string(file.Path()) + "\n") case incremental.SignatureUpdateKindUsedVersion: - baseline.WriteString("(used version) " + file.FileName() + "\n") + baseline.WriteString("(used version) " + string(file.Path()) + "\n") } } } diff --git a/internal/execute/tsc_test.go b/internal/execute/tsc_test.go index cc72906eba..4f134aa88c 100644 --- a/internal/execute/tsc_test.go +++ b/internal/execute/tsc_test.go @@ -130,6 +130,54 @@ func TestTscCommandline(t *testing.T) { subScenario: "Parse watch interval option without tsconfig.json", commandLineArgs: []string{"-w", "--watchInterval", "1000"}, }, + { + subScenario: "Compile incremental with case insensitive file names", + commandLineArgs: []string{"-p", "."}, + files: FileMap{ + "/home/project/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "incremental": true + }, + }`), + "/home/project/src/index.ts": stringtestutil.Dedent(` + import type { Foo1 } from 'lib1'; + import type { Foo2 } from 'lib2'; + export const foo1: Foo1 = { foo: "a" }; + export const foo2: Foo2 = { foo: "b" };`), + "/home/node_modules/lib1/index.d.ts": stringtestutil.Dedent(` + import type { Foo } from 'someLib'; + export type { Foo as Foo1 };`), + "/home/node_modules/lib1/package.json": stringtestutil.Dedent(` + { + "name": "lib1" + }`), + "/home/node_modules/lib2/index.d.ts": stringtestutil.Dedent(` + import type { Foo } from 'somelib'; + export type { Foo as Foo2 }; + export declare const foo2: Foo;`), + "/home/node_modules/lib2/package.json": stringtestutil.Dedent(` + { + "name": "lib2" + } + `), + "/home/node_modules/someLib/index.d.ts": stringtestutil.Dedent(` + import type { Str } from 'otherLib'; + export type Foo = { foo: Str; };`), + "/home/node_modules/someLib/package.json": stringtestutil.Dedent(` + { + "name": "somelib" + }`), + "/home/node_modules/otherLib/index.d.ts": stringtestutil.Dedent(` + export type Str = string;`), + "/home/node_modules/otherLib/package.json": stringtestutil.Dedent(` + { + "name": "otherlib" + }`), + }, + cwd: "/home/project", + ignoreCase: true, + }, } for _, testCase := range testCases { diff --git a/internal/execute/tsctestrunner_test.go b/internal/execute/tsctestrunner_test.go index 6599851803..16ea891d08 100644 --- a/internal/execute/tsctestrunner_test.go +++ b/internal/execute/tsctestrunner_test.go @@ -34,6 +34,7 @@ type tscInput struct { files FileMap cwd string edits []*testTscEdit + ignoreCase bool } func (test *tscInput) executeCommand(sys *testSys, baselineBuilder *strings.Builder, commandLineArgs []string) execute.CommandLineResult { @@ -64,7 +65,7 @@ func (test *tscInput) run(t *testing.T, scenario string) { t.Parallel() // initial test tsc compile baselineBuilder := &strings.Builder{} - sys := newTestSys(test.files, test.cwd) + sys := newTestSys(test.files, test.cwd, !test.ignoreCase) fmt.Fprint( baselineBuilder, "currentDirectory::", @@ -101,7 +102,7 @@ func (test *tscInput) run(t *testing.T, scenario string) { }) wg.Queue(func() { // Compute build with all the edits - nonIncrementalSys = newTestSys(test.files, test.cwd) + nonIncrementalSys = newTestSys(test.files, test.cwd, !test.ignoreCase) for i := range index + 1 { if test.edits[i].edit != nil { test.edits[i].edit(nonIncrementalSys) diff --git a/testdata/baselines/reference/tsc/commandLine/Compile-incremental-with-case-insensitive-file-names.js b/testdata/baselines/reference/tsc/commandLine/Compile-incremental-with-case-insensitive-file-names.js new file mode 100644 index 0000000000..c748b3504d --- /dev/null +++ b/testdata/baselines/reference/tsc/commandLine/Compile-incremental-with-case-insensitive-file-names.js @@ -0,0 +1,171 @@ +currentDirectory::/home/project +useCaseSensitiveFileNames::false +Input:: +//// [/home/node_modules/lib1/index.d.ts] *new* +import type { Foo } from 'someLib'; +export type { Foo as Foo1 }; +//// [/home/node_modules/lib1/package.json] *new* +{ + "name": "lib1" +} +//// [/home/node_modules/lib2/index.d.ts] *new* +import type { Foo } from 'somelib'; +export type { Foo as Foo2 }; +export declare const foo2: Foo; +//// [/home/node_modules/lib2/package.json] *new* +{ + "name": "lib2" +} +//// [/home/node_modules/otherLib/index.d.ts] *new* +export type Str = string; +//// [/home/node_modules/otherLib/package.json] *new* +{ + "name": "otherlib" +} +//// [/home/node_modules/someLib/index.d.ts] *new* +import type { Str } from 'otherLib'; +export type Foo = { foo: Str; }; +//// [/home/node_modules/someLib/package.json] *new* + { +"name": "somelib" + } +//// [/home/project/src/index.ts] *new* +import type { Foo1 } from 'lib1'; +import type { Foo2 } from 'lib2'; +export const foo1: Foo1 = { foo: "a" }; +export const foo2: Foo2 = { foo: "b" }; +//// [/home/project/tsconfig.json] *new* + { +"compilerOptions": { + "incremental": true +}, + } + +tsgo -p . +ExitStatus:: Success +Output:: +//// [/home/project/src/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.foo2 = exports.foo1 = void 0; +exports.foo1 = { foo: "a" }; +exports.foo2 = { foo: "b" }; + +//// [/home/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","fileNames":["../src/tslibs/ts/lib/lib.d.ts","../node_modules/otherlib/index.d.ts","../node_modules/somelib/index.d.ts","../node_modules/lib1/index.d.ts","../node_modules/lib2/index.d.ts","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"1fe659ed0634bb57b6dc25e9062f1162-export type Str = string;","12e112ff6e2744bb42d8e0b511e44117-import type { Str } from 'otherLib';\nexport type Foo = { foo: Str; };","b6305455d920a6729c435e6acf45eff6-import type { Foo } from 'someLib';\nexport type { Foo as Foo1 };","a5393e550a9c20a242a120bf6410db48-import type { Foo } from 'somelib';\nexport type { Foo as Foo2 };\nexport declare const foo2: Foo;","42aef197ff5f079223e2c29fb2e77cc5-import type { Foo1 } from 'lib1';\nimport type { Foo2 } from 'lib2';\nexport const foo1: Foo1 = { foo: \"a\" };\nexport const foo2: Foo2 = { foo: \"b\" };"],"fileIdsList":[[3],[2],[4,5]],"referencedMap":[[4,1],[5,1],[3,2],[6,3]]} +//// [/home/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "fileNames": [ + "../src/tslibs/ts/lib/lib.d.ts", + "../node_modules/otherlib/index.d.ts", + "../node_modules/somelib/index.d.ts", + "../node_modules/lib1/index.d.ts", + "../node_modules/lib2/index.d.ts", + "./src/index.ts" + ], + "fileInfos": [ + { + "fileName": "../src/tslibs/ts/lib/lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/otherlib/index.d.ts", + "version": "1fe659ed0634bb57b6dc25e9062f1162-export type Str = string;", + "signature": "1fe659ed0634bb57b6dc25e9062f1162-export type Str = string;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../node_modules/somelib/index.d.ts", + "version": "12e112ff6e2744bb42d8e0b511e44117-import type { Str } from 'otherLib';\nexport type Foo = { foo: Str; };", + "signature": "12e112ff6e2744bb42d8e0b511e44117-import type { Str } from 'otherLib';\nexport type Foo = { foo: Str; };", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../node_modules/lib1/index.d.ts", + "version": "b6305455d920a6729c435e6acf45eff6-import type { Foo } from 'someLib';\nexport type { Foo as Foo1 };", + "signature": "b6305455d920a6729c435e6acf45eff6-import type { Foo } from 'someLib';\nexport type { Foo as Foo1 };", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../node_modules/lib2/index.d.ts", + "version": "a5393e550a9c20a242a120bf6410db48-import type { Foo } from 'somelib';\nexport type { Foo as Foo2 };\nexport declare const foo2: Foo;", + "signature": "a5393e550a9c20a242a120bf6410db48-import type { Foo } from 'somelib';\nexport type { Foo as Foo2 };\nexport declare const foo2: Foo;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./src/index.ts", + "version": "42aef197ff5f079223e2c29fb2e77cc5-import type { Foo1 } from 'lib1';\nimport type { Foo2 } from 'lib2';\nexport const foo1: Foo1 = { foo: \"a\" };\nexport const foo2: Foo2 = { foo: \"b\" };", + "signature": "42aef197ff5f079223e2c29fb2e77cc5-import type { Foo1 } from 'lib1';\nimport type { Foo2 } from 'lib2';\nexport const foo1: Foo1 = { foo: \"a\" };\nexport const foo2: Foo2 = { foo: \"b\" };", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../node_modules/somelib/index.d.ts" + ], + [ + "../node_modules/otherlib/index.d.ts" + ], + [ + "../node_modules/lib1/index.d.ts", + "../node_modules/lib2/index.d.ts" + ] + ], + "referencedMap": { + "../node_modules/lib1/index.d.ts": [ + "../node_modules/somelib/index.d.ts" + ], + "../node_modules/lib2/index.d.ts": [ + "../node_modules/somelib/index.d.ts" + ], + "../node_modules/somelib/index.d.ts": [ + "../node_modules/otherlib/index.d.ts" + ], + "./src/index.ts": [ + "../node_modules/lib1/index.d.ts", + "../node_modules/lib2/index.d.ts" + ] + }, + "size": 1681 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +SemanticDiagnostics:: +*refresh* /home/src/tslibs/ts/lib/lib.d.ts +*refresh* /home/node_modules/otherlib/index.d.ts +*refresh* /home/node_modules/somelib/index.d.ts +*refresh* /home/node_modules/lib1/index.d.ts +*refresh* /home/node_modules/lib2/index.d.ts +*refresh* /home/project/src/index.ts +Signatures::