@waiting/shared-types
Advanced tools
Comparing version 14.1.1 to 14.2.0
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 14.1.0 | ||
* @version 14.1.1 | ||
* @author waiting | ||
@@ -8,0 +8,0 @@ * @license MIT |
@@ -10,2 +10,8 @@ export declare type StrSplit<S extends string, D extends string> = string extends S ? string[] : S extends `${infer T}${D}${infer U}` ? [T, ...StrSplit<U, D>] : [ | ||
export declare type SnakeToPascal<T extends string, D extends string = '_' | '-'> = TupleJoin<FormatCapitalize<StrSplit<T, D>>, ''>; | ||
export declare type RecusiveCamelKeys<T> = { | ||
[K in keyof T as `${SnakeToCamel<K & string>}`]: T[K] extends Record<string, unknown> ? RecusiveCamelKeys<T[K]> : T[K]; | ||
}; | ||
export declare type RecusiveParscalKeys<T> = { | ||
[K in keyof T as `${SnakeToPascal<K & string>}`]: T[K] extends Record<string, unknown> ? RecusiveParscalKeys<T[K]> : T[K]; | ||
}; | ||
export {}; |
{ | ||
"name": "@waiting/shared-types", | ||
"author": "waiting", | ||
"version": "14.1.1", | ||
"version": "14.2.0", | ||
"description": "shared typescript types", | ||
@@ -91,3 +91,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "67d9ae3c4124eba3d14bb41a72d65537315de983" | ||
"gitHead": "a636ce9577ce25eb39548739283ca135826442c7" | ||
} |
@@ -38,1 +38,12 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
export type RecusiveCamelKeys<T> = { | ||
[K in keyof T as `${SnakeToCamel<K & string>}`]: T[K] extends Record<string, unknown> | ||
? RecusiveCamelKeys<T[K]> | ||
: T[K] | ||
} | ||
export type RecusiveParscalKeys<T> = { | ||
[K in keyof T as `${SnakeToPascal<K & string>}`]: T[K] extends Record<string, unknown> | ||
? RecusiveParscalKeys<T[K]> | ||
: T[K] | ||
} | ||
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
36229
1010