type-fest 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "type-fest",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "A collection of essential TypeScript types",
5
5
  "license": "(MIT OR CC0-1.0)",
6
6
  "repository": "sindresorhus/type-fest",
package/readme.md CHANGED
@@ -88,6 +88,7 @@ Click the type names for complete docs.
88
88
  *If we decline a type addition, we will make sure to document the better solution here.*
89
89
 
90
90
  - [`Diff` and `Spread`](https://github.com/sindresorhus/type-fest/pull/7) - The PR author didn't provide any real-world use-cases and the PR went stale. If you think this type is useful, provide some real-world use-cases and we might reconsider.
91
+ - [`Dictionary`](https://github.com/sindresorhus/type-fest/issues/33) - You only save a few characters (`Dictionary<number>` vs `Record<string, number>`) from [`Record`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1429-L1434), which is more flexible and well-known. Also, you shouldn't use an object as a dictionary. We have `Map` in JavaScript now.
91
92
 
92
93
 
93
94
  ## Tips
@@ -68,5 +68,5 @@ interface PartialReadonlySetDeep<T> extends ReadonlySet<PartialDeep<T>> {}
68
68
  Same as `PartialDeep`, but accepts only `object`s as inputs. Internal helper for `PartialDeep`.
69
69
  */
70
70
  type PartialObjectDeep<ObjectType extends object> = {
71
- [KeyType in keyof ObjectType]: PartialDeep<ObjectType[KeyType]> | undefined
71
+ [KeyType in keyof ObjectType]?: PartialDeep<ObjectType[KeyType]>
72
72
  };