Class CRPCBuilder<TContext, TMeta>

Type Parameters

  • TContext extends object
  • TMeta extends object

Constructors

Methods

Constructors

Methods

  • Create the root object

    Type Parameters

    Parameters

    Returns {
        _config: RootConfig<
            {
                ctx: TContext;
                errorShape: undefined extends TOptions["errorFormatter"]
                    ? DefaultErrorShape
                    : inferErrorFormatterShape<TOptions["errorFormatter"]>;
                meta: TMeta;
                transformer: undefined extends TOptions["transformer"] ? false : true;
            },
        >;
        mergeRouters: <TRouters extends AnyRouter[]>(
            ...routerList: [...TRouters[]],
        ) => MergeRouters<TRouters>;
        middleware: <$ContextOverrides>(
            fn: MiddlewareFunction<
                TContext,
                TMeta,
                object,
                $ContextOverrides,
                unknown,
            >,
        ) => MiddlewareBuilder<TContext, TMeta, $ContextOverrides, TInputOut>;
        procedure: ProcedureBuilder<
            TContext,
            TMeta,
            object,
            typeof unsetMarker,
            typeof unsetMarker,
            typeof unsetMarker,
            typeof unsetMarker,
            false,
        >;
        router: {
            <TInput extends RouterRecord>(
                input: TInput,
            ): BuiltRouter<TRoot, TInput>;
            <TInput extends CreateRouterOptions>(
                input: TInput,
            ): BuiltRouter<TRoot, DecorateCreateRouterOptions<TInput>>;
        };
    }