Type Alias NestedOmit<T, K>

NestedOmit<T, K>: {
        [P in keyof T as P extends K
            ? never
            : P]: NestedOmit<T[P], K extends `${Exclude<P, symbol>}.${infer R}`
            ? R
            : never>
    } extends infer O
    ? {
        [P in keyof O]: O[P]
    }
    : never

Type Parameters

  • T
  • K extends PropertyKey