@bemedev/basifun
Version:
Basic ts functions
165 lines • 5.81 kB
TypeScript
import { UnionOmit, UnionToTuple } from '../../globals/types';
/**
* IndexesOfArray type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type IndexesOfArray<T extends readonly unknown[], S extends number[] = []> = T['length'] extends S['length'] ? S[number] : IndexesOfArray<T, [S['length'], ...S]>;
type _TupleOf<T, N extends number, R extends unknown[] = []> = R['length'] extends N ? R : _TupleOf<T, N, [...R, T]>;
/**
* TupleOf type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type TupleOf<T = any, N extends number = number> = N extends N ? number extends N ? T[] : [..._TupleOf<T, N>] : never;
/**
* ReverseArray type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type ReverseArray<T extends RuA> = T extends any ? T extends [] ? T : T extends [infer Head, ...infer Tail] ? [...ReverseArray<Tail>, Head] : T : never;
/**
* RuA type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type RuA = readonly unknown[];
/**
* AnyArray type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type AnyArray<T = unknown> = ReadonlyArray<T> | T[];
/**
* _NArrayOmit type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type _NArrayOmit<T extends readonly object[], K extends keyof T[number] = never> = Extract<UnionOmit<T[number], K>, object>;
/**
* NArrayOmit type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type NArrayOmit<T extends readonly object[], K extends keyof T[number] = never> = _NArrayOmit<T, K> extends infer N extends object ? UnionToTuple<N> : never;
/**
* ExtractArray type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type ExtractArray<T extends AnyArray, U> = T extends readonly [
infer A,
...infer B
] ? A extends U ? [A, ...ExtractArray<B, U>] : [...ExtractArray<B, U>] : [];
/**
* ExcludeArray type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type ExcludeArray<T extends AnyArray, U> = T extends readonly [
infer A,
...infer B
] ? A extends U ? ExcludeArray<B, U> : [A, ...ExcludeArray<B, U>] : [];
/**
* ReduceArray type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type ReduceArray<T> = T extends AnyArray ? T[number] : T;
/**
* ReduceArrayS type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type ReduceArrayS<T> = T extends AnyArray ? T[0] : T;
/**
* ReduceDeepArray type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type ReduceDeepArray<T> = ReduceArray<T> extends AnyArray ? ReduceDeepArray<ReduceArray<T>> : ReduceArray<T>;
/**
* ToArray type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type ToArray<T> = T extends AnyArray ? T : AnyArray<T>;
/**
* RecursiveArrayOf type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type RecursiveArrayOf<T> = Array<_SingleOrRecursiveArrayOf<T>> | ReadonlyArray<_SingleOrRecursiveArrayOf<T>>;
type _SingleOrRecursiveArrayOf<T> = T | RecursiveArrayOf<T>;
export {};
//# sourceMappingURL=types.d.ts.map