Object Properties
Optional
//
interface PaintOptions {
x?: number; // โญ๏ธ optional
y?: number;
}
/*
interface Shape {
paint(opts: PaintOptions = {});
}
*/
const shape = getShape();
shape.paint({ });
shape.paint({ x: 100 });
shape.paint({ y: 100 });
shape.paint({ x: 100, y: 100 });readonly
Index Signatures
Last updated