swc/crates/swc_ecma_parser/tests/tsc/symbolProperty22.ts

8 lines
174 B
TypeScript

//@target: ES6
interface I<T, U> {
[Symbol.unscopables](x: T): U;
}
declare function foo<T, U>(p1: T, p2: I<T, U>): U;
foo("", { [Symbol.unscopables]: s => s.length });