MCPcopy
hub / github.com/remix-run/react-router / constructor

Method constructor

packages/create-react-router/prompts-text.ts:53–68  ·  view source on GitHub ↗
(opts: TextPromptOptions)

Source from the content-addressed store, hash-verified

51 outputText!: string;
52
53 constructor(opts: TextPromptOptions) {
54 super(opts);
55 this.transform = { render: (v) => v, scale: 1 };
56 this.label = opts.label;
57 this.scale = this.transform.scale;
58 this.msg = opts.message;
59 this.hint = opts.hint;
60 this.initial = opts.initial || "";
61 this.validator = opts.validate || (() => true);
62 this.value = "";
63 this.errorMsg = opts.error || "Please enter a valid value";
64 this.cursor = Number(!!this.initial);
65 this.cursorOffset = 0;
66 this.clear = clear(``, this.out.columns);
67 this.render();
68 }
69
70 get type() {
71 return "text" as const;

Callers

nothing calls this directly

Calls 2

renderMethod · 0.95
clearFunction · 0.90

Tested by

no test coverage detected