# errors.LibTmuxErrorCode

- **Module:** errors
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** typealias
- **Source:** https://github.com/libtmux/libtmux-ts/blob/46cccfef2a546de55ce8b308249b8c76339089a0/packages/libtmux/src/errors.ts#L151
- **Page:** https://libtmux.org/en/ts/latest/reference/errors-libtmuxerrorcode/

```ts
type LibTmuxErrorCode = | "FormatProtocolError"
| "LibTmuxError"
| "MultipleMatchesError"
| "MultipleObjectsError"
| "NoMatchError"
| "ObjectNotFoundError"
| "QueryValidationError"
| "TmuxCommandError"
| "TmuxObjectNotFoundError"
| "TmuxServerRestartedError"
| "TmuxTransportError"
| "VersionTooLowError"
| "WaitTimeoutError"
```

Every value [`LibTmuxError.code`](/en/ts/latest/reference/errors-libtmuxerror-code/) can hold.

A union rather than [`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) so 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 — [`NoMatchError`](/en/ts/latest/reference/errors-nomatcherror/) extends
[`ObjectNotFoundError`](/en/ts/latest/reference/errors-objectnotfounderror/) — and a literal on the parent makes the child's
declaration an illegal override. `instanceof` is the narrowing tool; this
is the one that survives a bundler and a serialization round trip.
