File: augmentedTypesModules2.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (40 lines) | stat: -rw-r--r-- 1,753 bytes parent folder | download | duplicates (2)
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
tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged


==== tests/cases/compiler/augmentedTypesModules2.ts (3 errors) ====
    // module then function
    module m2 { }
    function m2() { }; // ok since the module is not instantiated
    
    module m2a { var y = 2; }
           ~~~
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
    function m2a() { }; // error since the module is instantiated
    
    module m2b { export var y = 2; }
           ~~~
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
    function m2b() { };  // error since the module is instantiated
    
    function m2c() { }; 
    module m2c { export var y = 2; } 
    
    module m2cc { export var y = 2; }
           ~~~~
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
    function m2cc() { }; // error to have module first
    
    module m2d { }
    declare function m2d(): void; 
    
    declare function m2e(): void; 
    module m2e { }
    
    function m2f() { };
    module m2f { export interface I { foo(): void } } 
    
    function m2g() { };
    module m2g { export class C { foo() { } } }