File: classImplementsClass7.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 (15 lines) | stat: -rw-r--r-- 722 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tests/cases/compiler/classImplementsClass7.ts(5,7): error TS2720: Class 'B' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass?
  Property 'x' is missing in type 'B' but required in type 'A'.


==== tests/cases/compiler/classImplementsClass7.ts (1 errors) ====
    class A {
        private x: number;
    }
    
    class B implements A {}
          ~
!!! error TS2720: Class 'B' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass?
!!! error TS2720:   Property 'x' is missing in type 'B' but required in type 'A'.
!!! related TS2728 tests/cases/compiler/classImplementsClass7.ts:2:13: 'x' is declared here.