File: typedefCrossModule2.errors.txt

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (55 lines) | stat: -rw-r--r-- 1,736 bytes parent folder | download
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
tests/cases/conformance/jsdoc/mod1.js(3,23): error TS2300: Duplicate identifier 'Foo'.
tests/cases/conformance/jsdoc/mod1.js(4,7): error TS2300: Duplicate identifier 'Foo'.
tests/cases/conformance/jsdoc/mod1.js(6,23): error TS2300: Duplicate identifier 'Bar'.
tests/cases/conformance/jsdoc/mod1.js(7,9): error TS2300: Duplicate identifier 'Bar'.
tests/cases/conformance/jsdoc/mod1.js(9,5): error TS2300: Duplicate identifier 'Baz'.
tests/cases/conformance/jsdoc/mod1.js(11,5): error TS2300: Duplicate identifier 'Baz'.


==== tests/cases/conformance/jsdoc/use.js (0 errors) ====
    var mod = require('./mod1.js');
    /** @type {import("./mod1.js").Baz} */
    var b;
    /** @type {mod.Baz} */
    var bb;
    var bbb = new mod.Baz();
    
==== tests/cases/conformance/jsdoc/mod1.js (6 errors) ====
    // error
    
    /** @typedef {number} Foo */
                          ~~~
!!! error TS2300: Duplicate identifier 'Foo'.
    class Foo { } // should error
          ~~~
!!! error TS2300: Duplicate identifier 'Foo'.
    
    /** @typedef {number} Bar */
                          ~~~
!!! error TS2300: Duplicate identifier 'Bar'.
    exports.Bar = class { }
            ~~~
!!! error TS2300: Duplicate identifier 'Bar'.
    
    /** @typedef {number} Baz */
        ~~~~~~~~~~~~~~~~~~~~~
!!! error TS2300: Duplicate identifier 'Baz'.
    module.exports = {
        Baz: class { }
        ~~~~~~~~~~~~~~
!!! error TS2300: Duplicate identifier 'Baz'.
    }
    
    // ok
    
    /** @typedef {number} Qux */
    var Qux = 2;
    
    /** @typedef {number} Quid */
    exports.Quid = 2;
    
    /** @typedef {number} Quack */
    module.exports = {
        Quack: 2
    }