API 参考
    正在准备搜索索引...

    类型别名 EnhancedOmit<TRecordOrUnion, KeyUnion>

    EnhancedOmit: string extends keyof TRecordOrUnion
        ? TRecordOrUnion
        : TRecordOrUnion extends any
            ? Pick<TRecordOrUnion, Exclude<keyof TRecordOrUnion, KeyUnion>>
            : never

    TypeScript Omit (Exclude to be specific) does not work for objects with an "any" indexed type, and breaks discriminated unions

    类型参数

    • TRecordOrUnion
    • KeyUnion