类:InterfaceConstructor


【Class: InterfaceConstructor

InterfaceConstructor 类的实例是通过 readlinePromises.createInterface()readline.createInterface() 方法构建的。每个实例都与一个单独的 input 可读的 流和一个单独的 output 可写 流相关联。output 流用于打印提示,以便用户输入的数据可以通过 input 流到达并被读取。

【Instances of the InterfaceConstructor class are constructed using the readlinePromises.createInterface() or readline.createInterface() method. Every instance is associated with a single input Readable stream and a single output Writable stream. The output stream is used to print prompts for user input that arrives on, and is read from, the input stream.】