File: verbatimModuleSyntaxNoElisionCJS.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (41 lines) | stat: -rw-r--r-- 1,584 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
/a.ts(2,10): error TS1282: An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but 'I' only refers to a type.
/b.ts(1,1): error TS1484: 'I' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
/d.ts(3,10): error TS1283: An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but 'J' resolves to a type-only declaration.


==== /a.ts (1 errors) ====
    interface I {}
    export = I;
             ~
!!! error TS1282: An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but 'I' only refers to a type.
    
==== /b.ts (1 errors) ====
    import I = require("./a");
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1484: 'I' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
    
==== /c.ts (0 errors) ====
    interface I {}
    namespace I {
        export const x = 1;
    }
    export = I;
    
==== /d.ts (1 errors) ====
    import I = require("./c");
    import type J = require("./c");
    export = J;
             ~
!!! error TS1283: An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but 'J' resolves to a type-only declaration.
    
==== /e.d.ts (0 errors) ====
    interface I {}
    export = I;
    
==== /f.ts (0 errors) ====
    import type I = require("./e");
    const I = {};
    export = I;
    
==== /z.ts (0 errors) ====
    // test harness is weird if the last file includs a require >:(