Skip to content

Commit 76fefdd

Browse files
AdityaDaflapurkarAndy
authored and
Andy
committed
Remove type assertion in sum function (microsoft#22670)
1 parent c48662c commit 76fefdd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/compiler/core.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -920,8 +920,7 @@ namespace ts {
920920
export function sum<T extends Record<K, number>, K extends string>(array: ReadonlyArray<T>, prop: K): number {
921921
let result = 0;
922922
for (const v of array) {
923-
// TODO: Remove the following type assertion once the fix for #17069 is merged
924-
result += v[prop] as number;
923+
result += v[prop];
925924
}
926925
return result;
927926
}

0 commit comments

Comments
 (0)