Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

OmitByValueExact

OmitByValueExact

@example
type Props = { req: number; reqUndef: number | undefined; opt?: string; };

  // Expect: { reqUndef: number | undefined; opt?: string; }
  type Props = OmitByValueExact<Props, number>;
  // Expect: { req: number; opt?: string }
  type Props = OmitByValueExact<Props, number | undefined>;
type OmitByValueExact<T, ValueType> = Pick<T, [Key in keyof T]-?: [ValueType] extends [T[Key]] ? [T[Key]] extends [ValueType] ? never : Key : Key[keyof T]>;

§Type Parameters

§
ValueType
[src]

§Type

§
Pick<T, [Key in keyof T]-?: [ValueType] extends [T[Key]] ? [T[Key]] extends [ValueType] ? never : Key : Key[keyof T]>
[src]