1
関数シグネチャ内のオブジェクトパラメータの意味は何ですか?私はこのコードスニペットに出くわしました。私はここで何が起こっているのか分かりません。関数シグネチャ内のオブジェクトパラメータの意味は何ですか?
export const items = (state: any = [], {type, payload}) => {
case (type) {
...
}
};
私は関数シグネチャの{type、payload}を理解していません。
、これはES6仕様の一部ではなくTSに固有のものです。 参照:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment – jthereliable
@jthereliableありがとうございました! – Seamus