Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@waiting/shared-types

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waiting/shared-types - npm Package Compare versions

Comparing version 5.3.0 to 5.4.0

16

CHANGELOG.md

@@ -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 @@

2

dist/index.cjs.js

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc