From 348735a7555145d60e4d47a0d3be8a436539fa49 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Oct 2019 09:00:29 -0700 Subject: [PATCH] Demo as baseline test instead --- src/testRunner/unittests/tsbuild/demo.ts | 163 ++-------- ...s-not-in-rootDir-at-the-import-location.js | 44 +++ ...ts-the-error-about-it-by-stopping-build.js | 29 ++ ...thing-setup-correctly,-reports-no-error.js | 292 ++++++++++++++++++ 4 files changed, 391 insertions(+), 137 deletions(-) create mode 100644 tests/baselines/reference/tsbuild/demo/initial-build/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js create mode 100644 tests/baselines/reference/tsbuild/demo/initial-build/in-circular-branch-reports-the-error-about-it-by-stopping-build.js create mode 100644 tests/baselines/reference/tsbuild/demo/initial-build/in-master-branch-with-everything-setup-correctly,-reports-no-error.js diff --git a/src/testRunner/unittests/tsbuild/demo.ts b/src/testRunner/unittests/tsbuild/demo.ts index c6055549485..afdf7f5d6bf 100644 --- a/src/testRunner/unittests/tsbuild/demo.ts +++ b/src/testRunner/unittests/tsbuild/demo.ts @@ -9,152 +9,41 @@ namespace ts { projFs = undefined!; // Release the contents }); - function coreOutputs(): string[] { - return [ - "/src/lib/core/utilities.js", - "/src/lib/core/utilities.d.ts", - "/src/lib/core/tsconfig.tsbuildinfo" - ]; - } - - function animalOutputs(): string[] { - return [ - "/src/lib/animals/animal.js", - "/src/lib/animals/animal.d.ts", - "/src/lib/animals/index.js", - "/src/lib/animals/index.d.ts", - "/src/lib/animals/dog.js", - "/src/lib/animals/dog.d.ts", - "/src/lib/animals/tsconfig.tsbuildinfo" - ]; - } - - function zooOutputs(): string[] { - return [ - "/src/lib/zoo/zoo.js", - "/src/lib/zoo/zoo.d.ts", - "/src/lib/zoo/tsconfig.tsbuildinfo" - ]; - } - - interface VerifyBuild { - modifyDiskLayout: (fs: vfs.FileSystem) => void; - expectedExitStatus: ExitStatus; - expectedDiagnostics: (fs: vfs.FileSystem) => fakes.ExpectedDiagnostic[]; - expectedOutputs: readonly string[]; - notExpectedOutputs: readonly string[]; - } - - function verifyBuild({ modifyDiskLayout, expectedExitStatus, expectedDiagnostics, expectedOutputs, notExpectedOutputs }: VerifyBuild) { - const fs = projFs.shadow(); - const host = fakes.SolutionBuilderHost.create(fs); - modifyDiskLayout(fs); - const builder = createSolutionBuilder(host, ["/src/tsconfig.json"], { verbose: true }); - const exitStatus = builder.build(); - assert.equal(exitStatus, expectedExitStatus); - host.assertDiagnosticMessages(...expectedDiagnostics(fs)); - verifyOutputsPresent(fs, expectedOutputs); - verifyOutputsAbsent(fs, notExpectedOutputs); - } - - it("in master branch with everything setup correctly, reports no error", () => { - verifyBuild({ - modifyDiskLayout: noop, - expectedExitStatus: ExitStatus.Success, - expectedDiagnostics: () => [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json", "src/animals/tsconfig.json", "src/zoo/tsconfig.json", "src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/core/tsconfig.json", "src/lib/core/utilities.js"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"], - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/animals/tsconfig.json", "src/lib/animals/animal.js"], - [Diagnostics.Building_project_0, "/src/animals/tsconfig.json"], - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/zoo/tsconfig.json", "src/lib/zoo/zoo.js"], - [Diagnostics.Building_project_0, "/src/zoo/tsconfig.json"] - ], - expectedOutputs: [...coreOutputs(), ...animalOutputs(), ...zooOutputs()], - notExpectedOutputs: emptyArray - }); + verifyTsc({ + scenario: "demo", + subScenario: "in master branch with everything setup correctly, reports no error", + fs: () => projFs, + commandLineArgs: ["--b", "/src/tsconfig.json", "--verbose"] }); - it("in circular branch reports the error about it by stopping build", () => { - verifyBuild({ - modifyDiskLayout: fs => replaceText( - fs, - "/src/core/tsconfig.json", - "}", - `}, + verifyTsc({ + scenario: "demo", + subScenario: "in circular branch reports the error about it by stopping build", + fs: () => projFs, + commandLineArgs: ["--b", "/src/tsconfig.json", "--verbose"], + modifyFs: fs => replaceText( + fs, + "/src/core/tsconfig.json", + "}", + `}, "references": [ { "path": "../zoo" } ]` - ), - expectedExitStatus: ExitStatus.ProjectReferenceCycle_OutputsSkipped, - expectedDiagnostics: () => [ - getExpectedDiagnosticForProjectsInBuild("src/animals/tsconfig.json", "src/zoo/tsconfig.json", "src/core/tsconfig.json", "src/tsconfig.json"), - errorDiagnostic([ - Diagnostics.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0, - [ - "/src/tsconfig.json", - "/src/core/tsconfig.json", - "/src/zoo/tsconfig.json", - "/src/animals/tsconfig.json" - ].join("\r\n") - ]) - ], - expectedOutputs: emptyArray, - notExpectedOutputs: [...coreOutputs(), ...animalOutputs(), ...zooOutputs()] - }); + ) }); - - it("in bad-ref branch reports the error about files not in rootDir at the import location", () => { - verifyBuild({ - modifyDiskLayout: fs => prependText( - fs, - "/src/core/utilities.ts", - `import * as A from '../animals'; + verifyTsc({ + scenario: "demo", + subScenario: "in bad-ref branch reports the error about files not in rootDir at the import location", + fs: () => projFs, + commandLineArgs: ["--b", "/src/tsconfig.json", "--verbose"], + modifyFs: fs => prependText( + fs, + "/src/core/utilities.ts", + `import * as A from '../animals'; ` - ), - expectedExitStatus: ExitStatus.DiagnosticsPresent_OutputsSkipped, - expectedDiagnostics: fs => [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json", "src/animals/tsconfig.json", "src/zoo/tsconfig.json", "src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/core/tsconfig.json", "src/lib/core/utilities.js"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"], - { - message: [Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, "/src/animals/animal.ts", "/src/core"], - location: expectedLocationIndexOf(fs, "/src/animals/index.ts", `'./animal'`), - }, - { - message: [Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, "/src/animals/animal.ts", "/src/core/tsconfig.json"], - location: expectedLocationIndexOf(fs, "/src/animals/index.ts", `'./animal'`), - }, - { - message: [Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, "/src/animals/dog.ts", "/src/core"], - location: expectedLocationIndexOf(fs, "/src/animals/index.ts", `'./dog'`), - }, - { - message: [Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, "/src/animals/dog.ts", "/src/core/tsconfig.json"], - location: expectedLocationIndexOf(fs, "/src/animals/index.ts", `'./dog'`), - }, - { - message: [Diagnostics._0_is_declared_but_its_value_is_never_read, "A"], - location: expectedLocationIndexOf(fs, "/src/core/utilities.ts", `import * as A from '../animals';`), - }, - { - message: [Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, "/src/animals/index.ts", "/src/core"], - location: expectedLocationIndexOf(fs, "/src/core/utilities.ts", `'../animals'`), - }, - { - message: [Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, "/src/animals/index.ts", "/src/core/tsconfig.json"], - location: expectedLocationIndexOf(fs, "/src/core/utilities.ts", `'../animals'`), - }, - [Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors, "src/animals/tsconfig.json", "src/core"], - [Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors, "/src/animals/tsconfig.json", "/src/core"], - [Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built, "src/zoo/tsconfig.json", "src/animals"], - [Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_was_not_built, "/src/zoo/tsconfig.json", "/src/animals"], - ], - expectedOutputs: emptyArray, - notExpectedOutputs: [...coreOutputs(), ...animalOutputs(), ...zooOutputs()] - }); + ) }); }); } diff --git a/tests/baselines/reference/tsbuild/demo/initial-build/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js b/tests/baselines/reference/tsbuild/demo/initial-build/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js new file mode 100644 index 00000000000..e9e0b3d5ee1 --- /dev/null +++ b/tests/baselines/reference/tsbuild/demo/initial-build/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js @@ -0,0 +1,44 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/tsconfig.json --verbose +12:00:00 AM - Projects in this build: + * src/core/tsconfig.json + * src/animals/tsconfig.json + * src/zoo/tsconfig.json + * src/tsconfig.json + +12:00:00 AM - Project 'src/core/tsconfig.json' is out of date because output file 'src/lib/core/utilities.js' does not exist + +12:00:00 AM - Building project '/src/core/tsconfig.json'... + +src/animals/index.ts(1,20): error TS6059: File '/src/animals/animal.ts' is not under 'rootDir' '/src/core'. 'rootDir' is expected to contain all source files. +src/animals/index.ts(1,20): error TS6307: File '/src/animals/animal.ts' is not listed within the file list of project '/src/core/tsconfig.json'. Projects must list all files or use an 'include' pattern. +src/animals/index.ts(4,32): error TS6059: File '/src/animals/dog.ts' is not under 'rootDir' '/src/core'. 'rootDir' is expected to contain all source files. +src/animals/index.ts(4,32): error TS6307: File '/src/animals/dog.ts' is not listed within the file list of project '/src/core/tsconfig.json'. Projects must list all files or use an 'include' pattern. +src/core/utilities.ts(1,1): error TS6133: 'A' is declared but its value is never read. +src/core/utilities.ts(1,20): error TS6059: File '/src/animals/index.ts' is not under 'rootDir' '/src/core'. 'rootDir' is expected to contain all source files. +src/core/utilities.ts(1,20): error TS6307: File '/src/animals/index.ts' is not listed within the file list of project '/src/core/tsconfig.json'. Projects must list all files or use an 'include' pattern. +12:00:00 AM - Project 'src/animals/tsconfig.json' can't be built because its dependency 'src/core' has errors + +12:00:00 AM - Skipping build of project '/src/animals/tsconfig.json' because its dependency '/src/core' has errors + +12:00:00 AM - Project 'src/zoo/tsconfig.json' can't be built because its dependency 'src/animals' was not built + +12:00:00 AM - Skipping build of project '/src/zoo/tsconfig.json' because its dependency '/src/animals' was not built + +exitCode:: 1 + + +//// [/src/core/utilities.ts] +import * as A from '../animals'; + +export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +} + + + diff --git a/tests/baselines/reference/tsbuild/demo/initial-build/in-circular-branch-reports-the-error-about-it-by-stopping-build.js b/tests/baselines/reference/tsbuild/demo/initial-build/in-circular-branch-reports-the-error-about-it-by-stopping-build.js new file mode 100644 index 00000000000..634945d60c0 --- /dev/null +++ b/tests/baselines/reference/tsbuild/demo/initial-build/in-circular-branch-reports-the-error-about-it-by-stopping-build.js @@ -0,0 +1,29 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/tsconfig.json --verbose +12:00:00 AM - Projects in this build: + * src/animals/tsconfig.json + * src/zoo/tsconfig.json + * src/core/tsconfig.json + * src/tsconfig.json + +error TS6202: Project references may not form a circular graph. Cycle detected: /src/tsconfig.json +/src/core/tsconfig.json +/src/zoo/tsconfig.json +/src/animals/tsconfig.json +exitCode:: 4 + + +//// [/src/core/tsconfig.json] +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, + "references": [ + { + "path": "../zoo" + } + ] +} + diff --git a/tests/baselines/reference/tsbuild/demo/initial-build/in-master-branch-with-everything-setup-correctly,-reports-no-error.js b/tests/baselines/reference/tsbuild/demo/initial-build/in-master-branch-with-everything-setup-correctly,-reports-no-error.js new file mode 100644 index 00000000000..aadb541455f --- /dev/null +++ b/tests/baselines/reference/tsbuild/demo/initial-build/in-master-branch-with-everything-setup-correctly,-reports-no-error.js @@ -0,0 +1,292 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/tsconfig.json --verbose +12:00:00 AM - Projects in this build: + * src/core/tsconfig.json + * src/animals/tsconfig.json + * src/zoo/tsconfig.json + * src/tsconfig.json + +12:00:00 AM - Project 'src/core/tsconfig.json' is out of date because output file 'src/lib/core/utilities.js' does not exist + +12:00:00 AM - Building project '/src/core/tsconfig.json'... + +12:00:00 AM - Project 'src/animals/tsconfig.json' is out of date because output file 'src/lib/animals/animal.js' does not exist + +12:00:00 AM - Building project '/src/animals/tsconfig.json'... + +12:00:00 AM - Project 'src/zoo/tsconfig.json' is out of date because output file 'src/lib/zoo/zoo.js' does not exist + +12:00:00 AM - Building project '/src/zoo/tsconfig.json'... + +exitCode:: 0 + + +//// [/src/lib/animals/animal.d.ts] +export declare type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +} + + +//// [/src/lib/animals/animal.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/lib/animals/dog.d.ts] +import Animal from '.'; +export interface Dog extends Animal { + woof(): void; + name: string; +} +export declare function createDog(): Dog; + + +//// [/src/lib/animals/dog.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var utilities_1 = require("../core/utilities"); +function createDog() { + return ({ + size: "medium", + woof: function () { + console.log(this.name + " says \"Woof\"!"); + }, + name: utilities_1.makeRandomName() + }); +} +exports.createDog = createDog; + + +//// [/src/lib/animals/index.d.ts] +import Animal from './animal'; +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog }; + + +//// [/src/lib/animals/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var animal_1 = require("./animal"); +var dog_1 = require("./dog"); +exports.createDog = dog_1.createDog; + + +//// [/src/lib/animals/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };" + }, + "../../animals/animal.ts": { + "version": "-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n", + "signature": "13427676350-export declare type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n" + }, + "../../animals/index.ts": { + "version": "-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n", + "signature": "4477582546-import Animal from './animal';\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n" + }, + "../../core/utilities.ts": { + "version": "-8177343116-export declare function makeRandomName(): string;\r\nexport declare function lastElementOf(arr: T[]): T | undefined;\r\n", + "signature": "-8177343116-export declare function makeRandomName(): string;\r\nexport declare function lastElementOf(arr: T[]): T | undefined;\r\n" + }, + "../../animals/dog.ts": { + "version": "-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n", + "signature": "10854678623-import Animal from '.';\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\nexport declare function createDog(): Dog;\r\n" + } + }, + "options": { + "declaration": true, + "target": 1, + "module": 1, + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + "outDir": "./", + "rootDir": "../../animals", + "configFilePath": "../../animals/tsconfig.json" + }, + "referencedMap": { + "../../animals/dog.ts": [ + "../../animals/index.ts", + "../core/utilities.d.ts" + ], + "../../animals/index.ts": [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ] + }, + "exportedModulesMap": { + "../../animals/dog.ts": [ + "../../animals/index.ts" + ], + "../../animals/index.ts": [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../animals/animal.ts", + "../../animals/dog.ts", + "../../animals/index.ts", + "../../core/utilities.ts" + ] + }, + "version": "FakeTSVersion" +} + +//// [/src/lib/core/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };" + }, + "../../core/utilities.ts": { + "version": "25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n", + "signature": "-8177343116-export declare function makeRandomName(): string;\r\nexport declare function lastElementOf(arr: T[]): T | undefined;\r\n" + } + }, + "options": { + "declaration": true, + "target": 1, + "module": 1, + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + "outDir": "./", + "rootDir": "../../core", + "configFilePath": "../../core/tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../core/utilities.ts" + ] + }, + "version": "FakeTSVersion" +} + +//// [/src/lib/core/utilities.d.ts] +export declare function makeRandomName(): string; +export declare function lastElementOf(arr: T[]): T | undefined; + + +//// [/src/lib/core/utilities.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function makeRandomName() { + return "Bob!?! "; +} +exports.makeRandomName = makeRandomName; +function lastElementOf(arr) { + if (arr.length === 0) + return undefined; + return arr[arr.length - 1]; +} +exports.lastElementOf = lastElementOf; + + +//// [/src/lib/zoo/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };" + }, + "../../animals/animal.ts": { + "version": "13427676350-export declare type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n", + "signature": "13427676350-export declare type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n" + }, + "../../animals/dog.ts": { + "version": "10854678623-import Animal from '.';\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\nexport declare function createDog(): Dog;\r\n", + "signature": "10854678623-import Animal from '.';\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\nexport declare function createDog(): Dog;\r\n" + }, + "../../animals/index.ts": { + "version": "4477582546-import Animal from './animal';\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n", + "signature": "4477582546-import Animal from './animal';\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n" + }, + "../../zoo/zoo.ts": { + "version": "8797123924-import { Dog, createDog } from '../animals/index';\r\n\r\nexport function createZoo(): Array {\r\n return [\r\n createDog()\r\n ];\r\n}\r\n\r\n", + "signature": "-17433436879-import { Dog } from '../animals/index';\r\nexport declare function createZoo(): Array;\r\n" + } + }, + "options": { + "declaration": true, + "target": 1, + "module": 1, + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + "outDir": "./", + "rootDir": "../../zoo", + "configFilePath": "../../zoo/tsconfig.json" + }, + "referencedMap": { + "../../animals/dog.ts": [ + "../animals/index.d.ts" + ], + "../../animals/index.ts": [ + "../animals/animal.d.ts", + "../animals/dog.d.ts" + ], + "../../zoo/zoo.ts": [ + "../animals/index.d.ts" + ] + }, + "exportedModulesMap": { + "../../animals/dog.ts": [ + "../animals/index.d.ts" + ], + "../../animals/index.ts": [ + "../animals/animal.d.ts", + "../animals/dog.d.ts" + ], + "../../zoo/zoo.ts": [ + "../animals/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../animals/animal.ts", + "../../animals/dog.ts", + "../../animals/index.ts", + "../../zoo/zoo.ts" + ] + }, + "version": "FakeTSVersion" +} + +//// [/src/lib/zoo/zoo.d.ts] +import { Dog } from '../animals/index'; +export declare function createZoo(): Array; + + +//// [/src/lib/zoo/zoo.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var index_1 = require("../animals/index"); +function createZoo() { + return [ + index_1.createDog() + ]; +} +exports.createZoo = createZoo; + +