Reputation: 2827
I have installed plugin that ship with types definition.
declare module 'autobind-decorator' {
const autobind: ClassDecorator & MethodDecorator;
export default autobind;
}
But, I thought that type definition was wrong. I need to change to this
declare module 'autobind-decorator' {
const autobind: ClassDecorator & MethodDecorator;
export = autobind;
}
How can I do that?
Upvotes: 2
Views: 1183
Reputation: 276209
How can I do that
Fork the project and publish (till the original gets fixed).
This is essentially if an author publishes a bad JS lib how do I fix it. You would fix it by forking. TypeScript doesn't offer much magic here.
If TypeScript offered a way to override it, it would lead to only confusion which definition is used.
Upvotes: 1