@wedgekit/types
v1.2.0
Published
A set of utility types for use in TypeScript development
Downloads
132
Maintainers
Keywords
Readme
@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 onOmit
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 wheniconName
is not defined, so both props could be wrapped in anOptionalInGroup
. - UnwrapPromise - Unwraps the type of the contents of a promise.