Skip to content

Commit

Permalink
export type NodeCanvasRenderingContext2D
Browse files Browse the repository at this point in the history
  • Loading branch information
HeCorr authored and zbjornson committed May 5, 2021
1 parent 0b49442 commit 2bf76b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -15,6 +15,8 @@ project adheres to [Semantic Versioning](http://semver.org/).
* Add Node.js v15 to CI.
* The C++ class method `nBytes()` now returns a size_t. (Because this is a C++
method only, this is not considered a breaking change.)
* Export type NodeCanvasRenderingContext2D so you can pass the current context
to functions (TypeScript).
### Added
* Add support for `inverse()` and `invertSelf()` to `DOMMatrix` (#1648)
* Add support for `context.getTransform()` ([#1769](https://github.com/Automattic/node-canvas/pull/1769))
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Expand Up @@ -128,7 +128,7 @@ export class Canvas {
toDataURL(mimeType: 'image/jpeg', quality: number, cb: (err: Error|null, result: string) => void): void
}

declare class NodeCanvasRenderingContext2D extends CanvasRenderingContext2D {
export class NodeCanvasRenderingContext2D extends CanvasRenderingContext2D {
/**
* _Non-standard_. Defaults to 'good'. Affects pattern (gradient, image,
* etc.) rendering quality.
Expand Down

0 comments on commit 2bf76b5

Please sign in to comment.