Currently, I'm working on TypeScript Canvas code for my application and encountering an error message that says:
The type 'CanvasRenderingContext2D' does not have the property 'wrapText'.ts(2339)
This error is triggered by this line of code:
CanvasRenderingContext2D.prototype.wrapText = function(text, x, y, maxWidth, lineHeight)
I am considering including a declaration in the lib.dom.d.ts file located within the node_modules extensions section of VS Code. Is there any other way to resolve this issue? I find it peculiar that it was omitted. Currently using the April 2021 version of VS Code after upgrading recently.