你可以在属性名前用readonly来指定只读属性: interface Point { readonly x: number; readonly y: number; }. 你可以通过赋值一个对象字面量来构造 ...
確定! 回上一頁