@wedgekit/types
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@wedgekit/types

A set of utility types for use in TypeScript development

Types

  • Empty - Sets all properties in a type to be non-permissible. Unlikely to be used outside of OptionalInGroup.
  • MakeOptional<T, K> - Makes all listed property keys (K) into optional types while leaving the rest of the type (T) unaffected. This can be thought of as a selective version of Partial, or as a variation on Omit that makes the listed keys optional instead of removing them.
  • Optional - An alternative way to denote T | undefined for function return types.
  • OptionalInGroup - Require properties in groups with an all-or-nothing strategy. Example usage: a property iconColor is useless when iconName is not defined, so both props could be wrapped in an OptionalInGroup.
  • UnwrapPromise - Unwraps the type of the contents of a promise.

Readme

Keywords

none

Package Sidebar

Install

npm i @wedgekit/types

Weekly Downloads

21

Version

1.2.0

License

MIT

Unpacked Size

2.84 kB

Total Files

5

Last publish

Collaborators

  • asayles-dmsi
  • tprettyman
  • rnimrod
  • jquerijero
  • brent-heavican
  • msuiter
  • rerskine
  • timmy2654
  • jfiller
  • mada1113
  • kolson
  • dreadman3716