On this page
selection.decodeWhereDocument
- Module
- selection
- Package
- @libtmux/libtmux
- Source
- packages/libtmux/src/selection.ts
- decodeWhereDocument ( input : : unknown ) WhereDocumentV1
-
Validate a WHERE document and restore camelCase criteria names.
The returned document is canonical and deeply frozen.
Examples
import { decodeWhereDocument } from "libtmux/selection"; const document = decodeWhereDocument( JSON.parse('{"model":"pane","version":1,"where":{"pane_title":"logs"}}'), ); if (document.model === "pane") snapshot.panes.where(document.where);- Raises
-
-
QueryValidationError – when the document or its criteria are invalid.
-
0 declared, 0 inherited