export abstract class XXXX<T = void> {
protected progressDetail: Record<string, number> = {};
protected progressMessage: Record<string, string> | string = '';
protected progressWeight: Record<string, number> = {};
protected get progress(): ProgressArgs {
const { progressDetail: detail, progressMessage: msg, progressWeight: weight } = this; // 这句不太明白是什么语法或者语言特性
// 后续代码可直接访问detail,msg,weight等变量
// 似乎detail等价于this.progressDetail
}
}
请问这种写法:
const { progressDetail: detail, progressMessage: msg, progressWeight: weight } = this;
是JavaScript(或TypeScript)中的什么语言特性或者语法糖?有无MDN的文档介绍?
搜了一圈没有搜到
--
FROM 123.58.117.*