-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yui T
committed
Sep 14, 2016
1 parent
332b316
commit ced8cf8
Showing
6 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
tests/baselines/reference/declarationEmitInferedTypeAlias1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//// [tests/cases/compiler/declarationEmitInferedTypeAlias1.ts] //// | ||
|
||
//// [0.ts] | ||
|
||
{ | ||
type Data = string | boolean; | ||
let obj: Data = true; | ||
} | ||
export { } | ||
|
||
//// [1.ts] | ||
let v = "str" || true; | ||
export { v } | ||
|
||
//// [0.js] | ||
"use strict"; | ||
{ | ||
var obj = true; | ||
} | ||
//// [1.js] | ||
"use strict"; | ||
var v = "str" || true; | ||
exports.v = v; | ||
|
||
|
||
//// [0.d.ts] | ||
export { }; | ||
//// [1.d.ts] | ||
declare let v: string | boolean; | ||
export { v }; |
19 changes: 19 additions & 0 deletions
19
tests/baselines/reference/declarationEmitInferedTypeAlias1.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
=== tests/cases/compiler/0.ts === | ||
|
||
{ | ||
type Data = string | boolean; | ||
>Data : Symbol(Data, Decl(0.ts, 1, 1)) | ||
|
||
let obj: Data = true; | ||
>obj : Symbol(obj, Decl(0.ts, 3, 7)) | ||
>Data : Symbol(Data, Decl(0.ts, 1, 1)) | ||
} | ||
export { } | ||
|
||
=== tests/cases/compiler/1.ts === | ||
let v = "str" || true; | ||
>v : Symbol(v, Decl(1.ts, 0, 3)) | ||
|
||
export { v } | ||
>v : Symbol(v, Decl(1.ts, 1, 8)) | ||
|
23 changes: 23 additions & 0 deletions
23
tests/baselines/reference/declarationEmitInferedTypeAlias1.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
=== tests/cases/compiler/0.ts === | ||
|
||
{ | ||
type Data = string | boolean; | ||
>Data : Data | ||
|
||
let obj: Data = true; | ||
>obj : Data | ||
>Data : Data | ||
>true : true | ||
} | ||
export { } | ||
|
||
=== tests/cases/compiler/1.ts === | ||
let v = "str" || true; | ||
>v : Data | ||
>"str" || true : Data | ||
>"str" : string | ||
>true : boolean | ||
|
||
export { v } | ||
>v : Data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// @declaration: true | ||
// @skipDefaultLibCheck: true | ||
|
||
// @Filename: 0.ts | ||
{ | ||
type Data = string | boolean; | ||
let obj: Data = true; | ||
} | ||
export { } | ||
|
||
// @Filename: 1.ts | ||
let v = "str" || true; | ||
export { v } |