Answers for "typescript override interface property"

1

typescript override interface property

type Modify<T, R> = Omit<T, keyof R> & R;

interface OriginalInterface {
  a: string;
  b: boolean;
  c: number;
}

type ModifiedType  = Modify<OriginalInterface , {
  a: number;
  b: number;
}>

// ModifiedType = { a: number; b: number; c: number; }
Posted by: Guest on May-03-2020

Code answers related to "typescript override interface property"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language