ts-essentials
Advanced tools
+3
-3
@@ -13,6 +13,6 @@ /** Essentials */ | ||
| * Like Dictionary, but ensures type safety of index access. | ||
| * Does not not have a second argument, because using Dictionary<T, 'a' | 'b'> | ||
| * already enforces that all of the keys are present. | ||
| * Note that only using an infinite type (`string` or `number`) as key type makes sense here, | ||
| * because using `Dictionary<T, 'a' | 'b'>` already enforces that all of the keys are present. | ||
| */ | ||
| export declare type SafeDictionary<T> = Dictionary<T | undefined>; | ||
| export declare type SafeDictionary<T, K extends string | number = string> = Dictionary<T | undefined, K>; | ||
| /** Like Partial but recursive */ | ||
@@ -19,0 +19,0 @@ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Map<infer K, infer V> ? Map<DeepPartial<K>, DeepPartial<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepPartial<K>, DeepPartial<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepPartial<K>, DeepPartial<V>> : T extends Set<infer U> ? Set<DeepPartial<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepPartial<U>> : T extends WeakSet<infer U> ? WeakSet<DeepPartial<U>> : T extends Array<infer U> ? T extends IsTuple<T> ? { |
+1
-1
@@ -14,3 +14,3 @@ { | ||
| ], | ||
| "version": "6.0.1", | ||
| "version": "6.0.2", | ||
| "main": "dist/index.js", | ||
@@ -17,0 +17,0 @@ "types": "dist/index.d.ts", |
37841
0.25%