class MyRecord extends Immutable.Record({}) { field?: string; } …typescript不再抱怨,但是您无法在类实例上设置field属性(因为 field api)。
確定! 回上一頁