我有问题
export const tfModules = (moduleIds: readonly string[], mapping: Map<string, [string, string]>): string[] =>
moduleIds.map(m => mapping.get(m).at(0))
.filter(m => m !== undefined)
.map(m => m!);
得到
error TS2532: Object is possibly 'undefined'.
使用非空断言来表明值不能为空或未定义的最简单方法是什么?