@waiting/shared-types
Advanced tools
Comparing version 3.4.0 to 3.5.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.5.0](https://github.com/waitingsong/shared-types/compare/v3.4.0...v3.5.0) (2020-03-18) | ||
### Features | ||
* **types:** add `Spread` ([1927800](https://github.com/waitingsong/shared-types/commit/19278009bc9362a4705b3092d64e5d9373009665)) | ||
# [3.4.0](https://github.com/waitingsong/shared-types/compare/v3.3.1...v3.4.0) (2020-03-03) | ||
@@ -8,0 +19,0 @@ |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 3.3.1 | ||
* @version 3.4.0 | ||
* @author waiting | ||
@@ -8,0 +8,0 @@ * @license MIT |
@@ -20,2 +20,12 @@ export declare type Head<Tuple extends any[]> = Tuple extends [infer H, ...any[]] ? H : never; | ||
}[Tuple2 extends [] ? 1 : 0]; | ||
/** | ||
* Union tow types, with optinal excluded keys | ||
* @example `Spread<T, K, 'foo'>` or `Spread<T, K, 'foo' | 'bar'>` | ||
* @see https://github.com/microsoft/TypeScript/pull/13288#issuecomment-412230721 | ||
*/ | ||
export declare type Spread<T1, T2, KeyExcludeOptinal = void> = { | ||
[K in Exclude<keyof T1, KeyExcludeOptinal | keyof T2>]: T1[K]; | ||
} & { | ||
[K in Exclude<keyof T2, KeyExcludeOptinal>]: T2[K]; | ||
}; | ||
export {}; |
{ | ||
"name": "@waiting/shared-types", | ||
"author": "waiting", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"description": "shared typescript types", | ||
@@ -74,3 +74,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "3e1d84f3638ad8ac29d7d2c145987621a3403678" | ||
"gitHead": "a748712c134d9181884e3144234fa356b7175f3a" | ||
} |
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
11213
135