2.3.0 • Published 1 year ago

@alloc/types v2.3.0

Weekly downloads
105,763
License
MIT
Repository
-
Last release
1 year ago

@alloc/types

Common types for TypeScript

import { Lookup } from '@alloc/types'
import { ElementType } from '@alloc/types/react'

Basic

  • Solve<T> for solving generic types

  • Remap<T> to simplify & out of an object type

  • Pick<T, K> the same as built-in Pick but wrapped with Solve

  • Overwrite<T, U> for merging two object types (where U takes precedence)

  • MergeUnknown<T, U> for merging two object types (where T takes precedence)

  • MergeDefaults<T, U> for making T properties optional if they exist in U

React

  • ElementType<P> as a workaround for #34237

  • ComponentPropsWithRef<T> which uses ElementType

2.3.0

1 year ago

2.2.3

1 year ago

2.2.1

2 years ago

2.2.2

2 years ago

2.2.0

2 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.3.0

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago