helpertypes
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -0,1 +1,11 @@ | ||
## [0.0.10](https://github.com/wessberg/helpertypes/compare/v0.0.9...v0.0.10) (2021-09-03) | ||
### Features | ||
* add 'SplitRecord' ([465563b](https://github.com/wessberg/helpertypes/commit/465563bb68fc0f98884417759ef8e30d9d113d29)) | ||
* add 'SplitRecord' ([0a3fce3](https://github.com/wessberg/helpertypes/commit/0a3fce3a6dd0d7946050ff6c90d35d7cbabb1531)) | ||
## [0.0.9](https://github.com/wessberg/helpertypes/compare/v0.0.8...v0.0.9) (2021-09-03) | ||
@@ -2,0 +12,0 @@ |
@@ -73,2 +73,12 @@ /** | ||
/** | ||
* Splits a record into all of its possible property intersections. | ||
* For example, for the record {a: 1; b: 2>}, splitting the record will | ||
* get the type {a: 1} | {b: 2} back. | ||
*/ | ||
export declare type SplitRecord<T, U = T> = Exclude<{ | ||
[Key in keyof T]: { | ||
[K in Key]: K extends keyof U ? T[K] : never; | ||
}; | ||
}[keyof T], undefined>; | ||
/** | ||
* An arbitrary Function that takes any amount of arguments and returns anything | ||
@@ -75,0 +85,0 @@ */ |
{ | ||
"name": "helpertypes", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "A collection of TypeScript helper types", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27688
339