File: moduleElementsInWrongContext3.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 (85 lines) | stat: -rw-r--r-- 5,392 bytes parent folder | download | duplicates (3)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
tests/cases/compiler/moduleElementsInWrongContext3.ts(3,9): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(4,9): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(8,9): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(10,9): error TS1234: An ambient module declaration is only allowed at the top level in a file.
tests/cases/compiler/moduleElementsInWrongContext3.ts(14,9): error TS1231: An export assignment must be at the top level of a file or module declaration.
tests/cases/compiler/moduleElementsInWrongContext3.ts(18,9): error TS1233: An export declaration can only be used at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(19,9): error TS1233: An export declaration can only be used at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(20,9): error TS1233: An export declaration can only be used at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(21,9): error TS1258: A default export must be at the top level of a file or module declaration.
tests/cases/compiler/moduleElementsInWrongContext3.ts(22,9): error TS1184: Modifiers cannot appear here.
tests/cases/compiler/moduleElementsInWrongContext3.ts(23,9): error TS1184: Modifiers cannot appear here.
tests/cases/compiler/moduleElementsInWrongContext3.ts(24,9): error TS1232: An import declaration can only be used at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(25,9): error TS1232: An import declaration can only be used at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(26,9): error TS1232: An import declaration can only be used at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(27,9): error TS1232: An import declaration can only be used at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(28,9): error TS1232: An import declaration can only be used at the top level of a namespace or module.
tests/cases/compiler/moduleElementsInWrongContext3.ts(29,9): error TS1232: An import declaration can only be used at the top level of a namespace or module.


==== tests/cases/compiler/moduleElementsInWrongContext3.ts (17 errors) ====
    module P {
        {
            module M { }
            ~~~~~~
!!! error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
            export namespace N {
            ~~~~~~
!!! error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
                export interface I { }
            }
    
            namespace Q.K { }
            ~~~~~~~~~
!!! error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
    
            declare module "ambient" {
            ~~~~~~~
!!! error TS1234: An ambient module declaration is only allowed at the top level in a file.
    
            }
    
            export = M;
            ~~~~~~
!!! error TS1231: An export assignment must be at the top level of a file or module declaration.
    
            var v;
            function foo() { }
            export * from "ambient";
            ~~~~~~
!!! error TS1233: An export declaration can only be used at the top level of a namespace or module.
            export { foo };
            ~~~~~~
!!! error TS1233: An export declaration can only be used at the top level of a namespace or module.
            export { baz as b } from "ambient";
            ~~~~~~
!!! error TS1233: An export declaration can only be used at the top level of a namespace or module.
            export default v;
            ~~~~~~
!!! error TS1258: A default export must be at the top level of a file or module declaration.
            export default class C { }
            ~~~~~~
!!! error TS1184: Modifiers cannot appear here.
            export function bee() { }
            ~~~~~~
!!! error TS1184: Modifiers cannot appear here.
            import I = M;
            ~~~~~~
!!! error TS1232: An import declaration can only be used at the top level of a namespace or module.
            import I2 = require("foo");
            ~~~~~~
!!! error TS1232: An import declaration can only be used at the top level of a namespace or module.
            import * as Foo from "ambient";
            ~~~~~~
!!! error TS1232: An import declaration can only be used at the top level of a namespace or module.
            import bar from "ambient";
            ~~~~~~
!!! error TS1232: An import declaration can only be used at the top level of a namespace or module.
            import { baz } from "ambient";
            ~~~~~~
!!! error TS1232: An import declaration can only be used at the top level of a namespace or module.
            import "ambient";
            ~~~~~~
!!! error TS1232: An import declaration can only be used at the top level of a namespace or module.
        }
    }