@alloc/types
v2.3.0
Published
Common types for TypeScript
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-inPickbut wrapped withSolveOverwrite<T, U>for merging two object types (whereUtakes precedence)MergeUnknown<T, U>for merging two object types (whereTtakes precedence)MergeDefaults<T, U>for makingTproperties optional if they exist inU
React
ElementType<P>as a workaround for #34237ComponentPropsWithRef<T>which usesElementType
