(
toCheck: T[],
callback: (item: T, toCheck: T[]) => U | undefined,
)
| 161 | } |
| 162 | |
| 163 | export function whileArray<T, U>( |
| 164 | toCheck: T[], |
| 165 | callback: (item: T, toCheck: T[]) => U | undefined, |
| 166 | ): U | undefined { |
| 167 | let index = 0 |
| 168 | let current: T = toCheck[index++]! |
| 169 | while (current) { |
| 170 | const result = callback(current, toCheck) |
| 171 | if (result !== undefined) return result |
| 172 | current = toCheck[index++]! |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | export type ToDyscriminatedUnion< |
| 177 | // eslint-disable-next-line @typescript-eslint/no-empty-object-type |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…