Currently, I am working on a software project built with TypeScript
. This project relies on several third-party libraries that are imported through the package.json
file.
One such library includes a utility class, utilized by other classes within the same library. There is a specific method within this utility class that I would like to modify or replace.
While the ideal approach would be to directly edit the source code of the library and recompile it, I am curious if there is a more expedient way to globally substitute a class or method in a TypeScript project. Is this feasible? If so, how can it be accomplished?