Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 301 Bytes

README.md

File metadata and controls

21 lines (15 loc) · 301 Bytes

Omit

A helper to omit by object's props.

Usage

import type {Omit} from 'flown'

type Original = {a: 1, b: 2, c: 3, d: 4};
type Omitted = Omit<Original, ['a', 'b']>; 

// type of Omitted: {c: 3, d: 4, a: void, b: void}

({
  a: undefined,
  b: undefined,
  c: 3,
  d: 4,
}: Omitted);