diff --git a/tests/baselines/reference/nestedConfigurationsWithFilesEmpty.errors.txt b/tests/baselines/reference/nestedConfigurationsWithFilesEmpty.errors.txt new file mode 100644 index 0000000000000..d7804f0fe6a39 --- /dev/null +++ b/tests/baselines/reference/nestedConfigurationsWithFilesEmpty.errors.txt @@ -0,0 +1,23 @@ +message TS6042: No actionable task. Add 'composite': true, valid 'references', or use 'tsc -b'. + + +!!! message TS6042: No actionable task. Add 'composite': true, valid 'references', or use 'tsc -b'. +==== /parent/tsconfig.json (0 errors) ==== + { + "files": [], + "references": [{ "path": "../child" }] + } + + // @filename: /child/tsconfig.json + { + "compilerOptions": { + "declaration": true, + "declarationDir": "out", + "composite": true + }, + "include": ["index.ts"] + } + + // @filename: /child/index.ts + export const childConst = "I am child!"; + \ No newline at end of file diff --git a/tests/cases/compiler/compositeWithoutReferences.ts b/tests/cases/compiler/compositeWithoutReferences.ts new file mode 100644 index 0000000000000..8d88aa75efa1e --- /dev/null +++ b/tests/cases/compiler/compositeWithoutReferences.ts @@ -0,0 +1,13 @@ +// @filename: /tsconfig.json +{ + "compilerOptions": { + "declaration": true, + "declarationDir": "out", + "composite": true + }, + "files": [] + } + + // @filename: /src/index.ts + export const compositeTest = "Composite test case"; + \ No newline at end of file diff --git a/tests/cases/compiler/nestedConfigurationsWithFilesEmpty.ts b/tests/cases/compiler/nestedConfigurationsWithFilesEmpty.ts new file mode 100644 index 0000000000000..b50a6c9f8dbf3 --- /dev/null +++ b/tests/cases/compiler/nestedConfigurationsWithFilesEmpty.ts @@ -0,0 +1,19 @@ +// @filename: /parent/tsconfig.json +{ + "files": [], + "references": [{ "path": "../child" }] + } + + // @filename: /child/tsconfig.json + { + "compilerOptions": { + "declaration": true, + "declarationDir": "out", + "composite": true + }, + "include": ["index.ts"] + } + + // @filename: /child/index.ts + export const childConst = "I am child!"; + \ No newline at end of file diff --git a/tests/cases/compiler/noEmitBehaviorWithFilesEmpty.ts b/tests/cases/compiler/noEmitBehaviorWithFilesEmpty.ts new file mode 100644 index 0000000000000..a71df104310af --- /dev/null +++ b/tests/cases/compiler/noEmitBehaviorWithFilesEmpty.ts @@ -0,0 +1,12 @@ +// @filename: /tsconfig.json +{ + "compilerOptions": { + "noEmit": true, + "composite": true + }, + "files": [] + } + + // @filename: /src/index.ts + export const noEmitTest = "This shouldn't emit"; + \ No newline at end of file