25 lines
356 B
Plaintext
25 lines
356 B
Plaintext
|
=== tests/cases/conformance/es6/Symbols/symbolType18.ts ===
|
||
|
interface Foo { prop }
|
||
|
>Foo : Foo
|
||
|
>prop : any
|
||
|
|
||
|
var x: symbol | Foo;
|
||
|
>x : symbol | Foo
|
||
|
>Foo : Foo
|
||
|
|
||
|
x;
|
||
|
>x : symbol | Foo
|
||
|
|
||
|
if (typeof x === "object") {
|
||
|
>typeof x === "object" : boolean
|
||
|
>typeof x : string
|
||
|
>x : symbol | Foo
|
||
|
|
||
|
x;
|
||
|
>x : Foo
|
||
|
}
|
||
|
else {
|
||
|
x;
|
||
|
>x : symbol | Foo
|
||
|
}
|