直接看例子: 使用 as 语法: const json = JSON.parse(rawBuffer.toString()); const { ID, Properties } = json as { ID: string; Properties: string }; 使用尖括号语法: const json = JSON.parse(rawBuffer.toString()); const { ID, Properties } = <{ ID: string; Properties: string }>json;