1

ES2016 用に提案された型付きオブジェクトは、引数の API を制約するために使用できますか?

例えば:

function foo(options){
  // I want to guarantee that `options` has a single string property `bar`.
  // Can typed objects help me with this?
}

ECMA ドキュメント:

これは以前の質問の編集です。

4

0 に答える 0