MockDriver
Defined in: src/driver/mock/index.ts:4
Backend abstraction: turns the composed frame into something a device shows (ANSI for a terminal, a cell grid for the canvas) and emits normalized input events. Subclass to target a new backend — see BunDriver, WebDriver, MockDriver.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MockDriver(
width?,height?):MockDriver
Defined in: src/driver/mock/index.ts:12
Parameters
Section titled “Parameters”width?
Section titled “width?”number = 80
height?
Section titled “height?”number = 24
Returns
Section titled “Returns”MockDriver
Overrides
Section titled “Overrides”Properties
Section titled “Properties”capabilities
Section titled “capabilities”
readonlycapabilities:TerminalCapabilities
Defined in: src/driver/mock/index.ts:7
What this backend supports (see TerminalCapabilities).
Overrides
Section titled “Overrides”capabilitiesResolved
Section titled “capabilitiesResolved”capabilitiesResolved:
boolean=false
Defined in: src/driver/driver.ts:195
True once capability probing has completed.
Inherited from
Section titled “Inherited from”clipboard
Section titled “clipboard”
readonlyclipboard:Clipboard
Defined in: src/driver/mock/index.ts:8
Clipboard access for this backend.
Overrides
Section titled “Overrides”consumesFrameBytes
Section titled “consumesFrameBytes”
readonlyconsumesFrameBytes:boolean=true
Defined in: src/driver/driver.ts:202
Whether this backend consumes the ANSI frame bytes from writeFrame. Terminals do; the web canvas re-presents the cell grid via presentBuffer and ignores the bytes, so the App skips building the (discarded) ANSI diff for it and only detects whether the frame changed.
Inherited from
Section titled “Inherited from”writtenData
Section titled “writtenData”writtenData:
string=""
Defined in: src/driver/mock/index.ts:6
Everything written to the driver, for assertions.
Accessors
Section titled “Accessors”enforcesRuntimeHoverMode
Section titled “enforcesRuntimeHoverMode”Get Signature
Section titled “Get Signature”get enforcesRuntimeHoverMode():
boolean
Defined in: src/driver/driver.ts:237
Whether passive hover move suppression should be enforced by the app.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Driver.enforcesRuntimeHoverMode
Methods
Section titled “Methods”[captureRejectionSymbol]()?
Section titled “[captureRejectionSymbol]()?”
optional[captureRejectionSymbol](error,event, …args):void
Defined in: node_modules/@types/node/events.d.ts:87
The Symbol.for('nodejs.rejection') method is called in case a
promise rejection happens when emitting an event and
captureRejections is enabled on the emitter.
It is possible to use events.captureRejectionSymbol in
place of Symbol.for('nodejs.rejection').
import { EventEmitter, captureRejectionSymbol } from 'node:events';
class MyClass extends EventEmitter { constructor() { super({ captureRejections: true }); }
[captureRejectionSymbol](err, event, ...args) { console.log('rejection happened for', event, 'with', err, ...args); this.destroy(err); }
destroy(err) { // Tear the resource down here. }}Parameters
Section titled “Parameters”Error
string | symbol
…any[]
Returns
Section titled “Returns”void
v13.4.0, v12.16.0
Inherited from
Section titled “Inherited from”Driver.[captureRejectionSymbol]
addListener()
Section titled “addListener()”addListener<
E>(eventName,listener):this
Defined in: node_modules/@types/node/events.d.ts:92
Alias for emitter.on(eventName, listener).
Type Parameters
Section titled “Type Parameters”E extends string | symbol
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string | symbol
listener
Section titled “listener”(…args) => void
Returns
Section titled “Returns”this
v0.1.26
Inherited from
Section titled “Inherited from”clearScreen()
Section titled “clearScreen()”clearScreen():
void
Defined in: src/driver/driver.ts:259
Clear the whole screen and scrollback.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”clearWrittenData()
Section titled “clearWrittenData()”clearWrittenData():
void
Defined in: src/driver/mock/index.ts:59
Reset captured output.
Returns
Section titled “Returns”void
emit()
Section titled “emit()”Call Signature
Section titled “Call Signature”emit(
event,size):boolean
Defined in: src/driver/driver.ts:166
Emit a resize (drivers call this).
Parameters
Section titled “Parameters”"resize"
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”emit(
event,ev):boolean
Defined in: src/driver/driver.ts:168
Emit a key event.
Parameters
Section titled “Parameters”"key"
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”emit(
event,ev):boolean
Defined in: src/driver/driver.ts:170
Emit a mouse event.
Parameters
Section titled “Parameters”"mouse"
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”emit(
event,text):boolean
Defined in: src/driver/driver.ts:172
Emit pasted text.
Parameters
Section titled “Parameters”"paste"
string
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”emit(
event):boolean
Defined in: src/driver/driver.ts:174
Emit the capabilities-resolved signal.
Parameters
Section titled “Parameters”"capabilities_resolved"
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”emit(
event,signal):boolean
Defined in: src/driver/driver.ts:176
Emit a received OS signal (drivers call this when exitOnSignal is false).
Parameters
Section titled “Parameters”"signal"
signal
Section titled “signal”"SIGINT" | "SIGTERM"
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”eventNames()
Section titled “eventNames()”eventNames(): (
string|symbol)[]
Defined in: node_modules/@types/node/events.d.ts:154
Returns an array listing the events for which the emitter has registered listeners.
import { EventEmitter } from 'node:events';
const myEE = new EventEmitter();myEE.on('foo', () => {});myEE.on('bar', () => {});
const sym = Symbol('symbol');myEE.on(sym, () => {});
console.log(myEE.eventNames());// Prints: [ 'foo', 'bar', Symbol(symbol) ]Returns
Section titled “Returns”(string | symbol)[]
v6.0.0
Inherited from
Section titled “Inherited from”getGraphicClearSequence()
Section titled “getGraphicClearSequence()”getGraphicClearSequence(
_bgColor?):string
Defined in: src/driver/driver.ts:269
Sequence emitted before redrawing a cell whose graphic/icon changed or was
removed, to erase the stale image. bgColor is the cell’s new background,
used by protocols (e.g. sixel) that clear by painting an opaque rectangle.
Returns "" for backends/protocols where no explicit clear is needed. Keeps
graphics-protocol specifics out of the render/app layers.
Parameters
Section titled “Parameters”_bgColor?
Section titled “_bgColor?”string
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Driver.getGraphicClearSequence
getGraphicResetSequence()
Section titled “getGraphicResetSequence()”getGraphicResetSequence():
string
Defined in: src/driver/driver.ts:279
Sequence that deletes all inline graphics from the terminal at once. Used on a full redraw after a transition (resize, screen change, invalidated frame) to wipe any placements that were orphaned — e.g. a Kitty image that scrolled or whose owning screen was replaced — before the frame re-places the current graphics. Returns "" where not applicable.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Driver.getGraphicResetSequence
getIconSequence()
Section titled “getIconSequence()”getIconSequence(
name,_color?,_bgColor?):string
Defined in: src/driver/driver.ts:241
Escape sequence drawing a registered icon by name (text fallback by default; protocol drivers override).
Parameters
Section titled “Parameters”string
_color?
Section titled “_color?”string
_bgColor?
Section titled “_bgColor?”string
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”getImageSequence()
Section titled “getImageSequence()”getImageSequence(
_pixelBuffer,_pixelWidth,_pixelHeight,_cellWidth,_cellHeight,_pngBase64?,_bgColor?,_zIndex?):string
Defined in: src/driver/driver.ts:246
Escape sequence drawing an inline image (empty by default; graphics-protocol drivers override).
Parameters
Section titled “Parameters”_pixelBuffer
Section titled “_pixelBuffer”Uint8Array
_pixelWidth
Section titled “_pixelWidth”number
_pixelHeight
Section titled “_pixelHeight”number
_cellWidth
Section titled “_cellWidth”number
_cellHeight
Section titled “_cellHeight”number
_pngBase64?
Section titled “_pngBase64?”string
_bgColor?
Section titled “_bgColor?”string
_zIndex?
Section titled “_zIndex?”number
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”getMaxListeners()
Section titled “getMaxListeners()”getMaxListeners():
number
Defined in: node_modules/@types/node/events.d.ts:161
Returns the current max listener value for the EventEmitter which is either
set by emitter.setMaxListeners(n) or defaults to
events.defaultMaxListeners.
Returns
Section titled “Returns”number
v1.0.0
Inherited from
Section titled “Inherited from”getScreenClearSequence()
Section titled “getScreenClearSequence()”getScreenClearSequence():
string
Defined in: src/driver/driver.ts:289
The screen-blanking sequence (SGR reset + cursor home + erase display) as a string, so the App can prepend it to a frame and write both atomically. Pairs with getGraphicResetSequence on a post-graphics-change full wipe. The leading SGR reset makes the erase clear to the default background. Returns "" on backends that don’t consume ANSI (e.g. the web canvas).
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”getSize()
Section titled “getSize()”getSize():
Size
Defined in: src/driver/mock/index.ts:42
Current viewport size in cells.
Returns
Section titled “Returns”Overrides
Section titled “Overrides”listenerCount()
Section titled “listenerCount()”listenerCount<
E>(eventName,listener?):number
Defined in: node_modules/@types/node/events.d.ts:170
Returns the number of listeners listening for the event named eventName.
If listener is provided, it will return how many times the listener is found
in the list of the listeners of the event.
Type Parameters
Section titled “Type Parameters”E extends string | symbol
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string | symbol
The name of the event being listened for
listener?
Section titled “listener?”(…args) => void
The event handler function
Returns
Section titled “Returns”number
v3.2.0
Inherited from
Section titled “Inherited from”listeners()
Section titled “listeners()”listeners<
E>(eventName): (…args) =>void[]
Defined in: node_modules/@types/node/events.d.ts:186
Returns a copy of the array of listeners for the event named eventName.
server.on('connection', (stream) => { console.log('someone connected!');});console.log(util.inspect(server.listeners('connection')));// Prints: [ [Function] ]Type Parameters
Section titled “Type Parameters”E extends string | symbol
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string | symbol
Returns
Section titled “Returns”(…args) => void[]
v0.1.26
Inherited from
Section titled “Inherited from”off<
E>(eventName,listener):this
Defined in: node_modules/@types/node/events.d.ts:191
Alias for emitter.removeListener().
Type Parameters
Section titled “Type Parameters”E extends string | symbol
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string | symbol
listener
Section titled “listener”(…args) => void
Returns
Section titled “Returns”this
v10.0.0
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”on(
event,listener):this
Defined in: src/driver/driver.ts:150
Subscribe to viewport resize.
Parameters
Section titled “Parameters”"resize"
listener
Section titled “listener”(size) => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”on(
event,listener):this
Defined in: src/driver/driver.ts:152
Subscribe to key events.
Parameters
Section titled “Parameters”"key"
listener
Section titled “listener”(ev) => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”on(
event,listener):this
Defined in: src/driver/driver.ts:154
Subscribe to mouse events.
Parameters
Section titled “Parameters”"mouse"
listener
Section titled “listener”(ev) => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”on(
event,listener):this
Defined in: src/driver/driver.ts:156
Subscribe to bracketed-paste text.
Parameters
Section titled “Parameters”"paste"
listener
Section titled “listener”(text) => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”on(
event,listener):this
Defined in: src/driver/driver.ts:158
Fires once capability probing completes.
Parameters
Section titled “Parameters”"capabilities_resolved"
listener
Section titled “listener”() => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”on(
event,listener):this
Defined in: src/driver/driver.ts:164
Subscribe to a received OS signal (SIGINT/SIGTERM). Only emitted by drivers
constructed with exitOnSignal: false; otherwise the driver restores the
terminal and exits before any listener could run.
Parameters
Section titled “Parameters”"signal"
listener
Section titled “listener”(signal) => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”once()
Section titled “once()”once<
E>(eventName,listener):this
Defined in: node_modules/@types/node/events.d.ts:256
Adds a one-time listener function for the event named eventName. The
next time eventName is triggered, this listener is removed and then invoked.
server.once('connection', (stream) => { console.log('Ah, we have our first user!');});Returns a reference to the EventEmitter, so that calls can be chained.
By default, event listeners are invoked in the order they are added. The
emitter.prependOnceListener() method can be used as an alternative to add the
event listener to the beginning of the listeners array.
import { EventEmitter } from 'node:events';const myEE = new EventEmitter();myEE.once('foo', () => console.log('a'));myEE.prependOnceListener('foo', () => console.log('b'));myEE.emit('foo');// Prints:// b// aType Parameters
Section titled “Type Parameters”E extends string | symbol
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string | symbol
The name of the event.
listener
Section titled “listener”(…args) => void
The callback function
Returns
Section titled “Returns”this
v0.3.0
Inherited from
Section titled “Inherited from”prependListener()
Section titled “prependListener()”prependListener<
E>(eventName,listener):this
Defined in: node_modules/@types/node/events.d.ts:275
Adds the listener function to the beginning of the listeners array for the
event named eventName. No checks are made to see if the listener has
already been added. Multiple calls passing the same combination of eventName
and listener will result in the listener being added, and called, multiple
times.
server.prependListener('connection', (stream) => { console.log('someone connected!');});Returns a reference to the EventEmitter, so that calls can be chained.
Type Parameters
Section titled “Type Parameters”E extends string | symbol
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string | symbol
The name of the event.
listener
Section titled “listener”(…args) => void
The callback function
Returns
Section titled “Returns”this
v6.0.0
Inherited from
Section titled “Inherited from”prependOnceListener()
Section titled “prependOnceListener()”prependOnceListener<
E>(eventName,listener):this
Defined in: node_modules/@types/node/events.d.ts:292
Adds a one-time listener function for the event named eventName to the
beginning of the listeners array. The next time eventName is triggered, this
listener is removed, and then invoked.
server.prependOnceListener('connection', (stream) => { console.log('Ah, we have our first user!');});Returns a reference to the EventEmitter, so that calls can be chained.
Type Parameters
Section titled “Type Parameters”E extends string | symbol
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string | symbol
The name of the event.
listener
Section titled “listener”(…args) => void
The callback function
Returns
Section titled “Returns”this
v6.0.0
Inherited from
Section titled “Inherited from”presentBuffer()
Section titled “presentBuffer()”presentBuffer(
_buffer):void
Defined in: src/driver/driver.ts:298
Hand the composed cell grid to the backend after each changed frame. The
portable alternative to consuming the ANSI diff: non-terminal backends
(web DOM/canvas) override this and may ignore write/writeFrame
entirely. The buffer is the live frame — consume it synchronously or copy.
Parameters
Section titled “Parameters”_buffer
Section titled “_buffer”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”rawListeners()
Section titled “rawListeners()”rawListeners<
E>(eventName): (…args) =>void[]
Defined in: node_modules/@types/node/events.d.ts:326
Returns a copy of the array of listeners for the event named eventName,
including any wrappers (such as those created by .once()).
import { EventEmitter } from 'node:events';const emitter = new EventEmitter();emitter.once('log', () => console.log('log once'));
// Returns a new Array with a function `onceWrapper` which has a property// `listener` which contains the original listener bound aboveconst listeners = emitter.rawListeners('log');const logFnWrapper = listeners[0];
// Logs "log once" to the console and does not unbind the `once` eventlogFnWrapper.listener();
// Logs "log once" to the console and removes the listenerlogFnWrapper();
emitter.on('log', () => console.log('log persistently'));// Will return a new Array with a single function bound by `.on()` aboveconst newListeners = emitter.rawListeners('log');
// Logs "log persistently" twicenewListeners[0]();emitter.emit('log');Type Parameters
Section titled “Type Parameters”E extends string | symbol
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string | symbol
Returns
Section titled “Returns”(…args) => void[]
v9.4.0
Inherited from
Section titled “Inherited from”removeAllListeners()
Section titled “removeAllListeners()”removeAllListeners<
E>(eventName?):this
Defined in: node_modules/@types/node/events.d.ts:338
Removes all listeners, or those of the specified eventName.
It is bad practice to remove listeners added elsewhere in the code,
particularly when the EventEmitter instance was created by some other
component or module (e.g. sockets or file streams).
Returns a reference to the EventEmitter, so that calls can be chained.
Type Parameters
Section titled “Type Parameters”E extends string | symbol
Parameters
Section titled “Parameters”eventName?
Section titled “eventName?”string | symbol
Returns
Section titled “Returns”this
v0.1.26
Inherited from
Section titled “Inherited from”removeListener()
Section titled “removeListener()”removeListener<
E>(eventName,listener):this
Defined in: node_modules/@types/node/events.d.ts:425
Removes the specified listener from the listener array for the event named
eventName.
const callback = (stream) => { console.log('someone connected!');};server.on('connection', callback);// ...server.removeListener('connection', callback);removeListener() will remove, at most, one instance of a listener from the
listener array. If any single listener has been added multiple times to the
listener array for the specified eventName, then removeListener() must be
called multiple times to remove each instance.
Once an event is emitted, all listeners attached to it at the
time of emitting are called in order. This implies that any
removeListener() or removeAllListeners() calls after emitting and
before the last listener finishes execution will not remove them from
emit() in progress. Subsequent events behave as expected.
import { EventEmitter } from 'node:events';class MyEmitter extends EventEmitter {}const myEmitter = new MyEmitter();
const callbackA = () => { console.log('A'); myEmitter.removeListener('event', callbackB);};
const callbackB = () => { console.log('B');};
myEmitter.on('event', callbackA);
myEmitter.on('event', callbackB);
// callbackA removes listener callbackB but it will still be called.// Internal listener array at time of emit [callbackA, callbackB]myEmitter.emit('event');// Prints:// A// B
// callbackB is now removed.// Internal listener array [callbackA]myEmitter.emit('event');// Prints:// ABecause listeners are managed using an internal array, calling this will
change the position indexes of any listener registered after the listener
being removed. This will not impact the order in which listeners are called,
but it means that any copies of the listener array as returned by
the emitter.listeners() method will need to be recreated.
When a single function has been added as a handler multiple times for a single
event (as in the example below), removeListener() will remove the most
recently added instance. In the example the once('ping')
listener is removed:
import { EventEmitter } from 'node:events';const ee = new EventEmitter();
function pong() { console.log('pong');}
ee.on('ping', pong);ee.once('ping', pong);ee.removeListener('ping', pong);
ee.emit('ping');ee.emit('ping');Returns a reference to the EventEmitter, so that calls can be chained.
Type Parameters
Section titled “Type Parameters”E extends string | symbol
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string | symbol
listener
Section titled “listener”(…args) => void
Returns
Section titled “Returns”this
v0.1.26
Inherited from
Section titled “Inherited from”setMaxListeners()
Section titled “setMaxListeners()”setMaxListeners(
n):this
Defined in: node_modules/@types/node/events.d.ts:436
By default EventEmitters will print a warning if more than 10 listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners() method allows the limit to be
modified for this specific EventEmitter instance. The value can be set to
Infinity (or 0) to indicate an unlimited number of listeners.
Returns a reference to the EventEmitter, so that calls can be chained.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
v0.3.5
Inherited from
Section titled “Inherited from”setMouseHover()
Section titled “setMouseHover()”setMouseHover(
_enabled):void
Defined in: src/driver/driver.ts:218
Enable/disable passive hover (any-motion) reporting at runtime.
Parameters
Section titled “Parameters”_enabled
Section titled “_enabled”boolean
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setPointerShape()
Section titled “setPointerShape()”setPointerShape(
shape):void
Defined in: src/driver/driver.ts:229
Set the mouse-pointer shape via OSC 22 (ESC ] 22 ; <name> ST). Pass null
to reset to the terminal default (ESC ] 22 ; ST). A no-op when the backend
lacks TerminalCapabilities.pointerShapes or when the shape is already
active. Unknown names are coerced to the default so a stray value can never
wedge the cursor on an unsupported shape. Backends that don’t speak ANSI
(e.g. the web canvas) override this.
Parameters
Section titled “Parameters”"default" | "move" | "pointer" | "text" | "vertical-text" | "wait" | "progress" | "help" | "crosshair" | "cell" | "grab" | "grabbing" | "alias" | "copy" | "no-drop" | "not-allowed" | "zoom-in" | "zoom-out" | "n-resize" | "e-resize" | "s-resize" | "w-resize" | "ne-resize" | "nw-resize" | "se-resize" | "sw-resize" | "ew-resize" | "ns-resize" | "nesw-resize" | "nwse-resize" | null
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”showNotification()
Section titled “showNotification()”showNotification(
title,body):void
Defined in: src/driver/mock/index.ts:63
Show a desktop notification, where supported.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”simulateKey()
Section titled “simulateKey()”simulateKey(
key,name?,ctrl?,shift?,meta?):void
Defined in: src/driver/mock/index.ts:69
Inject a key event as if typed.
Parameters
Section titled “Parameters”string
string = key
boolean = false
shift?
Section titled “shift?”boolean = false
boolean = false
Returns
Section titled “Returns”void
simulateMouse()
Section titled “simulateMouse()”simulateMouse(
x,y,type,button):void
Defined in: src/driver/mock/index.ts:80
Inject a mouse event.
Parameters
Section titled “Parameters”number
number
"press" | "release" | "drag" | "move" | "scroll_up" | "scroll_down"
button
Section titled “button”"left" | "right" | "middle" | "none"
Returns
Section titled “Returns”void
simulateResize()
Section titled “simulateResize()”simulateResize(
width,height):void
Defined in: src/driver/mock/index.ts:90
Inject a resize.
Parameters
Section titled “Parameters”number
height
Section titled “height”number
Returns
Section titled “Returns”void
start()
Section titled “start()”start():
void
Defined in: src/driver/mock/index.ts:46
Begin: set up the device, enter raw mode / bind listeners, probe capabilities.
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”stop()
Section titled “stop()”stop():
void
Defined in: src/driver/mock/index.ts:52
Tear down: restore the device and release listeners.
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”write()
Section titled “write()”write(
data):void
Defined in: src/driver/mock/index.ts:54
Write raw output to the device (ANSI for a terminal).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”writeFrame()
Section titled “writeFrame()”writeFrame(
data):void
Defined in: src/driver/driver.ts:300
Write a full frame, wrapping it in synchronized-update markers when supported.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void