@types/humps
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -13,10 +13,14 @@ // Type definitions for humps 2.0 | ||
export type Camelized<T> = { | ||
[K in keyof T as SnakeToCamelCase<string & K>]: T[K] extends Array<(infer U)> | ||
export type CamelizedProperty<T> = T extends any | ||
? T extends Array<infer U> | ||
? U extends {} | ||
? Array<Camelized<U>> | ||
: T[K] | ||
: T[K] extends {} | ||
? Camelized<T[K]> | ||
: T[K]; | ||
: T | ||
: T extends {} | ||
? Camelized<T> | ||
: T | ||
: never; | ||
export type Camelized<T> = { | ||
[K in keyof T as SnakeToCamelCase<string & K>]: CamelizedProperty<T[K]>; | ||
}; | ||
@@ -28,10 +32,14 @@ | ||
export type Pascalized<T> = { | ||
[K in keyof T as SnakeToPascalCase<string & K>]: T[K] extends Array<(infer U)> | ||
export type PascalizedProperty<T> = T extends any | ||
? T extends Array<infer U> | ||
? U extends {} | ||
? Array<Pascalized<U>> | ||
: T[K] | ||
: T[K] extends {} | ||
? Pascalized<T[K]> | ||
: T[K]; | ||
: T | ||
: T extends {} | ||
? Pascalized<T> | ||
: T | ||
: never; | ||
export type Pascalized<T> = { | ||
[K in keyof T as SnakeToPascalCase<string & K>]: PascalizedProperty<T[K]>; | ||
}; | ||
@@ -43,10 +51,14 @@ | ||
export type Decamelized<T> = { | ||
[K in keyof T as CamelToSnakeCase<string & K>]: T[K] extends Array<(infer U)> | ||
export type DecamelizedProperty<T> = T extends any | ||
? T extends Array<infer U> | ||
? U extends {} | ||
? Array<Decamelized<U>> | ||
: T[K] | ||
: T[K] extends {} | ||
? Decamelized<T[K]> | ||
: T[K]; | ||
: T | ||
: T extends {} | ||
? Decamelized<T> | ||
: T | ||
: never; | ||
export type Decamelized<T> = { | ||
[K in keyof T as CamelToSnakeCase<string & K>]: DecamelizedProperty<T[K]>; | ||
}; | ||
@@ -58,10 +70,14 @@ | ||
export type Depascalized<T> = { | ||
[K in keyof T as CamelToSnakeCase<string & K>]: T[K] extends Array<(infer U)> | ||
export type DepascalizedProperty<T> = T extends any | ||
? T extends Array<infer U> | ||
? U extends {} | ||
? Array<Decamelized<U>> | ||
: T[K] | ||
: T[K] extends {} | ||
? Decamelized<T[K]> | ||
: T[K]; | ||
: T | ||
: T extends {} | ||
? Decamelized<T> | ||
: T | ||
: never; | ||
export type Depascalized<T> = { | ||
[K in keyof T as CamelToSnakeCase<string & K>]: DepascalizedProperty<T[K]>; | ||
}; | ||
@@ -68,0 +84,0 @@ |
{ | ||
"name": "@types/humps", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "TypeScript definitions for humps", | ||
@@ -28,4 +28,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/humps", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "97bee52dbcdc71e8be66e12aaf9bd94fd8104131d5ed54254ad137e1df122f27", | ||
"typeScriptVersion": "4.0" | ||
"typesPublisherContentHash": "b40bdd8bf3e624ef4d91315a3ee321c2a29f637a259de889e490f843d24583e9", | ||
"typeScriptVersion": "4.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Sun, 10 Jul 2022 18:32:24 GMT | ||
* Last updated: Tue, 27 Jun 2023 08:32:44 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: `humps` |
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
7160
97