selection.decodeWhereDocument
TypeScript
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- selection
- Package
- 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.
-
Discussed in Filtering and queries
0 declared, 0 inherited