File: checkOtherObjectAssignProperty.errors.txt

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (58 lines) | stat: -rw-r--r-- 2,778 bytes parent folder | download | duplicates (5)
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
tests/cases/conformance/jsdoc/importer.js(3,5): error TS2339: Property 'other' does not exist on type 'typeof import("tests/cases/conformance/jsdoc/mod1")'.
tests/cases/conformance/jsdoc/importer.js(4,5): error TS2339: Property 'prop' does not exist on type 'typeof import("tests/cases/conformance/jsdoc/mod1")'.
tests/cases/conformance/jsdoc/importer.js(11,5): error TS2339: Property 'other' does not exist on type 'typeof import("tests/cases/conformance/jsdoc/mod1")'.
tests/cases/conformance/jsdoc/importer.js(12,5): error TS2339: Property 'prop' does not exist on type 'typeof import("tests/cases/conformance/jsdoc/mod1")'.
tests/cases/conformance/jsdoc/importer.js(13,5): error TS2540: Cannot assign to 'bad1' because it is a read-only property.
tests/cases/conformance/jsdoc/importer.js(14,5): error TS2540: Cannot assign to 'bad2' because it is a read-only property.
tests/cases/conformance/jsdoc/importer.js(15,5): error TS2540: Cannot assign to 'bad3' because it is a read-only property.


==== tests/cases/conformance/jsdoc/importer.js (7 errors) ====
    const mod = require("./mod1");
    mod.thing;
    mod.other;
        ~~~~~
!!! error TS2339: Property 'other' does not exist on type 'typeof import("tests/cases/conformance/jsdoc/mod1")'.
    mod.prop;
        ~~~~
!!! error TS2339: Property 'prop' does not exist on type 'typeof import("tests/cases/conformance/jsdoc/mod1")'.
    mod.bad1;
    mod.bad2;
    mod.bad3;
    
    
    mod.thing = 0;
    mod.other = 0;
        ~~~~~
!!! error TS2339: Property 'other' does not exist on type 'typeof import("tests/cases/conformance/jsdoc/mod1")'.
    mod.prop = 0;
        ~~~~
!!! error TS2339: Property 'prop' does not exist on type 'typeof import("tests/cases/conformance/jsdoc/mod1")'.
    mod.bad1 = 0;
        ~~~~
!!! error TS2540: Cannot assign to 'bad1' because it is a read-only property.
    mod.bad2 = 0;
        ~~~~
!!! error TS2540: Cannot assign to 'bad2' because it is a read-only property.
    mod.bad3 = 0;
        ~~~~
!!! error TS2540: Cannot assign to 'bad3' because it is a read-only property.
    
==== tests/cases/conformance/jsdoc/mod1.js (0 errors) ====
    const obj = { value: 42, writable: true };
    Object.defineProperty(exports, "thing", obj);
    
    /**
     * @type {string}
     */
    let str = /** @type {string} */("other");
    Object.defineProperty(exports, str, { value: 42, writable: true });
    
    const propName = "prop"
    Object.defineProperty(exports, propName, { value: 42, writable: true });
    
    
    Object.defineProperty(exports, "bad1", { });
    Object.defineProperty(exports, "bad2", { get() { return 12 }, value: "no" });
    Object.defineProperty(exports, "bad3", { writable: true });