getContext(contextId: "2d"): CanvasRenderingContext2D;
getContext(contextId: "experimental-webgl"): WebGLRenderingContext;
getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;
Overloaded getContext(contextId: "experimental-webgl"): WebGLRenderingContext; is missing "webgl" according to these reference sites below:
https://developer.Mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext
http://www.JavaScripture.com/HTMLCanvasElement
Also all the overloaded methods got an optional contextAttributes?: {} parameter.
And I don't think ...args: any[] represents the 2nd parameter correctly.
This is my change proposal for them btW: :-D
getContext(contextType: "2d", contextAttributes?: {}): CanvasRenderingContext2D;
getContext(contextType: "webgl" | "experimental-webgl", contextAttributes?: {}): WebGLRenderingContext;
getContext(contextType: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext;
Overloaded
getContext(contextId: "experimental-webgl"): WebGLRenderingContext;is missing "webgl" according to these reference sites below:https://developer.Mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext
http://www.JavaScripture.com/HTMLCanvasElement
Also all the overloaded methods got an optional
contextAttributes?: {}parameter.And I don't think
...args: any[]represents the 2nd parameter correctly.This is my change proposal for them btW: :-D