mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Merge pull request #10928 from Microsoft/addTestFix10625
[Release-2.0] Add tests and baselines
This commit is contained in:
13
tests/cases/compiler/declarationEmitInferedTypeAlias2.ts
Normal file
13
tests/cases/compiler/declarationEmitInferedTypeAlias2.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// @declaration: true
|
||||
// @skipDefaultLibCheck: true
|
||||
|
||||
// @Filename: 0.ts
|
||||
{
|
||||
type Data = string | boolean;
|
||||
let obj: Data = true;
|
||||
}
|
||||
export { }
|
||||
|
||||
// @Filename: 1.ts
|
||||
var x = "hi" || 5;
|
||||
export default x;
|
||||
16
tests/cases/compiler/declarationEmitInferedTypeAlias3.ts
Normal file
16
tests/cases/compiler/declarationEmitInferedTypeAlias3.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// @declaration: true
|
||||
// @skipDefaultLibCheck: true
|
||||
|
||||
// @Filename: 0.ts
|
||||
{
|
||||
type Data = string | boolean;
|
||||
let obj: Data = true;
|
||||
}
|
||||
export { }
|
||||
|
||||
// @Filename: 1.ts
|
||||
let v = "str" || true;
|
||||
function bar () {
|
||||
return v;
|
||||
}
|
||||
export { v, bar }
|
||||
Reference in New Issue
Block a user