* Pauses the `input` stream. * @returns {void | Interface}
()
| 560 | * @returns {void | Interface} |
| 561 | */ |
| 562 | pause() { |
| 563 | if (this.closed) { |
| 564 | throw new ERR_USE_AFTER_CLOSE('readline'); |
| 565 | } |
| 566 | if (this.paused) return; |
| 567 | this.input.pause(); |
| 568 | this.paused = true; |
| 569 | this.emit('pause'); |
| 570 | return this; |
| 571 | } |
| 572 | |
| 573 | /** |
| 574 | * Resumes the `input` stream if paused. |
no test coverage detected