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