ink

  • Version 5.0.1
  • Published
  • 300 kB
  • 24 dependencies
  • MIT license

Install

npm i ink
yarn add ink
pnpm add ink

Overview

React for CLI

Index

Classes

class Ink

class Ink {}

    constructor

    constructor(options: Options);

      property calculateLayout

      calculateLayout: () => void;

        property onRender

        onRender: () => void;

          property rejectExitPromise

          rejectExitPromise: (reason?: Error) => void;

            property resized

            resized: () => void;

              property resolveExitPromise

              resolveExitPromise: () => void;

                property unsubscribeExit

                unsubscribeExit: () => void;

                  method clear

                  clear: () => void;

                    method patchConsole

                    patchConsole: () => void;

                      method render

                      render: (node: ReactNode) => void;

                        method unmount

                        unmount: (error?: Error | number | null) => void;

                          method waitUntilExit

                          waitUntilExit: () => Promise<void>;

                            method writeToStderr

                            writeToStderr: (data: string) => void;

                              method writeToStdout

                              writeToStdout: (data: string) => void;

                                Type Aliases

                                type Options

                                type Options = {
                                stdout: NodeJS.WriteStream;
                                stdin: NodeJS.ReadStream;
                                stderr: NodeJS.WriteStream;
                                debug: boolean;
                                exitOnCtrlC: boolean;
                                patchConsole: boolean;
                                waitUntilExit?: () => Promise<void>;
                                };

                                  Package Files (1)

                                  Dependencies (24)

                                  Dev Dependencies (31)

                                  Peer Dependencies (3)

                                  Badge

                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/ink.

                                  • Markdown
                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/ink)
                                  • HTML
                                    <a href="https://www.jsdocs.io/package/ink"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>