Skip to content

DebugSwitch

A handle to a registered debug switch.

Import:

import type { DebugSwitch } from '@mnaoumov/typescript-lib/debug-switches';

Signature:

export interface DebugSwitch extends DebugSwitchDefinition

Extends: DebugSwitchDefinition

Properties

PropertyTypeDescription
descriptionstringWhat the switch does, for a settings UI.
(Inherited from DebugSwitchDefinition)
idstringThe unique id, namespaced by the library or plugin that owns the switch, e.g. typescript-lib:terminate-on-timeout.
(Inherited from DebugSwitchDefinition)
isEnabled() => booleanGets the current value.
isEnabledByDefaultbooleanThe value the switch has until something sets it.
(Inherited from DebugSwitchDefinition)
namestringThe human-readable name, for a settings UI.
(Inherited from DebugSwitchDefinition)
setEnabled(isEnabled: boolean) => voidSets the value, notifying the onDebugSwitchChanged listeners if it changed.

Links to this page: