55 lines
925 B
Text
55 lines
925 B
Text
=== tests/cases/conformance/es6/Symbols/symbolProperty16.ts ===
|
|
class C {
|
|
>C : C
|
|
|
|
private [Symbol.iterator]: { x };
|
|
>Symbol.iterator : symbol
|
|
>Symbol : SymbolConstructor
|
|
>iterator : symbol
|
|
>x : any
|
|
}
|
|
interface I {
|
|
>I : I
|
|
|
|
[Symbol.iterator]: { x };
|
|
>Symbol.iterator : symbol
|
|
>Symbol : SymbolConstructor
|
|
>iterator : symbol
|
|
>x : any
|
|
}
|
|
|
|
declare function foo(i: I): I;
|
|
>foo : { (i: I): I; (a: any): any; }
|
|
>i : I
|
|
>I : I
|
|
>I : I
|
|
|
|
declare function foo(a: any): any;
|
|
>foo : { (i: I): I; (a: any): any; }
|
|
>a : any
|
|
|
|
declare function bar(i: C): C;
|
|
>bar : { (i: C): C; (a: any): any; }
|
|
>i : C
|
|
>C : C
|
|
>C : C
|
|
|
|
declare function bar(a: any): any;
|
|
>bar : { (i: C): C; (a: any): any; }
|
|
>a : any
|
|
|
|
foo(new C);
|
|
>foo(new C) : any
|
|
>foo : { (i: I): I; (a: any): any; }
|
|
>new C : C
|
|
>C : typeof C
|
|
|
|
var i: I;
|
|
>i : I
|
|
>I : I
|
|
|
|
bar(i);
|
|
>bar(i) : any
|
|
>bar : { (i: C): C; (a: any): any; }
|
|
>i : I
|
|
|