Skip to content

Documentation / @super-line/server / Handlers

Type Alias: Handlers<C, A>

Handlers<C, A> = [keyof SharedRequests<C>] extends [never] ? object : object & { [R in RoleOf<C>]: RoleHandlers<C, A, R> }

Defined in: index.ts:95

The handler map passed to implement: one block per role plus an optional shared block. Each handler's input/ctx/conn are narrowed to its role. The shared key is required only when the contract has shared requests.

Type Parameters

C

C extends Contract

A

A

Released under the MIT License.