Add test to verify #26669 where declaration output is incorrect when declaration flag is not set explicitly in options
This commit is contained in:
parent
02e1a32c1c
commit
38a85cfbf4
14
tests/baselines/reference/declarationEmitWithComposite.js
Normal file
14
tests/baselines/reference/declarationEmitWithComposite.js
Normal 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;
|
|
@ -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))
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
=== /foo/test.ts ===
|
||||
interface Foo {
|
||||
x: number;
|
||||
>x : number
|
||||
}
|
||||
export default Foo;
|
||||
>Foo : Foo
|
||||
|
13
tests/cases/compiler/declarationEmitWithComposite.ts
Normal file
13
tests/cases/compiler/declarationEmitWithComposite.ts
Normal 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;
|
Loading…
Reference in a new issue