Common types for TypeScript
import { Lookup } from '@alloc/types'
import { ElementType } from '@alloc/types/react'
-
Solve<T>
for solving generic types -
Remap<T>
to simplify&
out of an object type -
Pick<T, K>
the same as built-inPick
but wrapped withSolve
-
Overwrite<T, U>
for merging two object types (whereU
takes precedence) -
MergeUnknown<T, U>
for merging two object types (whereT
takes precedence) -
MergeDefaults<T, U>
for makingT
properties optional if they exist inU
-
ElementType<P>
as a workaround for #34237 -
ComponentPropsWithRef<T>
which usesElementType