File tree 3 files changed +6
-22
lines changed
3 files changed +6
-22
lines changed Original file line number Diff line number Diff line change @@ -41,21 +41,13 @@ function createWritableStdioStream(writer, name) {
41
41
enumerable : true ,
42
42
configurable : true ,
43
43
get : ( ) =>
44
- Deno . isatty ?. ( writer ?. rid )
45
- // TODO(bartlomieju):
46
- // @ts -ignore Deno.consoleSize is getting stabilized and its signature changes
47
- ? Deno . consoleSize ?. ( writer ?. rid ) . columns
48
- : undefined ,
44
+ Deno . isatty ?. ( writer ?. rid ) ? Deno . consoleSize ?. ( ) . columns : undefined ,
49
45
} ,
50
46
rows : {
51
47
enumerable : true ,
52
48
configurable : true ,
53
49
get : ( ) =>
54
- Deno . isatty ?. ( writer ?. rid )
55
- // TODO(bartlomieju):
56
- // @ts -ignore Deno.consoleSize is getting stabilized and its signature changes
57
- ? Deno . consoleSize ?. ( writer ?. rid ) . rows
58
- : undefined ,
50
+ Deno . isatty ?. ( writer ?. rid ) ? Deno . consoleSize ?. ( ) . rows : undefined ,
59
51
} ,
60
52
isTTY : {
61
53
enumerable : true ,
@@ -67,9 +59,7 @@ function createWritableStdioStream(writer, name) {
67
59
configurable : true ,
68
60
value : ( ) =>
69
61
Deno . isatty ?. ( writer ?. rid )
70
- // TODO(bartlomieju):
71
- // @ts -ignore Deno.consoleSize is getting stabilized and its signature changes
72
- ? Object . values ( Deno . consoleSize ?. ( writer ?. rid ) )
62
+ ? Object . values ( Deno . consoleSize ?. ( ) )
73
63
: undefined ,
74
64
} ,
75
65
} ) ;
Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ import { stripColor as removeColors } from "../fmt/colors.ts";
26
26
27
27
function getConsoleWidth ( ) : number {
28
28
try {
29
- // TODO(bartlomieju):
30
- // @ts -ignore Deno.consoleSize is getting stabilized and its signature changes
31
- return Deno . consoleSize ( Deno . stderr . rid ) . columns ;
29
+ return Deno . consoleSize ( ) . columns ;
32
30
} catch {
33
31
return 80 ;
34
32
}
Original file line number Diff line number Diff line change @@ -330,9 +330,7 @@ Deno.test({
330
330
assertEquals ( process . stdout . fd , Deno . stdout . rid ) ;
331
331
const isTTY = Deno . isatty ( Deno . stdout . rid ) ;
332
332
assertEquals ( process . stdout . isTTY , isTTY ) ;
333
- // TODO(bartlomieju):
334
- // @ts -ignore Deno.consoleSize is getting stabilized and its signature changes
335
- const consoleSize = isTTY ? Deno . consoleSize ( Deno . stdout . rid ) : undefined ;
333
+ const consoleSize = isTTY ? Deno . consoleSize ( ) : undefined ;
336
334
assertEquals ( process . stdout . columns , consoleSize ?. columns ) ;
337
335
assertEquals ( process . stdout . rows , consoleSize ?. rows ) ;
338
336
assertEquals (
@@ -360,9 +358,7 @@ Deno.test({
360
358
assertEquals ( process . stderr . fd , Deno . stderr . rid ) ;
361
359
const isTTY = Deno . isatty ( Deno . stderr . rid ) ;
362
360
assertEquals ( process . stderr . isTTY , isTTY ) ;
363
- // TODO(bartlomieju):
364
- // @ts -ignore Deno.consoleSize is getting stabilized and its signature changes
365
- const consoleSize = isTTY ? Deno . consoleSize ( Deno . stderr . rid ) : undefined ;
361
+ const consoleSize = isTTY ? Deno . consoleSize ( ) : undefined ;
366
362
assertEquals ( process . stderr . columns , consoleSize ?. columns ) ;
367
363
assertEquals ( process . stderr . rows , consoleSize ?. rows ) ;
368
364
assertEquals (
You can’t perform that action at this time.
0 commit comments