kmore-types
Advanced tools
Comparing version 49.0.0 to 50.0.0
@@ -13,3 +13,3 @@ import type { SnakeToCamel, SnakeToPascal } from '@waiting/shared-types'; | ||
*/ | ||
export declare type DictTables<D> = { | ||
export type DictTables<D> = { | ||
[TbName in keyof D]: TbName & string; | ||
@@ -29,3 +29,3 @@ }; | ||
*/ | ||
export declare type DictColumns<D> = { | ||
export type DictColumns<D> = { | ||
[TbName in keyof D]: Columns<D[TbName]>; | ||
@@ -46,3 +46,3 @@ }; | ||
*/ | ||
export declare type DictScoped<D> = { | ||
export type DictScoped<D> = { | ||
[TbName in keyof D]: ScopedColumns<D[TbName], TbName & string>; | ||
@@ -62,9 +62,9 @@ }; | ||
*/ | ||
export declare type DictAlias<D> = { | ||
export type DictAlias<D> = { | ||
[TbName in keyof D]: AliasColumns<D[TbName], TbName & string>; | ||
}; | ||
export declare type DictCamelAlias<D> = { | ||
export type DictCamelAlias<D> = { | ||
[TbName in keyof D]: CamelAliasColumns<D[TbName], TbName & string>; | ||
}; | ||
export declare type Columns<T> = { | ||
export type Columns<T> = { | ||
[F in keyof T]: F; | ||
@@ -80,3 +80,3 @@ }; | ||
*/ | ||
export declare type ScopedColumns<T, K extends string> = { | ||
export type ScopedColumns<T, K extends string> = { | ||
[F in keyof T]: `${K}.${F & string}`; | ||
@@ -92,3 +92,3 @@ }; | ||
*/ | ||
export declare type AliasColumns<T, K extends string> = { | ||
export type AliasColumns<T, K extends string> = { | ||
[F in keyof T]: Record<`${SnakeToCamel<K>}${SnakeToPascal<F & string>}`, `${K}.${F & string}`>; | ||
@@ -104,12 +104,12 @@ }; | ||
*/ | ||
export declare type CamelAliasColumns<T, K extends string> = { | ||
export type CamelAliasColumns<T, K extends string> = { | ||
[F in keyof T]: Record<`${SnakeToCamel<F & string>}`, `${K}.${F & string}`>; | ||
}; | ||
export declare type TableAlias = string; | ||
export declare type TableColAlias = string; | ||
export declare type TableName = string; | ||
export declare type FieldName = string; | ||
export declare type FilePath = string; | ||
export declare type FileName = string; | ||
export declare type CallerFuncNameSet = Set<CallerFuncName>; | ||
export type TableAlias = string; | ||
export type TableColAlias = string; | ||
export type TableName = string; | ||
export type FieldName = string; | ||
export type FilePath = string; | ||
export type FileName = string; | ||
export type CallerFuncNameSet = Set<CallerFuncName>; | ||
/** | ||
@@ -119,3 +119,3 @@ * Name of the function | ||
*/ | ||
export declare type CallerFuncName = string; | ||
export type CallerFuncName = string; | ||
/** | ||
@@ -139,3 +139,3 @@ * Build tables columns type | ||
*/ | ||
export declare type DbDictType<D> = { | ||
export type DbDictType<D> = { | ||
[TbName in keyof D]: TableFieldsType<D, TbName>; | ||
@@ -156,3 +156,3 @@ }; | ||
*/ | ||
export declare type TableFieldsType<D, K extends keyof D> = ColumnsType<D[K]> & ScopedColumnsType<D[K], K & string> & AliasColumnsType<D[K], K & string>; | ||
export type TableFieldsType<D, K extends keyof D> = ColumnsType<D[K]> & ScopedColumnsType<D[K], K & string> & AliasColumnsType<D[K], K & string>; | ||
/** | ||
@@ -167,3 +167,3 @@ * Build table columns type | ||
*/ | ||
export declare type ColumnsType<T> = { | ||
export type ColumnsType<T> = { | ||
[F in keyof T]: T[F]; | ||
@@ -180,3 +180,3 @@ }; | ||
*/ | ||
export declare type ScopedColumnsType<T, K extends string> = { | ||
export type ScopedColumnsType<T, K extends string> = { | ||
[F in keyof T as `${K}.${F & string}`]: T[F]; | ||
@@ -193,5 +193,5 @@ }; | ||
*/ | ||
export declare type AliasColumnsType<T, K extends string> = { | ||
export type AliasColumnsType<T, K extends string> = { | ||
[F in keyof T as `${SnakeToCamel<K>}${SnakeToPascal<F & string>}`]: T[F]; | ||
}; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "kmore-types", | ||
"author": "waiting", | ||
"version": "49.0.0", | ||
"version": "50.0.0", | ||
"description": "Retrieve types info from ts file", | ||
@@ -69,3 +69,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "ec2a9acdbea2f624f7643520a2529a815b751a02" | ||
"gitHead": "be013fb26526d9cf2984e6051faf6a270bfa5165" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
21111