File: scopeCheckInsideStaticMethod1.errors.txt

package info (click to toggle)
node-typescript 5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 497,488 kB
  • sloc: javascript: 2,107,274; makefile: 6; sh: 1
file content (19 lines) | stat: -rw-r--r-- 558 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
scopeCheckInsideStaticMethod1.ts(6,7): error TS2304: Cannot find name 'v'.
scopeCheckInsideStaticMethod1.ts(8,12): error TS2339: Property 'p' does not exist on type 'typeof C'.


==== scopeCheckInsideStaticMethod1.ts (2 errors) ====
    class C {
       private v;
       public p;
       static s;
       static b() {
          v = 1; // ERR
          ~
!!! error TS2304: Cannot find name 'v'.
          C.s = 1;
          this.p = 1; // ERR
               ~
!!! error TS2339: Property 'p' does not exist on type 'typeof C'.
       }
    }