utilium 2.3.7 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
@@ -167,6 +167,7 @@ export type OptionalTuple<T extends unknown[]> = T extends [infer Head, ...infer
|
|
167
167
|
export type MapKeys<T> = T extends Map<infer K, any> ? K : never;
|
168
168
|
export type ClassLike<Instance = any> = abstract new (...args: any[]) => Instance;
|
169
169
|
export type InstancesFor<T extends readonly ClassLike[]> = T extends [] ? [] : T extends readonly [infer C extends ClassLike, ...infer Rest extends readonly ClassLike[]] ? [InstanceType<C>, ...InstancesFor<Rest>] : never;
|
170
|
+
export type ConstructorsFor<T extends readonly unknown[]> = T extends [] ? [] : T extends readonly [infer I, ...infer Rest extends readonly unknown[]] ? [new (...args: any[]) => I, ...ConstructorsFor<Rest>] : never;
|
170
171
|
export type Concrete<T extends ClassLike> = Pick<T, keyof T> & (new (...args: any[]) => InstanceType<T>);
|
171
172
|
/**
|
172
173
|
* Converts a union to an intersection
|