server.Server.batch
TypeScript
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- server
- Declared in
- Server
- Package
- libtmux
- Source
- packages/libtmux/src/server.ts
- batch ( operations : : T , options : : CommandOptions ) Promise<{ -readonly [K in keyof T]: T[K] extends PlannedOperation<infer R> ? R : never; }>
-
Run planned mutations in order, resolving each to what it made.
The batched form of calling them one at a time: the same options go in and the same handles come out, positionally and individually typed. Calling
newWindowrepeatedly takes one snapshot after each mutation; a batch runs the mutations in order and resolves all of them from one final snapshot.Not atomic, for the same reason
Server.pipelineis not: tmux runs them in order and stops at the first failure, leaving everything before it applied.Examples
const [editor, logs] = await server.batch([session.plan.newWindow({ name: "editor" }),session.plan.newWindow({ name: "logs" }),]);Discussed in Control mode vs one-shot
0 declared, 0 inherited