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

Overwrite

Overwrite

@example
type Props = { name: string; age: number; visible: boolean };
  type NewProps = { age: string; other: string };

  // Expect: { name: string; age: string; visible: boolean; }
  type ReplacedProps = Overwrite<Props, NewProps>;
type Overwrite<T extends object, U extends object, I = Diff<T, U> & Intersection<U, T>> = Pick<I, keyof I>;

§Type Parameters

§
T extends object
[src]
§
U extends object
[src]
§
I = Diff<T, U> & Intersection<U, T>
[src]

§Type

§
Pick<I, keyof I>
[src]