Add test to verify #26669 where declaration output is incorrect when declaration flag is not set explicitly in options

This commit is contained in:
Sheetal Nandi 2018-08-29 15:47:52 -07:00
parent 02e1a32c1c
commit 38a85cfbf4
4 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,14 @@
//// [test.ts]
interface Foo {
x: number;
}
export default Foo;
//// [/foo/out/test.js]
"use strict";
exports.__esModule = true;
//// [/foo/out/test.d.ts]
export default Foo;

View file

@ -0,0 +1,10 @@
=== /foo/test.ts ===
interface Foo {
>Foo : Symbol(Foo, Decl(test.ts, 0, 0))
x: number;
>x : Symbol(Foo.x, Decl(test.ts, 0, 15))
}
export default Foo;
>Foo : Symbol(Foo, Decl(test.ts, 0, 0))

View file

@ -0,0 +1,8 @@
=== /foo/test.ts ===
interface Foo {
x: number;
>x : number
}
export default Foo;
>Foo : Foo

View file

@ -0,0 +1,13 @@
// @composite: true
// @fullEmitPaths: true
// @filename: /foo/tsconfig.json
{
"compilerOptions": { "composite": true, "outDir": "out" }
}
// @filename: /foo/test.ts
interface Foo {
x: number;
}
export default Foo;