All files / realm/blong-gateway/adapter/db handlerGroup.ts

100% Statements 24/24
100% Branches 0/0
100% Functions 0/0
100% Lines 24/24

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 251x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
import {handlerGroup} from '@feasibleone/blong';
 
import type {GatewayUuidLib} from './gatewayUuid.ts';
 
/**
 * The libraries the `adapter/db` group injects, as one type.
 */
export type GatewayDbLib = GatewayUuidLib;
 
/**
 * `handler` for the `adapter/db` group — the framework factory with
 * {@link GatewayDbLib} typed on `lib`, so each handler destructures the members it
 * uses and gets them typed:
 *
 * ```typescript
 * export default handler(({lib: {uuidBuf}}) => async function …)
 * ```
 *
 * This file sits in the handler-group folder on purpose, and the loader skips it
 * by name: `handlerGroup.ts` is a plain module (it exports the factory its
 * siblings import), so it is neither loaded as a handler nor reported as a plain
 * module in a group.
 */
export const handler = handlerGroup<GatewayDbLib>();