Skip to content

NodeTerminal

Node.js implementation of the Effect Terminal service.

This module reuses the shared Node terminal implementation. make creates a scoped process-backed Terminal service, and layer provides the default service with the standard quit behavior for key input.

2 exports Added in v4.0.0 Source

Constructors

make

Added in v4.0.0 Source

Creates a scoped Terminal service backed by process stdin/stdout, using the optional predicate to decide when key input should end the input stream.

Signature

declare const make: (shouldQuit?: (input: UserInput) => boolean) => Effect<Terminal, never, Scope>;

Layers

layer

Added in v4.0.0 Source

Provides the default process-backed Terminal service, ending key input on the default quit keys.

Signature

declare const layer: Layer<Terminal>;