I'm using a third-party package where it is perfectly typed and everything is working fine. But due to my project's requirements I have to extend the types illustrated in the package.
Let's say there's an interface called Data in the package which looks like this:
export interface Data {
id: number;
name: string;
address: string;
}
Now I need to add a new type, called description in the above interface like this:
export interface Data {
id: number;
name: string;
address: string;
description: string;
}
For obvious reasons, it's not right to update the interface directly which is in node_modules folder.
Is there a way to add a new type to an interface which already exists in a third-party package?