@kubb/types
Advanced tools
Comparing version 2.0.0-beta.2 to 2.0.0-beta.3
@@ -10,6 +10,7 @@ type Prettify<T> = { | ||
type ObjValueTuple<T, KS extends any[] = TuplifyUnion<keyof T>, R extends any[] = []> = KS extends [infer K, ...infer KT] ? ObjValueTuple<T, KT, [...R, [name: K & keyof T, options: T[K & keyof T]]]> : R; | ||
type TupleToUnion<T> = T extends Array<infer ITEMS> ? ITEMS : never; | ||
type TupleToUnion<T> = T extends any[] ? T[number] : never; | ||
type ArrayWithLength<T extends number, U extends any[] = []> = U['length'] extends T ? U : ArrayWithLength<T, [true, ...U]>; | ||
type GreaterThan<T extends number, U extends number> = ArrayWithLength<U> extends [...ArrayWithLength<T>, ...infer _] ? false : true; | ||
type SplitByDelimiter<T extends string, D extends string> = T extends `${infer P}${D}${infer Q}` ? [P, ...SplitByDelimiter<Q, D>] : [T]; | ||
export type { GreaterThan, ObjValueTuple, PossiblePromise, Prettify, TupleToUnion }; | ||
export type { GreaterThan, ObjValueTuple, PossiblePromise, Prettify, SplitByDelimiter, TupleToUnion }; |
{ | ||
"name": "@kubb/types", | ||
"version": "2.0.0-beta.2", | ||
"version": "2.0.0-beta.3", | ||
"description": "Generator types", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -23,3 +23,3 @@ export type Prettify<T> = | ||
export type TupleToUnion<T> = T extends Array<infer ITEMS> ? ITEMS : never | ||
export type TupleToUnion<T> = T extends any[] ? T[number] : never | ||
@@ -29,1 +29,4 @@ type ArrayWithLength<T extends number, U extends any[] = []> = U['length'] extends T ? U : ArrayWithLength<T, [true, ...U]> | ||
export type GreaterThan<T extends number, U extends number> = ArrayWithLength<U> extends [...ArrayWithLength<T>, ...infer _] ? false : true | ||
export type SplitByDelimiter<T extends string, D extends string> = T extends `${infer P}${D}${infer Q}` ? [P, ...SplitByDelimiter<Q, D>] | ||
: [T] |
Sorry, the diff of this file is not supported yet
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
9069
40
55