1.2.0 • Published 2 years ago

@wedgekit/types v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@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.
1.2.0

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago