import type { Observable } from 'rxjs'; import type { AnyFunction, Callback, Codec } from '@5ire/types/types'; export declare type Push = [...T, V]; export declare type DropLast = T extends readonly [...infer U, any?] ? U : [...T]; export declare type ApiTypes = 'promise' | 'rxjs'; export declare type ObsInnerType> = O extends Observable ? U : never; export declare type VoidFn = () => void; export declare type UnsubscribePromise = Promise; export declare type PromiseOrObs = ApiType extends 'rxjs' ? Observable : Promise; export interface RxResult { (...args: Parameters): Observable>>; (...args: Parameters): Observable; } export interface PromiseResult { (...args: Parameters): Promise>>; (...args: Push, Callback>>>): UnsubscribePromise; (...args: Parameters): Promise; (...args: Push, Callback>): UnsubscribePromise; } export declare type MethodResult = ApiType extends 'rxjs' ? RxResult : PromiseResult; export interface DecorateMethodOptions { methodName?: string; overrideNoSub?: (...args: unknown[]) => Observable; } export declare type DecorateFn = (...args: any[]) => Observable; export interface PaginationOptions { args: A[]; pageSize: number; startKey?: string; } export declare type DecorateMethod = Observable>(method: M, options?: DecorateMethodOptions) => T;