WithOptionalsAsNullishOnly<T>: T extends (infer ArrayType)[]
    ? WithOptionalsAsNullishOnly<ArrayType>[]
    : T extends ((...args) => any)
        ? T
        : T extends object
            ? {
                [K in keyof T]-?: WithOptionalsAsNullishOnly<T[K]>
            }
            : Exclude<T, undefined>

Type Parameters

  • T