( obj: T, ...keys: K[] )
| 12 | |
| 13 | // https://stackoverflow.com/questions/53966509/typescript-type-safe-omit-function |
| 14 | export const omit = <T extends object, K extends keyof T>( |
| 15 | obj: T, |
| 16 | ...keys: K[] |
| 17 | ): Omit<T, K> => { |
| 18 | const _ = { ...obj }; |
| 19 | keys.forEach((key) => delete _[key]); |
| 20 | return _; |
| 21 | }; |
no outgoing calls
no test coverage detected