What do square brackets mean where a field should be in typescript?

前端 未结 3 784
清歌不尽
清歌不尽 2020-12-24 03:27

I came across this line in three.d.ts:

dispatchEvent(event: { type: string; [attachment: string]: any; }): void;

and was wondering what it

3条回答
提交回复
热议问题