File: requiredInitializedParameter2.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 203,960 kB
  • sloc: sh: 11; makefile: 5
file content (17 lines) | stat: -rw-r--r-- 695 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
tests/cases/compiler/requiredInitializedParameter2.ts(5,7): error TS2420: Class 'C1' incorrectly implements interface 'I1'.
  Types of property 'method' are incompatible.
    Type '(a: number, b: any) => void' is not assignable to type '() => any'.


==== tests/cases/compiler/requiredInitializedParameter2.ts (1 errors) ====
    interface I1 {
        method();
    }
    
    class C1 implements I1 {
          ~~
!!! error TS2420: Class 'C1' incorrectly implements interface 'I1'.
!!! error TS2420:   Types of property 'method' are incompatible.
!!! error TS2420:     Type '(a: number, b: any) => void' is not assignable to type '() => any'.
        method(a = 0, b) { }
    }