@waiting/shared-types
Advanced tools
Comparing version 5.3.0 to 5.4.0
@@ -6,2 +6,18 @@ # Change Log | ||
# [5.4.0](https://github.com/waitingsong/shared-types/compare/v5.3.0...v5.4.0) (2020-12-19) | ||
### Bug Fixes | ||
* **types:** TuplePush ([8fcf34e](https://github.com/waitingsong/shared-types/commit/8fcf34e4ea892f80a6848fe9d53f03eb32a605ab)) | ||
### Features | ||
* **types:** update JsonResp<T> ([b145c4d](https://github.com/waitingsong/shared-types/commit/b145c4df1f79f68e11b5198ddaf0e0252a237d50)) | ||
# [5.3.0](https://github.com/waitingsong/shared-types/compare/v5.2.0...v5.3.0) (2020-12-19) | ||
@@ -8,0 +24,0 @@ |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 5.2.0 | ||
* @version 5.3.0 | ||
* @author waiting | ||
@@ -8,0 +8,0 @@ * @license MIT |
@@ -14,10 +14,14 @@ /** Value of key-value pairs object */ | ||
/** Custom response json data structure */ | ||
export interface JsonResp<T = unknown> { | ||
export declare type JsonResp<T = never> = { | ||
/** 0: no error */ | ||
code: number; | ||
/** payload */ | ||
dat?: T; | ||
msg?: string | null; | ||
/** Request id */ | ||
reqId?: string; | ||
} | ||
} & ([T] extends [never] ? { | ||
/** payload */ | ||
dat?: unknown; | ||
} : { | ||
/** payload */ | ||
dat: T; | ||
}); |
@@ -12,5 +12,3 @@ /** Get the first element */ | ||
/** Append element at last */ | ||
export declare type TuplePush<T extends any[], X> = TypeAssert<Overwrite<TupleUnshift<T, any>, T & { | ||
[x: string]: X; | ||
}>, any[]>; | ||
export declare type TuplePush<T extends any[], X> = [...T, X]; | ||
/** Concat two tuples */ | ||
@@ -17,0 +15,0 @@ export declare type TupleConcat<A extends any[], B extends any[]> = { |
{ | ||
"name": "@waiting/shared-types", | ||
"author": "waiting", | ||
"version": "5.3.0", | ||
"version": "5.4.0", | ||
"description": "shared typescript types", | ||
@@ -74,3 +74,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "8df749331e664613878d380bfaaaf1bc53a81a6f" | ||
"gitHead": "f8d0040a53adca7fc7d618a1e1d54be196373d65" | ||
} |
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
33655
634