File: moduleProperty2.errors.txt

package info (click to toggle)
node-typescript 4.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 396,552 kB
  • sloc: javascript: 1,444,377; makefile: 7; sh: 3
file content (23 lines) | stat: -rw-r--r-- 741 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
tests/cases/compiler/moduleProperty2.ts(7,15): error TS2304: Cannot find name 'x'.
tests/cases/compiler/moduleProperty2.ts(12,17): error TS2339: Property 'y' does not exist on type 'typeof M'.


==== tests/cases/compiler/moduleProperty2.ts (2 errors) ====
    module M {
        function f() {
            var x;
        }
        var y;
        export var z;
        var test1=x;
                  ~
!!! error TS2304: Cannot find name 'x'.
        var test2=y; // y visible because same module
    }
    
    module N {
        var test3=M.y; // nope y private property of M
                    ~
!!! error TS2339: Property 'y' does not exist on type 'typeof M'.
        var test4=M.z; // ok public property of M
    }