Coggle requires JavaScript to display documents.
class Point { constructor(x: number, y: string); constructor(s: string); constructor(xs: any, y?: any) {} }
interface A { x: number; y?: number; } class C implements A { x = 0; } const c = new C(); c.y = 10; // 不合法
const object = {counter: 0} function methodC(arg: {counter: 0 | 1}) { return arg.counter; }; methodC(obj as {counter: 0});