@myparcel/ts-utils
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -66,2 +66,11 @@ /** | ||
/** | ||
* Inverts a map type so that the values become the keys and the keys become the values. | ||
*/ | ||
type ReverseMap<T extends Record<keyof T, keyof any>> = { | ||
[P in T[keyof T]]: { | ||
[K in keyof T]: T[K] extends P ? K : never; | ||
}[keyof T]; | ||
}; | ||
/** | ||
* Returns true if every element in the array satisfies the provided predicate. | ||
@@ -98,2 +107,2 @@ */ | ||
export { ArrayWithOneOrMore, MakeOptional, OneOrMore, PromiseOr, ReadonlyOr, RecursivePartial, RecursiveRequired, Replace, RequireOnly, ResolvePromise, asyncEvery, asyncSome, isEnumValue, isInArray, isOfType, isUndefined, objectIsEqual, partitionArray, removePropertiesWith, toArray }; | ||
export { ArrayWithOneOrMore, MakeOptional, OneOrMore, PromiseOr, ReadonlyOr, RecursivePartial, RecursiveRequired, Replace, RequireOnly, ResolvePromise, ReverseMap, asyncEvery, asyncSome, isEnumValue, isInArray, isOfType, isUndefined, objectIsEqual, partitionArray, removePropertiesWith, toArray }; |
{ | ||
"name": "@myparcel/ts-utils", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "TypeScript utilities", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
12815
266