Throughout my experience working with React and Redux, I've come across multiple instances where one library extends another.
For instance, let's say I'm using a JavaScript library that exports a function like so:
function dispatch(action:IAction):void;
interface IAction {
type: string;
}
Then, I incorporate another JavaScript library that enhances the dispatch
function to allow callbacks:
function dispatch(action:IAction | IActionCallback):void;
interface IActionCallback {
(dispatch:IDispatch):void;
}
The issue arises when the second library augments the functionality of the first. Is there a proper way to express this in typings? Or is it even possible?