Skip to content

Latest commit

 

History

History

Omit

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

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);