summaryrefslogtreecommitdiff
path: root/cli/rt/30_files.js
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2020-10-20 19:20:17 +0800
committerGitHub <noreply@github.com>2020-10-20 13:20:17 +0200
commitd9ae74019ef6982acb45d2688d71b99f2191b38d (patch)
tree1760341349e9e15fd1ab1ba71925f3d18ddaecae /cli/rt/30_files.js
parent9141c76b25e0daf427617903a9a988980075430a (diff)
fix(cli): use rid getter for stdio (#8014)
This changes the rid of Deno.stdin, Deno.stdout, Deno.stderr from a mutable property into a getter to match the rid semantics of Deno.File.
Diffstat (limited to 'cli/rt/30_files.js')
-rw-r--r--cli/rt/30_files.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/cli/rt/30_files.js b/cli/rt/30_files.js
index e492da218..679b184fd 100644
--- a/cli/rt/30_files.js
+++ b/cli/rt/30_files.js
@@ -109,7 +109,10 @@
class Stdin {
constructor() {
- this.rid = 0;
+ }
+
+ get rid() {
+ return 0;
}
read(p) {
@@ -127,7 +130,10 @@
class Stdout {
constructor() {
- this.rid = 1;
+ }
+
+ get rid() {
+ return 1;
}
write(p) {
@@ -145,7 +151,10 @@
class Stderr {
constructor() {
- this.rid = 2;
+ }
+
+ get rid() {
+ return 2;
}
write(p) {