25 lines
674 B
Text
25 lines
674 B
Text
=== tests/cases/conformance/es6/Symbols/symbolType17.ts ===
|
|
interface Foo { prop }
|
|
>Foo : Foo, Symbol(Foo,Decl(symbolType17.ts,0,0))
|
|
>prop : any, Symbol(prop,Decl(symbolType17.ts,0,15))
|
|
|
|
var x: symbol | Foo;
|
|
>x : symbol | Foo, Symbol(x,Decl(symbolType17.ts,1,3))
|
|
>Foo : Foo, Symbol(Foo,Decl(symbolType17.ts,0,0))
|
|
|
|
x;
|
|
>x : symbol | Foo, Symbol(x,Decl(symbolType17.ts,1,3))
|
|
|
|
if (typeof x === "symbol") {
|
|
>typeof x === "symbol" : boolean
|
|
>typeof x : string
|
|
>x : symbol | Foo, Symbol(x,Decl(symbolType17.ts,1,3))
|
|
>"symbol" : string
|
|
|
|
x;
|
|
>x : symbol, Symbol(x,Decl(symbolType17.ts,1,3))
|
|
}
|
|
else {
|
|
x;
|
|
>x : Foo, Symbol(x,Decl(symbolType17.ts,1,3))
|
|
}
|