1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
=== tests/cases/conformance/es6/Symbols/symbolProperty22.ts ===
interface I<T, U> {
>I : I<T, U>
>T : T
>U : U
[Symbol.unscopables](x: T): U;
>Symbol.unscopables : symbol
>Symbol : SymbolConstructor
>unscopables : symbol
>x : T
>T : T
>U : U
}
declare function foo<T, U>(p1: T, p2: I<T, U>): U;
>foo : <T, U>(p1: T, p2: I<T, U>) => U
>T : T
>U : U
>p1 : T
>T : T
>p2 : I<T, U>
>I : I<T, U>
>T : T
>U : U
>U : U
foo("", { [Symbol.unscopables]: s => s.length });
>foo("", { [Symbol.unscopables]: s => s.length }) : number
>foo : <T, U>(p1: T, p2: I<T, U>) => U
>"" : ""
>{ [Symbol.unscopables]: s => s.length } : { [Symbol.unscopables]: (s: string) => number; }
>Symbol.unscopables : symbol
>Symbol : SymbolConstructor
>unscopables : symbol
>s => s.length : (s: string) => number
>s : string
>s.length : number
>s : string
>length : number
|