MCPcopy Create free account
hub / github.com/bombshell-dev/clack / constructor

Method constructor

packages/core/src/prompts/prompt.ts:53–66  ·  view source on GitHub ↗
(options: PromptOptions<TValue, Prompt<TValue>>, trackValue = true)

Source from the content-addressed store, hash-verified

51 public userInput = '';
52
53 constructor(options: PromptOptions<TValue, Prompt<TValue>>, trackValue = true) {
54 const { input = stdin, output = stdout, render, signal, ...opts } = options;
55
56 this.opts = opts;
57 this.onKeypress = this.onKeypress.bind(this);
58 this.close = this.close.bind(this);
59 this.render = this.render.bind(this);
60 this._render = render.bind(this);
61 this._track = trackValue;
62 this._abortSignal = signal;
63
64 this.input = input;
65 this.output = output;
66 }
67
68 /**
69 * Unsubscribe all listeners

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected