I am working in an angular 2 cli project in which I have to create a definition of a plugin, because it doesn't exists its typed. This plugin depends of a main library that has already its own typed and it works.
Anyway, I have two files the main one with
LIBRARY TYPES FILE A
export class A extends B {
constructor(...);
methodX(): void;
}
And I would need to add a new method for my plugin so my class would be like
export class A extends B {
constructor(...);
methodX(): void;
methodY(): void;
}
The point is that I need to add it in a separate file. The problem is adding a method to an existent class without creating a new one
If I put
PLUGIN TYPES FILE B
export class A extends B {
constructor(...);
methodX(): void;
}
or
PLUGIN TYPES FILE B
export class A extends B {
constructor(...);
methodX(): void;
methodY(): void;
}
It doesn't work, does anyone how can I achieve overwriting a class or extending it with a new method that?
Thanks