caique
API reference

caique/terminal

Every export of caique/terminal, with its signature and doc comment: createIo, streamsOf, plus 1 type.

import { createIo, streamsOf } from 'caique/terminal';

Functions

createIo

A reader and writer over a real stream pair.

function createIo(streams?: Streams): Io & {
    close: () => void;
};
ParameterType
streams (optional)Streams

Returns Io & { close: () => void; }

Constants

streamsOf

A runtime's two streams as the pair createIo takes — the mapping, written down once.

const streamsOf: (runtime: Runtime) => Streams;

Interfaces

Streams

The stream pair a terminal Io is built over: a Runtime's stdin and its stdout.

interface Streams {
    input: NodeJS.ReadableStream & {
        isTTY?: boolean;
    };
    output: NodeJS.WritableStream & {
        isTTY?: boolean;
        columns?: number;
        rows?: number;
    };
}

On this page