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
|
=== tests/cases/conformance/es6/Symbols/symbolProperty22.ts ===
interface I<T, U> {
[Symbol.unscopables](x: T): U;
>[Symbol.unscopables] : (x: T) => U
>Symbol.unscopables : symbol
>Symbol : SymbolConstructor
>unscopables : symbol
>x : T
}
declare function foo<T, U>(p1: T, p2: I<T, U>): U;
>foo : <T, U>(p1: T, p2: I<T, U>) => U
>p1 : T
>p2 : I<T, 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] : (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
|