declare type AsyncFfiCall<Args extends unknown[], ReturnType> = {
    async: (...args: [...Args, (err: Error, ret: ReturnType) => void]) => ReturnType;
};
declare type FfiFunction<T> = T extends (...a: infer Args) => infer ReturnType ? T & AsyncFfiCall<Args, ReturnType> : never;
declare type StringType = 'string' | 'void' | 'int' | 'double' | 'float';
declare type ActualType<T> = [T] extends ['string'] ? string : [T] extends ['void'] ? void : [T] extends ['int' | 'double' | 'float'] ? number : never;
declare type ArrayActualType<Tuple extends [...Array<unknown>]> = {
    [Index in keyof Tuple]: ActualType<Tuple[Index]>;
} & {
    length: Tuple['length'];
};
declare type TupleType = [StringType, Array<StringType>];
declare type FunctionFromArray<A extends TupleType> = A extends [
    r: infer ReturnTypeString,
    args: [...infer ArgArrayType]
] ? (...args: ArrayActualType<ArgArrayType>) => ActualType<ReturnTypeString> : never;
declare type LibDescription<Functions extends string> = {
    [k in Functions]: [StringType, Array<StringType>];
};
export declare type FfiBinding<T> = T extends LibDescription<string> ? {
    [Key in keyof T]: FfiFunction<FunctionFromArray<T[Key]>>;
} : never;
export {};
