UNPKG

806 BTypeScriptView Raw
1/// <reference types="node" />
2/// <reference types="react" />
3export interface Props {
4 /**
5 * Stdout stream passed to `render()` in `options.stdout` or `process.stdout` by default.
6 */
7 readonly stdout?: NodeJS.WriteStream;
8 /**
9 * Write any string to stdout, while preserving Ink's output.
10 * It's useful when you want to display some external information outside of Ink's rendering and ensure there's no conflict between the two.
11 * It's similar to `<Static>`, except it can't accept components, it only works with strings.
12 */
13 readonly write: (data: string) => void;
14}
15/**
16 * `StdoutContext` is a React context, which exposes stdout stream, where Ink renders your app.
17 */
18declare const StdoutContext: import("react").Context<Props>;
19export default StdoutContext;