Skip to content

ReadFn

A function that reads a single line of user input.

Returns null on EOF (Ctrl+D on Unix, Ctrl+Z on Windows), indicating the user closed the input stream (treated as cancel).

The terminal prompter uses this as its sole input seam. The resolution chain (prompt-adapter-1) will wire this to the runtime adapter's stdin.

Signatures

ts
type ReadFn = { (): Promise<string | null>; };

See Also

Released under the MIT License.