Package Exports
- @alloc/types
- @alloc/types/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@alloc/types) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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