rl.prompt([preserveCursor])


新增于: v0.1.98
  • preserveCursor <boolean> 如果为 true,则防止光标位置重置为 0

    \preserveCursor <boolean> If true, prevents the cursor placement from being reset to 0.

rl.prompt() 方法将配置为 promptInterfaceConstructor 实例写入 output 中的新行,以便为用户提供用于提供输入的新位置。

\The rl.prompt() method writes the InterfaceConstructor instances configured prompt to a new line in output in order to provide a user with a new location at which to provide input.

当调用时,如果 rl.prompt() 流已暂停,则 rl.prompt() 将恢复 input 流。

\When called, rl.prompt() will resume the input stream if it has been paused.

如果 InterfaceConstructor 是在 output 设置为 nullundefined 的情况下创建的,则不会写入提示。

\If the InterfaceConstructor was created with output set to null or undefined the prompt is not written.

AltStyle によって変換されたページ (->オリジナル) /