TypeScript/tests/baselines/reference/symbolType18.types

26 lines
376 B
Plaintext
Raw Normal View History

2015-02-05 21:30:22 +01:00
=== tests/cases/conformance/es6/Symbols/symbolType18.ts ===
interface Foo { prop }
>Foo : Foo
>prop : any
2015-02-05 21:30:22 +01:00
var x: symbol | Foo;
>x : symbol | Foo
>Foo : Foo
2015-02-05 21:30:22 +01:00
x;
>x : symbol | Foo
2015-02-05 21:30:22 +01:00
if (typeof x === "object") {
>typeof x === "object" : boolean
>typeof x : string
>x : symbol | Foo
2015-04-13 21:36:11 +02:00
>"object" : string
2015-02-05 21:30:22 +01:00
x;
>x : Foo
2015-02-05 21:30:22 +01:00
}
else {
x;
>x : symbol | Foo
2015-02-05 21:30:22 +01:00
}