werkbank
    Preparing search index...

    Type Alias RpcClient<Config>

    RpcClient: {
        [Key in keyof Config]: Config[Key] extends (...args: any[]) => any
            ? Config[Key] extends Fn<infer P, infer R>
                ? R extends Observable<any> ? Fn<P, R> : Fn<P, Promise<Awaited<R>>>
                : never
            : RpcClient<Config[Key]>
    }

    Mapped type that transforms a worker configuration into a client-side API.

    Type Parameters

    • Config

      The worker configuration type.

    This type recursively maps the worker's configuration. Functions are transformed to return Promises (for one-off results) or Observables (for streams).