(input: T)
| 1 | export function removeUndefined<T extends Record<string, unknown>>(input: T): Partial<T> { |
| 2 | const result: Partial<T> = {}; |
| 3 | for (const [key, value] of Object.entries(input)) { |
| 4 | if (value !== undefined) { |
| 5 | result[key as keyof T] = value as T[keyof T]; |
| 6 | } |
| 7 | } |
| 8 | return result; |
| 9 | } |
no outgoing calls
no test coverage detected