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

10 lines
210 B
TypeScript

//@target: ES6
interface I {
[Symbol.iterator]: (s: string) => string;
[Symbol.toStringTag](s: number): number;
}
var i: I = {
[Symbol.iterator]: s => s,
[Symbol.toStringTag](n) { return n; }
}