@alloc/types
v1.2.3@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
npm i @alloc/[email protected]
Metadata
- Unknown
- Whatever
- Unknown
- released 3/25/2020