mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
readline: add support for Symbol.dispose
PR-URL: https://github.com/nodejs/node/pull/57276 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
This commit is contained in:
1 parent
6fdd4e6dcf
commit
db00f94018
2 files changed
+9
No files matched your search
@@ -272,6 +272,14 @@ the `'close'` event will be emitted.
|
||||
Calling `rl.close()` does not immediately stop other events (including `'line'`)
|
||||
from being emitted by the `InterfaceConstructor` instance.
|
||||
|
||||
### `rl[Symbol.dispose]()`
|
||||
|
||||
<!-- YAML
|
||||
added: REPLACEME
|
||||
-->
|
||||
|
||||
Alias for `rl.close()`.
|
||||
|
||||
### `rl.pause()`
|
||||
|
||||
<!-- YAML
|
||||
|
||||
@@ -1371,6 +1371,7 @@ class Interface extends InterfaceConstructor {
|
||||
return this[kLineObjectStream];
|
||||
}
|
||||
}
|
||||
Interface.prototype[SymbolDispose] = Interface.prototype.close;
|
||||
|
||||
module.exports = {
|
||||
Interface,
|
||||
|
||||
Reference in new issue
Block a user