Is there a way to "extend" interfaces through declaration merging that were originally declared in a TypeScript library file?
Specifically, I am trying to extend the HTMLCanvasElement interface from the built-in TypeScript library lib.dom. While I understand how declaration merging works, I am having trouble with the correct imports for the HTMLCanvasElement interface.
import {HTMLCanvasElement} from '<what.to.use.here>';
declare module '<what.to.use.here>'{
interface HTMLCanvasElement{
//add my stuff
}
}
Any help would be appreciated. Thank you :)