summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/tty.ts
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-10-30 08:53:08 -0700
committerGitHub <noreply@github.com>2023-10-30 15:53:08 +0000
commit09204107d85351dae07a45f6a9684b5b6e573652 (patch)
tree5a04f3a877e677e382e34684784ddf832838bd77 /ext/node/polyfills/tty.ts
parent1acef755ca8a0a0433a98e4a66433c63ee0a3b09 (diff)
fix: implement node:tty (#20892)
Fixes #21012 Closes https://github.com/denoland/deno/issues/20855 Fixes https://github.com/denoland/deno/issues/20890 Fixes https://github.com/denoland/deno/issues/20611 Fixes https://github.com/denoland/deno/issues/20336 Fixes `create-svelte` from https://github.com/denoland/deno/issues/17248 Fixes more reports here: - https://github.com/denoland/deno/issues/6529#issuecomment-1432690559 - https://github.com/denoland/deno/issues/6529#issuecomment-1522059006 - https://github.com/denoland/deno/issues/6529#issuecomment-1695803570
Diffstat (limited to 'ext/node/polyfills/tty.ts')
-rw-r--r--ext/node/polyfills/tty.ts25
1 files changed, 0 insertions, 25 deletions
diff --git a/ext/node/polyfills/tty.ts b/ext/node/polyfills/tty.ts
deleted file mode 100644
index d33f779ca..000000000
--- a/ext/node/polyfills/tty.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-
-import { Socket } from "node:net";
-
-// Returns true when the given numeric fd is associated with a TTY and false otherwise.
-function isatty(fd: number) {
- if (typeof fd !== "number") {
- return false;
- }
- try {
- return Deno.isatty(fd);
- } catch (_) {
- return false;
- }
-}
-
-// TODO(kt3k): Implement tty.ReadStream class
-export class ReadStream extends Socket {
-}
-// TODO(kt3k): Implement tty.WriteStream class
-export class WriteStream extends Socket {
-}
-
-export { isatty };
-export default { isatty, WriteStream, ReadStream };