Type Alias EnumOutputShapeWithKeys<T, Keys>

EnumOutputShapeWithKeys<T, Keys>: {
    [K in keyof T]: Exclude<Keys, K> extends infer Empty extends string
        ? Merge<{
            [K2 in K]: T[K]
        } & {
            [K in Empty]?: never
        } & {
            $kind: K;
        }>
        : never
}[keyof T]

Type Parameters

  • T extends Record<string, unknown>
  • Keys extends string