0

Why does class C

class C implements N, M {
  constructor(public a: number) {}
}

not satisfy the the interfaces M or N?

interface M {
  constructor(a: number)
}
interface N {
  new(a: number)
}

How do I write an interface that C satisfies?

P Varga
  • 19,174
  • 12
  • 70
  • 108
  • That's a related question, can't find the answer though – P Varga Oct 21 '16 at 19:36
  • 1
    Your question is more succinct, but effectively the same problem; The answer is as answered in the other by @RyanCavanaugh: "Construct signatures in interfaces are not implementable in classes". the work around is also in there: http://stackoverflow.com/a/13700960/1657476 – Meirion Hughes Oct 21 '16 at 19:40

0 Answers0