@@ -343,13 +343,47 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
343
343
}` ,
344
344
errors : [
345
345
{
346
- messageId : "array " ,
346
+ messageId : "type " ,
347
347
type : "TSTypeReference" ,
348
348
line : 1 ,
349
349
column : 26
350
350
}
351
351
]
352
352
} ,
353
+ {
354
+ code : dedent `
355
+ function foo(numbers: Set<number>) {
356
+ }` ,
357
+ optionsSet : [ [ ] ] ,
358
+ output : dedent `
359
+ function foo(numbers: ReadonlySet<number>) {
360
+ }` ,
361
+ errors : [
362
+ {
363
+ messageId : "type" ,
364
+ type : "TSTypeReference" ,
365
+ line : 1 ,
366
+ column : 23
367
+ }
368
+ ]
369
+ } ,
370
+ {
371
+ code : dedent `
372
+ function foo(numbers: Map<number, string>) {
373
+ }` ,
374
+ optionsSet : [ [ ] ] ,
375
+ output : dedent `
376
+ function foo(numbers: ReadonlyMap<number, string>) {
377
+ }` ,
378
+ errors : [
379
+ {
380
+ messageId : "type" ,
381
+ type : "TSTypeReference" ,
382
+ line : 1 ,
383
+ column : 23
384
+ }
385
+ ]
386
+ } ,
353
387
// Should fail on Array type in interface.
354
388
{
355
389
code : dedent `
@@ -363,7 +397,7 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
363
397
}` ,
364
398
errors : [
365
399
{
366
- messageId : "array " ,
400
+ messageId : "type " ,
367
401
type : "TSTypeReference" ,
368
402
line : 2 ,
369
403
column : 17
@@ -387,7 +421,7 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
387
421
}` ,
388
422
errors : [
389
423
{
390
- messageId : "array " ,
424
+ messageId : "type " ,
391
425
type : "TSTypeReference" ,
392
426
line : 3 ,
393
427
column : 22
@@ -411,13 +445,13 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
411
445
}` ,
412
446
errors : [
413
447
{
414
- messageId : "array " ,
448
+ messageId : "type " ,
415
449
type : "TSTypeReference" ,
416
450
line : 1 ,
417
451
column : 17
418
452
} ,
419
453
{
420
- messageId : "array " ,
454
+ messageId : "type " ,
421
455
type : "TSTypeReference" ,
422
456
line : 3 ,
423
457
column : 19
@@ -441,13 +475,13 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
441
475
}` ,
442
476
errors : [
443
477
{
444
- messageId : "array " ,
478
+ messageId : "type " ,
445
479
type : "TSTypeReference" ,
446
480
line : 1 ,
447
481
column : 17
448
482
} ,
449
483
{
450
- messageId : "array " ,
484
+ messageId : "type " ,
451
485
type : "TSTypeReference" ,
452
486
line : 3 ,
453
487
column : 19
@@ -499,7 +533,7 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
499
533
};` ,
500
534
errors : [
501
535
{
502
- messageId : "array " ,
536
+ messageId : "type " ,
503
537
type : "TSTypeReference" ,
504
538
line : 2 ,
505
539
column : 12
@@ -624,19 +658,19 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
624
658
}` ,
625
659
errors : [
626
660
{
627
- messageId : "array " ,
661
+ messageId : "type " ,
628
662
type : "TSTypeReference" ,
629
663
line : 3 ,
630
664
column : 19
631
665
} ,
632
666
{
633
- messageId : "array " ,
667
+ messageId : "type " ,
634
668
type : "TSTypeReference" ,
635
669
line : 7 ,
636
670
column : 17
637
671
} ,
638
672
{
639
- messageId : "array " ,
673
+ messageId : "type " ,
640
674
type : "TSTypeReference" ,
641
675
line : 11 ,
642
676
column : 19
@@ -650,7 +684,7 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
650
684
output : `type Foo = ReadonlyArray<string>;` ,
651
685
errors : [
652
686
{
653
- messageId : "array " ,
687
+ messageId : "type " ,
654
688
type : "TSTypeReference" ,
655
689
line : 1 ,
656
690
column : 12
@@ -674,7 +708,7 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
674
708
}` ,
675
709
errors : [
676
710
{
677
- messageId : "array " ,
711
+ messageId : "type " ,
678
712
type : "TSTypeReference" ,
679
713
line : 3 ,
680
714
column : 19
@@ -694,7 +728,7 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
694
728
}` ,
695
729
errors : [
696
730
{
697
- messageId : "array " ,
731
+ messageId : "type " ,
698
732
type : "TSTypeReference" ,
699
733
line : 2 ,
700
734
column : 14
@@ -718,7 +752,7 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
718
752
}` ,
719
753
errors : [
720
754
{
721
- messageId : "array " ,
755
+ messageId : "type " ,
722
756
type : "TSTypeReference" ,
723
757
line : 3 ,
724
758
column : 19
@@ -732,7 +766,7 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
732
766
output : `const foo: ReadonlyArray<string> = [];` ,
733
767
errors : [
734
768
{
735
- messageId : "array " ,
769
+ messageId : "type " ,
736
770
type : "TSTypeReference" ,
737
771
line : 1 ,
738
772
column : 12
@@ -760,7 +794,7 @@ const invalid: ReadonlyArray<InvalidTestCase> = [
760
794
output : `let x: Foo<ReadonlyArray<string>>;` ,
761
795
errors : [
762
796
{
763
- messageId : "array " ,
797
+ messageId : "type " ,
764
798
type : "TSTypeReference" ,
765
799
line : 1 ,
766
800
column : 12
0 commit comments