(query, cb)
| 437 | } |
| 438 | |
| 439 | [kQuestion](query, cb) { |
| 440 | if (this.closed) { |
| 441 | throw new ERR_USE_AFTER_CLOSE('readline'); |
| 442 | } |
| 443 | if (this[kQuestionCallback]) { |
| 444 | this.prompt(); |
| 445 | } else { |
| 446 | this[kOldPrompt] = this[kPrompt]; |
| 447 | this.setPrompt(query); |
| 448 | this[kQuestionCallback] = cb; |
| 449 | this.prompt(); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | [kSetLine](line = '') { |
| 454 | this.line = line; |