Interface: SessionEventSubscriptionOptions
@termwright/driver / SessionEventSubscriptionOptions
Interface: SessionEventSubscriptionOptions
Section titled “Interface: SessionEventSubscriptionOptions”Defined in: driver/src/api.ts:842
@termwright/driver — PTY + VT sessions, locators, actions and waits.
The normative public API lives in api.ts; this module is the only entry
point and re-exports the types from there together with their runtime
implementations.
Example
Section titled “Example”import { launchTerminal } from '@termwright/driver';
const terminal = await launchTerminal({ command: ['node', 'app.js'] });await terminal.waitForText('Ready');await terminal.getByRole('button', { name: 'Approve' }).activate();await terminal.close();Properties
Section titled “Properties”fromSequence
Section titled “fromSequence”
readonlyfromSequence:number
Defined in: driver/src/api.ts:844
Inclusive source sequence. Use 1 to observe the complete startup.
onError?
Section titled “onError?”
readonlyoptionalonError?: (error,record) =>void
Defined in: driver/src/api.ts:856
Reports a delivery this subscriber rejected, for sinks that must not lose a record.
Without it a listener that throws is downgraded to a session diagnostic and the record is simply gone — fine for a projection that can be redrawn, wrong for a durable sink, where the loss stays invisible until something far away notices the hole. A subscriber that owns evidence should pass this and fail its own operation.
Parameters
Section titled “Parameters”unknown
record
Section titled “record”Returns
Section titled “Returns”void
onGap?
Section titled “onGap?”
readonlyoptionalonGap?: (gap) =>void
Defined in: driver/src/api.ts:845
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void