Common types for TypeScript
npm install @alloc/typesCommon types for TypeScript
``ts`
import { Lookup } from '@alloc/types'
import { ElementType } from '@alloc/types/react'
- Solve for solving generic types
- Remap to simplify & out of an object type
- Pick the same as built-in Pick but wrapped with Solve
- Overwrite for merging two object types (where U takes precedence)
- MergeUnknown for merging two object types (where T takes precedence)
- MergeDefaults for making T properties optional if they exist in U
- ElementType
as a workaround for #34237
- ComponentPropsWithRef which uses ElementType`