diff options
Diffstat (limited to 'ext/node/polyfills/tty.js')
-rw-r--r-- | ext/node/polyfills/tty.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/node/polyfills/tty.js b/ext/node/polyfills/tty.js index c44f7e946..3a84a1f94 100644 --- a/ext/node/polyfills/tty.js +++ b/ext/node/polyfills/tty.js @@ -9,7 +9,10 @@ const { } = core; import { ERR_INVALID_FD } from "ext:deno_node/internal/errors.ts"; -import { LibuvStreamWrap } from "ext:deno_node/internal_binding/stream_wrap.ts"; +import { + kStreamBaseField, + LibuvStreamWrap, +} from "ext:deno_node/internal_binding/stream_wrap.ts"; import { providerType } from "ext:deno_node/internal_binding/async_wrap.ts"; import { Socket } from "node:net"; import { setReadStream } from "ext:deno_node/_process/streams.mjs"; @@ -36,6 +39,14 @@ class TTY extends LibuvStreamWrap { constructor(handle) { super(providerType.TTYWRAP, handle); } + + ref() { + this[kStreamBaseField][io.REF](); + } + + unref() { + this[kStreamBaseField][io.UNREF](); + } } export class ReadStream extends Socket { |