From 859bfc1a42ae3281cfbe6b3825e232ffb0890ee8 Mon Sep 17 00:00:00 2001 From: Jimmy Leung <43258070+hkleungai@users.noreply.github.com> Date: Sat, 19 Oct 2024 16:44:26 +0800 Subject: [PATCH] doc: add missing options.signal to readlinePromises.createInterface() From the source code, `readlinePromises.createInterface()` calls `new Interface()` imported from `internal/readline/interface`, which works the same as the non-promise version. If non-promise version accepts options.signal, it should also work for `readlinePromises.createInterface()`. Hence this information need to be indicated in the documentation. Refs: https://github.com/nodejs/node/blob/main/lib/readline/promises.js --- doc/api/readline.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/readline.md b/doc/api/readline.md index bf0951fdd1b55c..3373474960963f 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -698,6 +698,7 @@ added: v17.0.0 **Default:** `500`. * `tabSize` {integer} The number of spaces a tab is equal to (minimum 1). **Default:** `8`. + * `signal` {AbortSignal} Allows closing the interface using an AbortSignal. * Returns: {readlinePromises.Interface} The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface`