@alloc/types
v2.3.0
Published
Common types for TypeScript
Downloads
75,462
Readme
@alloc/types
Common types for TypeScript
import { Lookup } from '@alloc/types'
import { ElementType } from '@alloc/types/react'
Basic
Solve<T>
for solving generic typesRemap<T>
to simplify&
out of an object typePick<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
React
ElementType<P>
as a workaround for #34237ComponentPropsWithRef<T>
which usesElementType