File: symbolProperty22.types

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (30 lines) | stat: -rw-r--r-- 861 bytes parent folder | download | duplicates (2)
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