//@target: ES6 interface I { [Symbol.toPrimitive]: () => boolean; } class C implements I { [Symbol.toPrimitive]() { return true; } }