File: deleteChain.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 (66 lines) | stat: -rw-r--r-- 4,022 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
64
65
66
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(2,8): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(3,9): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(6,8): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(7,9): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(10,8): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(11,9): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(14,8): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(15,8): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(16,9): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(19,8): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(20,9): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(23,8): error TS2790: The operand of a 'delete' operator must be optional.
tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts(24,9): error TS2790: The operand of a 'delete' operator must be optional.


==== tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts (13 errors) ====
    declare const o1: undefined | { b: string };
    delete o1?.b;
           ~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    delete (o1?.b);
            ~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    
    declare const o2: undefined | { b: { c: string } };
    delete o2?.b.c;
           ~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    delete (o2?.b.c);
            ~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    
    declare const o3: { b: undefined | { c: string } };
    delete o3.b?.c;
           ~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    delete (o3.b?.c);
            ~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    
    declare const o4: { b?: { c: { d?: { e: string } } } };
    delete o4.b?.c.d?.e;
           ~~~~~~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    delete (o4.b?.c.d)?.e;
           ~~~~~~~~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    delete (o4.b?.c.d?.e);
            ~~~~~~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    
    declare const o5: { b?(): { c: { d?: { e: string } } } };
    delete o5.b?.().c.d?.e;
           ~~~~~~~~~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    delete (o5.b?.().c.d?.e);
            ~~~~~~~~~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    
    declare const o6: { b?: { c: { d?: { e: string } } } };
    delete o6.b?.['c'].d?.['e'];
           ~~~~~~~~~~~~~~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.
    delete (o6.b?.['c'].d?.['e']);
            ~~~~~~~~~~~~~~~~~~~~
!!! error TS2790: The operand of a 'delete' operator must be optional.