registerDebugSwitch
Registers a debug switch.
Registering an id again is idempotent: the first definition is kept, and the returned handle reads the same value. A value set with setDebugSwitch before the switch was registered is kept, not reset to the default.
Import:
import { registerDebugSwitch } from '@mnaoumov/typescript-lib/debug-switches';Signature:
function registerDebugSwitch(definition: DebugSwitchDefinition): DebugSwitchParameters:
| Parameter | Type | Description |
|---|---|---|
definition |
DebugSwitchDefinition | The definition of the switch. |
Returns: DebugSwitch — The handle to the switch.