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 4.8.0 to 4.8.1

16

CHANGELOG.md

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

## [4.8.1](https://github.com/waitingsong/shared-types/compare/v4.8.0...v4.8.1) (2020-07-16)
### Bug Fixes
* **types:** remove undefined from type Json ([584fb0f](https://github.com/waitingsong/shared-types/commit/584fb0fc391280d88444f960543541fe7031e381))
### Features
* **types:** add type DbAliasCols ([a3a2e5d](https://github.com/waitingsong/shared-types/commit/a3a2e5db003ddac146c9bb785108d912aad4a1f0))
# [4.8.0](https://github.com/waitingsong/shared-types/compare/v4.7.1...v4.8.0) (2020-07-14)

@@ -8,0 +24,0 @@

2

dist/index.cjs.js

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

*
* @version 4.7.1
* @version 4.8.0
* @author waiting

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

/** Value of key-value pairs object */
export declare type PlainJsonValue = boolean | number | string | null | undefined;
export declare type PlainJsonValue = boolean | number | string | null;
/**

@@ -7,7 +7,7 @@ * Typeof JSON object parsed from Response data

*/
export interface JsonType {
[key: string]: PlainJsonValue | PlainJsonValue[] | JsonType | JsonType[];
}
export declare type JsonType = string | number | boolean | null | JsonType[] | {
[property: string]: JsonType;
};
/** Custom response json data structure */
export interface JsonResp<T extends JsonType | PlainJsonValue | PlainJsonValue[] | JsonType[] | any = any> {
export interface JsonResp<T extends JsonType = any> {
/** 0: no error */

@@ -14,0 +14,0 @@ code: number;

@@ -47,2 +47,19 @@ import { OverwriteNeverToUnknown, FormatIntersect } from '../common';

* @example ```ts
* interface {
* tb_user: {
* uid: {
* tbUserUid: "tb_user.uid"
* },
* name: {
* tbUserName: "tb_user.name"
* }
* }
* }
* ```
*/
export declare type DbAliasCols<D extends DbModel = DbModel, DT = void> = {
[tb in keyof D]: tb extends keyof DT ? TableAliasCols<D[tb], DT[tb]> : TableAliasCols<D[tb]>;
};
/**
* @example ```ts
* {

@@ -49,0 +66,0 @@ * uid: {

/* eslint-disable @typescript-eslint/no-explicit-any */
// export type JoinTableWithAlias<
// L extends TableModel,
// LA extends TableAliasCols,
// R extends TableModel,
// RA extends TableAliasCols,
// > =
// // JoinTableUnique<L, R>
// PickAliasByKey<TableModelFromDictAlias<L, LA>, TableModelFromDictAlias<R, RA>, PickDuplicateKeys<L, R>>
// type PickAliasByKey<
// L extends TableAliasCols,
// R extends TableAliasCols,
// K extends keyof L | keyof R,
// > = { [key in K]: L[K] } | { [key in K]: R[K] }

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

* @returns ```ts
* // Assume User and UserDetail both has fields uid and name
* // Assume User and UserDetail both have fields uid and name
* {

@@ -16,0 +16,0 @@ * ctime: string | Date;

{
"name": "@waiting/shared-types",
"author": "waiting",
"version": "4.8.0",
"version": "4.8.1",
"description": "shared typescript types",

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

},
"gitHead": "7976181f89893dde4fea10b54ddd48571d851c66"
"gitHead": "33da5b7e0db14133ea8204fd99a377f54d22d10a"
}
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