GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — readline: add support for `Symbol.dispose` · nodejs/node@984f7ef

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • readline.md
  • lib/internal/readline
    • interface.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/readline.md‎

Copy file name to clipboardExpand all lines: doc/api/readline.md
+8Lines changed: 8 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,14 @@ the `'close'` event will be emitted.
272272
Calling `rl.close()` does not immediately stop other events (including `'line'`)
273273
from being emitted by the `InterfaceConstructor` instance.
274274

275+
### `rl[Symbol.dispose]()`
276+
277+
<!-- YAML
278+
added: REPLACEME
279+
-->
280+
281+
Alias for `rl.close()`.
282+
275283
### `rl.pause()`
276284

277285
<!-- YAML
Collapse file

‎lib/internal/readline/interface.js‎

Copy file name to clipboardExpand all lines: lib/internal/readline/interface.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,6 +1371,7 @@ class Interface extends InterfaceConstructor {
13711371
return this[kLineObjectStream];
13721372
}
13731373
}
1374+
Interface.prototype[SymbolDispose] = Interface.prototype.close;
13741375

13751376
module.exports = {
13761377
Interface,

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.