Skip to content

Type Alias: GroupConfigurator()<TContext, TCommon>

ts
type GroupConfigurator<TContext, TCommon> = (group) => void;

Defined in: packages/core/src/core/builder/ActionGroupBuilder.ts:55

Callback for configuring actions within a group.

Receives an ActionGroupBuilder to register actions and middleware.

Type Parameters

Type ParameterDescription
TContextApplication context type
TCommon extends Record<string, unknown>Common schema shape

Parameters

ParameterType
groupActionGroupBuilder<TContext, TCommon>

Returns

void

Example

typescript
const configure: GroupConfigurator<AppContext, { workspace_id: string }> = (g) => g
    .query('list', listHandler)
    .mutation('delete', deleteHandler);

builder.group('users', 'User management', configure);