Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 2.22 KB

File metadata and controls

23 lines (16 loc) · 2.22 KB

Omit medium #union #built-in

by Anthony Fu @antfu

Take the Challenge    简体中文 日本語 한국어 Português (BR)

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