File: strictNullEmptyDestructuring.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (63 lines) | stat: -rw-r--r-- 2,570 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
tests/cases/compiler/strictNullEmptyDestructuring.ts(3,5): error TS2461: Type 'null' is not an array type.
tests/cases/compiler/strictNullEmptyDestructuring.ts(3,5): error TS2531: Object is possibly 'null'.
tests/cases/compiler/strictNullEmptyDestructuring.ts(5,5): error TS2531: Object is possibly 'null'.
tests/cases/compiler/strictNullEmptyDestructuring.ts(7,2): error TS2531: Object is possibly 'null'.
tests/cases/compiler/strictNullEmptyDestructuring.ts(9,5): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/strictNullEmptyDestructuring.ts(11,2): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/strictNullEmptyDestructuring.ts(13,5): error TS2531: Object is possibly 'null'.
tests/cases/compiler/strictNullEmptyDestructuring.ts(15,2): error TS2531: Object is possibly 'null'.
tests/cases/compiler/strictNullEmptyDestructuring.ts(17,5): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/strictNullEmptyDestructuring.ts(19,2): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/strictNullEmptyDestructuring.ts(21,5): error TS2533: Object is possibly 'null' or 'undefined'.
tests/cases/compiler/strictNullEmptyDestructuring.ts(23,2): error TS2533: Object is possibly 'null' or 'undefined'.


==== tests/cases/compiler/strictNullEmptyDestructuring.ts (12 errors) ====
    // Repro from #20873
    
    let [] = null;
        ~~
!!! error TS2461: Type 'null' is not an array type.
        ~~
!!! error TS2531: Object is possibly 'null'.
    
    let { } = null;
        ~~~
!!! error TS2531: Object is possibly 'null'.
    
    ({} = null);
     ~~
!!! error TS2531: Object is possibly 'null'.
    
    let { } = undefined;
        ~~~
!!! error TS2532: Object is possibly 'undefined'.
    
    ({} = undefined);
     ~~
!!! error TS2532: Object is possibly 'undefined'.
    
    let { } = Math.random() ? {} : null;
        ~~~
!!! error TS2531: Object is possibly 'null'.
    
    ({} = Math.random() ? {} : null);
     ~~
!!! error TS2531: Object is possibly 'null'.
    
    let { } = Math.random() ? {} : undefined;
        ~~~
!!! error TS2532: Object is possibly 'undefined'.
    
    ({} = Math.random() ? {} : undefined);
     ~~
!!! error TS2532: Object is possibly 'undefined'.
    
    let { } = Math.random() ? null : undefined;
        ~~~
!!! error TS2533: Object is possibly 'null' or 'undefined'.
    
    ({} = Math.random() ? null : undefined);
     ~~
!!! error TS2533: Object is possibly 'null' or 'undefined'.