LibTmuxErrorCode
Every value LibTmuxError.code can hold.
Source and package
- Qualified name
-
LibTmux Error Code - Module
- errors
- Package
- libtmux
- Source
- packages/libtmux/src/errors.ts
- type errors.LibTmuxErrorCode = | "FormatProtocolError" | "LibTmuxError" | "MultipleMatchesError" | "MultipleObjectsError" | "NoMatchError" | "ObjectNotFoundError" | "QueryValidationError" | "TmuxCommandError" | "TmuxObjectNotFoundError" | "TmuxServerRestartedError" | "TmuxTransportError" | "VersionTooLowError" | "WaitTimeoutError"
-
Description#
A union rather than
stringso a comparison against a name this package does not have is a type error rather than a branch that never runs.Each class declares this type rather than its own literal because the hierarchy is three deep in places —
NoMatchErrorextendsObjectNotFoundError— and a literal on the parent makes the child's declaration an illegal override.instanceofis the narrowing tool; this is the one that survives a bundler and a serialization round trip.