We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Symbol.dispose
1 parent af30194 commit 8a5f45cCopy full SHA for 8a5f45c
doc/api/readline.md
@@ -272,6 +272,14 @@ the `'close'` event will be emitted.
272
Calling `rl.close()` does not immediately stop other events (including `'line'`)
273
from being emitted by the `InterfaceConstructor` instance.
274
275
+### `rl[Symbol.dispose]()`
276
+
277
+<!-- YAML
278
+added: REPLACEME
279
+-->
280
281
+Alias for `rl.close()`.
282
283
### `rl.pause()`
284
285
<!-- YAML
lib/internal/readline/interface.js
@@ -1370,6 +1370,7 @@ class Interface extends InterfaceConstructor {
1370
return this[kLineObjectStream];
1371
}
1372
1373
+Interface.prototype[SymbolDispose] = Interface.prototype.close;
1374
1375
module.exports = {
1376
Interface,
0 commit comments