Skip to content

Commit 325f4b8

Browse files
Addressed feedback.
1 parent d25fd23 commit 325f4b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/core.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,8 @@ namespace ts {
703703
export function sum<T extends Record<K, number>, K extends string>(array: T[], prop: K): number {
704704
let result = 0;
705705
for (const v of array) {
706-
result += (v[prop] as number);
706+
// Note: we need the following type assertion because of GH #17069
707+
result += v[prop] as number;
707708
}
708709
return result;
709710
}

0 commit comments

Comments
 (0)