(array: T[], id: string)
| 141 | } |
| 142 | |
| 143 | export function findIndexById<T extends {id: string}>(array: T[], id: string): number { |
| 144 | for (let i = 0; i < array.length; i++) if (array[i]!.id === id) return i |
| 145 | return -1 |
| 146 | } |
| 147 | |
| 148 | export function findItemById<T extends {id: string}>(array: T[], id: string): T | undefined { |
| 149 | for (let i = 0; i < array.length; i++) { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…