@@ -229,7 +229,6 @@ describe('derived', () => {
229
229
it ( 'maps a single store' , ( ) => {
230
230
const a = writable ( 1 ) ;
231
231
232
- // @ts -expect-error TODO feels like inference should work here
233
232
const b = derived ( a , ( n ) => n * 2 ) ;
234
233
235
234
const values : number [ ] = [ ] ;
@@ -251,7 +250,6 @@ describe('derived', () => {
251
250
const a = writable ( 2 ) ;
252
251
const b = writable ( 3 ) ;
253
252
254
- // @ts -expect-error TODO feels like inference should work here
255
253
const c = derived ( [ a , b ] , ( [ a , b ] ) => a * b ) ;
256
254
257
255
const values : number [ ] = [ ] ;
@@ -343,10 +341,8 @@ describe('derived', () => {
343
341
it ( 'prevents glitches' , ( ) => {
344
342
const lastname = writable ( 'Jekyll' ) ;
345
343
346
- // @ts -expect-error TODO feels like inference should work here
347
344
const firstname = derived ( lastname , ( n ) => ( n === 'Jekyll' ? 'Henry' : 'Edward' ) ) ;
348
345
349
- // @ts -expect-error TODO feels like inference should work here
350
346
const fullname = derived ( [ firstname , lastname ] , ( names ) => names . join ( ' ' ) ) ;
351
347
352
348
const values : string [ ] = [ ] ;
@@ -367,17 +363,14 @@ describe('derived', () => {
367
363
368
364
const values : string [ ] = [ ] ;
369
365
370
- // @ts -expect-error TODO feels like inference should work here
371
366
const a = derived ( count , ( $count ) => {
372
367
return 'a' + $count ;
373
368
} ) ;
374
369
375
- // @ts -expect-error TODO feels like inference should work here
376
370
const b = derived ( count , ( $count ) => {
377
371
return 'b' + $count ;
378
372
} ) ;
379
373
380
- // @ts -expect-error TODO feels like inference should work here
381
374
const combined = derived ( [ a , b ] , ( [ a , b ] ) => {
382
375
return a + b ;
383
376
} ) ;
@@ -399,12 +392,10 @@ describe('derived', () => {
399
392
400
393
const values : string [ ] = [ ] ;
401
394
402
- // @ts -expect-error TODO feels like inference should work here
403
395
const a = derived ( root , ( $root ) => {
404
396
return 'a' + $root . a ;
405
397
} ) ;
406
398
407
- // @ts -expect-error TODO feels like inference should work here
408
399
const b = derived ( [ a , root ] , ( [ $a , $root ] ) => {
409
400
return 'b' + $root . b + $a ;
410
401
} ) ;
@@ -426,7 +417,6 @@ describe('derived', () => {
426
417
427
418
const number = writable ( 1 ) ;
428
419
429
- // @ts -expect-error TODO feels like inference should work here
430
420
const numbers = derived ( number , ( $number ) => {
431
421
arr [ 0 ] = $number ;
432
422
return arr ;
@@ -507,7 +497,6 @@ describe('derived', () => {
507
497
const a = writable ( 'one' ) ;
508
498
const b = writable ( 1 ) ;
509
499
510
- // @ts -expect-error TODO feels like inference should work here
511
500
const c = derived ( [ a , b ] , ( [ a , b ] ) => `${ a } ${ b } ` ) ;
512
501
513
502
assert . deepEqual ( get ( c ) , 'one 1' ) ;
0 commit comments