Skip to content

Type Canvas.toBlob/toDataURL quality argument as number #1862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10410,14 +10410,14 @@ interface HTMLCanvasElement extends HTMLElement {
getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null;
getContext(contextId: string, options?: any): RenderingContext | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/toBlob) */
toBlob(callback: BlobCallback, type?: string, quality?: any): void;
toBlob(callback: BlobCallback, type?: string, quality?: number): void;
/**
* Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
* @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/toDataURL)
*/
toDataURL(type?: string, quality?: any): string;
toDataURL(type?: string, quality?: number): string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/transferControlToOffscreen) */
transferControlToOffscreen(): OffscreenCanvas;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10398,14 +10398,14 @@ interface HTMLCanvasElement extends HTMLElement {
getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null;
getContext(contextId: string, options?: any): RenderingContext | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/toBlob) */
toBlob(callback: BlobCallback, type?: string, quality?: any): void;
toBlob(callback: BlobCallback, type?: string, quality?: number): void;
/**
* Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
* @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/toDataURL)
*/
toDataURL(type?: string, quality?: any): string;
toDataURL(type?: string, quality?: number): string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/transferControlToOffscreen) */
transferControlToOffscreen(): OffscreenCanvas;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
Expand Down
26 changes: 26 additions & 0 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,32 @@
"getContext(contextId: \"webgl\", options?: WebGLContextAttributes): WebGLRenderingContext | null",
"getContext(contextId: \"webgl2\", options?: WebGLContextAttributes): WebGL2RenderingContext | null"
]
},
"toBlob": {
"name": "toBlob",
"signature": {
"0": {
"param": [
{
"name": "quality",
"overrideType": "number"
}
],
}
}
},
"toDataURL": {
"name": "toDataURL",
"signature": {
"0": {
"param": [
{
"name": "quality",
"overrideType": "number"
}
],
}
}
}
}
}
Expand Down
Loading