Skip to content

Commit 4d29174

Browse files
josephperrottthePunderWoman
authored andcommitted
refactor: address prototype polution concern with better typing (angular#54286)
Update typing to show that a number is being used as index rather than any random string PR Close angular#54286
1 parent 4287ca8 commit 4d29174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/misc/angular-in-memory-web-api/src/backend-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ export abstract class BackendService {
513513
*/
514514
protected abstract getRequestMethod(req: any): string;
515515

516-
protected indexOf(collection: any[], id: number) {
516+
protected indexOf(collection: any[], id: number): number {
517517
return collection.findIndex((item: any) => item.id === id);
518518
}
519519

0 commit comments

Comments
 (0)