Verify if one or more files are emitting into same output file we provide error

This commit is contained in:
Sheetal Nandi 2015-10-12 12:50:35 -07:00
parent a87dae15a9
commit 6882035dc0
4 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,12 @@
error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it.
!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it.
==== tests/cases/compiler/a.ts (0 errors) ====
class c {
}
==== tests/cases/compiler/a.tsx (0 errors) ====
function foo() {
}

View file

@ -0,0 +1,12 @@
error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it.
!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it.
==== tests/cases/compiler/a.ts (0 errors) ====
export class c {
}
==== tests/cases/compiler/b.ts (0 errors) ====
function foo() {
}

View file

@ -0,0 +1,7 @@
// @filename: a.ts
class c {
}
// @filename: a.tsx
function foo() {
}

View file

@ -0,0 +1,9 @@
// @out: tests/cases/compiler/a.js
// @module: amd
// @filename: a.ts
export class c {
}
// @filename: b.ts
function foo() {
}