Restate Typescript SDK
    Preparing search index...

    Variable createServiceHandlerConst

    createServiceHandler: <O, I = void>(
        opts: ServiceHandlerOpts<I, O>,
        fn: (ctx: Context, input: I) => Promise<O>,
    ) => I extends void
        ? (ctx: Context) => Promise
        : (ctx: Context, input: I) => Promise<O> = handlers.handler

    Type Declaration

      • <O, I = void>(
            opts: ServiceHandlerOpts<I, O>,
            fn: (ctx: Context, input: I) => Promise<O>,
        ): I extends void
            ? (ctx: Context) => Promise
            : (ctx: Context, input: I) => Promise<O>
      • Create a service handler.

        Type Parameters

        • O
        • I = void

        Parameters

        Returns I extends void
            ? (ctx: Context) => Promise
            : (ctx: Context, input: I) => Promise<O>