1
以下工作:允許對象文本,防止串
class Foo {
public bar(param: {}): void {
}
}
let foo: Foo = new Foo();
foo.bar(""); // Ok
foo.bar({test: ""}); // Also Ok
是否有可能改變bar
方法簽名,以便:
foo.bar({somePropertyWhichIdontKnowTheName: ""}); // Would be ok
foo.bar(""); // Not Ok