Type alias Handle

Handle: Alias<`${string}.${string}.${string}`>

The Handle string literal helper type enforces any assigned value to contain at least three dots. It represents a type constraint which should be thought of as domain name in reverse notation. All employed Handles thereby designate a hierarchical structure, which the BusHandler in conjunction with the BusWorker operate upon.

Example

Library-wide Handle:

import { type Bus } from '@sgrud/bus';

const busHandle: Bus.Handle = 'io.github.sgrud';

Example

An invalid Handle:

import { type Bus } from '@sgrud/bus';

const busHandle: Bus.Handle = 'org.example';
// Type [...] is not assignable to type 'Handle'.

See

BusHandler

Generated using TypeDoc