import { tsutil } from './tsutil'; import { TRPCPayload } from './router'; declare type AnyFunc = (...args: any[]) => any; declare type WrappedFunc = (ctx: any) => (...args: any[]) => any; export declare type TRPCEndpointDef = { implement: Func; authorize: (ctx: any) => (...args: Parameters>) => boolean | Promise; }; export declare class TRPCEndpoint { readonly _func: Func; readonly _def: TRPCEndpointDef; readonly _sdk: Func extends (ctx: any) => (...args: infer U) => any ? (...args: U) => { run: () => tsutil.promisify>>; payload: TRPCPayload; } : never; constructor(def: TRPCEndpointDef); static create: (func: F) => TRPCEndpoint; call: (ctx: Parameters[0], ...args: Parameters>) => ReturnType>; authorize: (func: (ctx: Parameters[0]) => (...args: Parameters>) => boolean | Promise) => this; _toServerSDK: () => (ctx: Parameters[0], ...args: Parameters>) => ReturnType>; } export {};