1. I am using typescript development, I installed a npm library, it comes with the type declaration file d.ts, but because the author did not update the maintenance in time, the class of this declaration file lacks a method declaration.
question: how can I write a declaration file in the project to supplement the declaration of the missing method without modifying the author"s declaration file?
for example:
the react-native-sound library I use comes with an index.d.ts file with a Sound class
declare class Sound{
...
xxA():void
...
}
but this class is missing a method declaration such as xxB, so how can I add this declaration to my project directory?
I made my own attempt. I created a new types directory in my src directory and created a new file called react-native-sound.d.ts. How do I change it in
?