Skip to content

Latest commit

 

History

History

00003-medium-omit

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Omit medium #union #built-in

by Anthony Fu @antfu

Take the Challenge    简体中文 日本語 한국어

Implement the built-in Omit<T, K> generic without using it.

Constructs a type by picking all properties from T and then removing K

For example

interface Todo {
  title: string
  description: string
  completed: boolean
}

type TodoPreview = MyOmit<Todo, 'description' | 'title'>

const todo: TodoPreview = {
  completed: false,
}

Back Share your Solutions Check out Solutions

Related Challenges

4・Pick