“An accessor cannot be declared in an ambient context.” in a custom library

I have a webpack, typescript project (A) which emits a small library. The library is used in an angular 8 project (B). In project A I declare a class like: export class Foo { private foo: string; constructor(foo: string) { = foo; } } export class Bar extends Foo { private bla: string; constructor(foo: […]