UNPKG

@athenna/core

Version:

One foundation for multiple applications.

40 lines (39 loc) 1.01 kB
/** * @athenna/core * * (c) João Lenon <lenon@athenna.io> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import type { PrettyREPLServer } from 'pretty-repl'; import type { REPLCommandAction } from 'node:repl'; export declare class CommandBuilder { /** * Holds the command options. */ private options; /** * Holds the repl session. */ private session; /** * Holds the command signature. */ private signature; constructor(signature: string, session: PrettyREPLServer); /** * Set the command help that will be displayed when running * the .help command. */ help(help: string): CommandBuilder; /** * Set the command action that will be executed when running * the command. */ action(action: REPLCommandAction): CommandBuilder; /** * Register the command in the repl session. */ register(): void; }