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.4.0 to 5.5.0

dist/lib/template-literal.d.ts

18

CHANGELOG.md

@@ -6,2 +6,20 @@ # Change Log

# [5.5.0](https://github.com/waitingsong/shared-types/compare/v5.4.0...v5.5.0) (2020-12-19)
### Features
* **types:** add 2nd param of FormatIntersect ([912b7dd](https://github.com/waitingsong/shared-types/commit/912b7ddd53bf06894c2fed9e4b4422c5cb9f43ca))
* **types:** add template-literal.ts ([e513ad0](https://github.com/waitingsong/shared-types/commit/e513ad097b399f99772db1b459ac1883065a6f3a))
* **types:** add type TupleToUnion ([48b4b81](https://github.com/waitingsong/shared-types/commit/48b4b815f5e95588e1c9844efc5d94e9033f720f))
### Performance Improvements
* **types:** update JoinTableDistinct ([48407bf](https://github.com/waitingsong/shared-types/commit/48407bf35a054453bace1806a4b6d59fd8c3644d))
# [5.4.0](https://github.com/waitingsong/shared-types/compare/v5.3.0...v5.4.0) (2020-12-19)

@@ -8,0 +26,0 @@

2

dist/index.cjs.js

@@ -5,3 +5,3 @@ /**

*
* @version 5.3.0
* @version 5.4.0
* @author waiting

@@ -8,0 +8,0 @@ * @license MIT

@@ -93,5 +93,5 @@ /**

*/
export declare type FormatIntersect<T> = T extends Record<string | number, any> ? T extends any[] | Function | Date ? T : {
[K in keyof T]: FormatIntersect<T[K]>;
export declare type FormatIntersect<T, deep extends boolean = true> = T extends Record<string | number, any> ? T extends any[] | Function | Date ? T : {
[K in keyof T]: deep extends true ? FormatIntersect<T[K], true> : T[K];
} : T;
export {};

@@ -101,3 +101,3 @@ import { OverwriteNeverToUnknown, FormatIntersect } from '../common';

*/
export declare type JoinTableDistinct<L extends TableModel, R extends TableModel, KeyExcludeOptional extends keyof L | keyof R | void = void> = JoinTable<L, R, KeyExcludeOptional | (keyof L & keyof R)>;
export declare type JoinTableDistinct<L extends TableModel, R extends TableModel, KeyExcludeOptional extends keyof L | keyof R | void = void> = Omit<L & R, KeyExcludeOptional extends void ? (keyof L & keyof R) : KeyExcludeOptional | (keyof L & keyof R)>;
/**

@@ -104,0 +104,0 @@ * @example ```ts

@@ -7,3 +7,4 @@ export * from './alias';

export * from './tuple';
export * from './template-literal';
export * from './database/common';
export * from './database/join';

@@ -7,3 +7,4 @@ export * from './alias';

export * from './tuple';
export * from './template-literal';
export * from './database/common';
export * from './database/join';
/** Get the first element */
export declare type TupleHead<T extends any[]> = T[0];
export declare type TupleHead<T extends unknown[]> = T[0];
/** Remove the first element */
export declare type TupleTail<T extends any[]> = ((...t: T) => void) extends (x: any, ...t: infer R) => void ? R : never;
export declare type TupleTail<T extends unknown[]> = T extends [] ? [] : T extends [unknown] ? [] : T extends [unknown, ...infer U] ? U : unknown[];
/** Get the last element */

@@ -10,10 +10,7 @@ export declare type TupleLast<T extends any[]> = T[TupleTail<T>['length']];

/** Insert element at first */
export declare type TupleUnshift<T extends any[], X> = ((x: X, ...t: T) => void) extends (...t: infer R) => void ? R : never;
export declare type TupleUnshift<T extends unknown[], X> = [X, ...T];
/** Append element at last */
export declare type TuplePush<T extends any[], X> = [...T, X];
/** Concat two tuples */
export declare type TupleConcat<A extends any[], B extends any[]> = {
1: A;
0: TupleConcat<TuplePush<A, B[0]>, TupleTail<B>>;
}[B extends [] ? 1 : 0];
export declare type TupleConcat<A extends unknown[], B extends unknown[]> = [...A, ...B];
export declare type TypeAssert<T, A> = T extends A ? T : never;

@@ -32,1 +29,2 @@ export declare type Overwrite<T, S extends any> = {

export declare type isInLiteralTuple<T extends (string | number | symbol)[], K extends string | number | symbol> = Extract<T[number], K> extends never ? false : true;
export declare type TupleToUnion<T extends unknown[]> = T[number];
{
"name": "@waiting/shared-types",
"author": "waiting",
"version": "5.4.0",
"version": "5.5.0",
"description": "shared typescript types",

@@ -74,3 +74,3 @@ "keywords": [

},
"gitHead": "f8d0040a53adca7fc7d618a1e1d54be196373d65"
"gitHead": "8ee4b4d66e89ab9cdc113cd421c734a72afb4a49"
}
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