@@ -57,7 +57,11 @@ Deno.test("createFakeTcpListener()", async (t) => {
57
57
close : 0 ,
58
58
[ Symbol . asyncIterator ] : 0 ,
59
59
[ Symbol . dispose ] : 0 ,
60
- } as const satisfies Record < keyof Deno . TcpListener , 0 > ,
60
+ } as const satisfies Record <
61
+ // NOTE: 'rid' is removed from Deno v2
62
+ keyof { rid : unknown } & Deno . TcpListener ,
63
+ 0
64
+ > ,
61
65
) ;
62
66
for ( const key of keys ) {
63
67
await t . step ( key . toString ( ) , ( ) => {
@@ -70,7 +74,10 @@ Deno.test("createFakeTcpListener()", async (t) => {
70
74
const unimplementedProps = [
71
75
"addr" ,
72
76
"rid" ,
73
- ] as const satisfies readonly GetterKeyOf < Deno . TcpListener > [ ] ;
77
+ ] as const satisfies readonly GetterKeyOf <
78
+ // NOTE: 'rid' is removed from Deno v2
79
+ { rid : unknown } & Deno . TcpListener
80
+ > [ ] ;
74
81
for ( const key of unimplementedProps ) {
75
82
await t . step ( `.${ key } ` , ( ) => {
76
83
assertThrows ( ( ) => listener [ key ] , Error , "Unimplemented" ) ;
@@ -230,7 +237,11 @@ Deno.test("createFakeTcpConn()", async (t) => {
230
237
close : 0 ,
231
238
closeWrite : 0 ,
232
239
[ Symbol . dispose ] : 0 ,
233
- } as const satisfies Record < keyof Deno . TcpConn , 0 > ,
240
+ } as const satisfies Record <
241
+ // NOTE: 'rid' is removed from Deno v2
242
+ keyof { rid : unknown } & Deno . TcpConn ,
243
+ 0
244
+ > ,
234
245
) ;
235
246
for ( const key of keys ) {
236
247
await t . step ( key . toString ( ) , ( ) => {
@@ -246,7 +257,10 @@ Deno.test("createFakeTcpConn()", async (t) => {
246
257
"rid" ,
247
258
"readable" ,
248
259
"writable" ,
249
- ] as const satisfies readonly GetterKeyOf < Deno . TcpConn > [ ] ;
260
+ ] as const satisfies readonly GetterKeyOf <
261
+ // NOTE: 'rid' is removed from Deno v2
262
+ { rid : unknown } & Deno . TcpConn
263
+ > [ ] ;
250
264
for ( const key of unimplementedProps ) {
251
265
await t . step ( `.${ key } ` , ( ) => {
252
266
assertThrows ( ( ) => conn [ key ] , Error , "Unimplemented" ) ;
0 commit comments