export * from './cast.js';
export * from './take.js';
export * from './code.js';
export * from './bond.js';
export type IOPath = {
    inputPath: string;
    outputPath: string;
};
export type CallLink = (input: any) => Promise<void> | void;
export type ExtractBySubKey<L extends {
    input: string;
    output: string;
    extend: any;
}, T extends string> = L extends unknown ? (T extends L['input'] ? L : never) : never;
export type Values<T> = T[keyof T];
export type Primitives = string | number | boolean | symbol;
/**
 * Get all valid nested pathes of object
 */
export type AllProps<Obj, Cache extends Array<Primitives> = []> = Obj extends Primitives ? Cache : {
    [Prop in keyof Obj]: [...Cache, Prop] | AllProps<Obj[Prop], [...Cache, Prop]>;
}[keyof Obj];
export type Head<T extends ReadonlyArray<any>> = T extends [] ? never : T extends [infer Head] ? Head : T extends [infer Head, ...infer _] ? Head : never;
export type Tail<T extends ReadonlyArray<any>> = T extends [] ? [] : T extends [infer _] ? [] : T extends [infer _, ...infer Rest] ? Rest : never;
export type Last<T extends ReadonlyArray<any>> = T['length'] extends 1 ? true : false;
export type OmitBase<Obj, Path extends ReadonlyArray<any>> = Last<Path> extends true ? {
    [Prop in Exclude<keyof Obj, Head<Path>>]: Obj[Prop];
} : {
    [Prop in keyof Obj]: OmitBase<Obj[Prop], Tail<Path>>;
};
export type OmitBy<Obj, Keys extends AllProps<Obj>> = OmitBase<Obj, Keys>;
export type Split<Str, Cache extends string[] = []> = Str extends `${infer Method}.${infer Rest}` ? Split<Rest, [...Cache, Method]> : Str extends `${infer Last}` ? [...Cache, Last] : never;
