I use a third-party api that has d.ts definitions, where the class has functions declared like this:
export class Bar {
foo(): void;
}
now when i create an implementation of a subclass i want to use lambda function syntax
export class Test1 extends Bar {
public foo = (): void => {
}
}
This does not compile because
"The class 'Test1' defines the property of the instance member 'foo', but the extended class 'Bar' defines it as a function of the instance member.
Do I need to change the definition of the Bar class to work with lambda functions? I would prefer that if there is another solution, I would appreciate help!
Update
, -. extends implements, lamdba Test1. . Bar , , - ?