Skip to content

Commit

Permalink
make types compatible with typescript 4.6 (Automattic#1986)
Browse files Browse the repository at this point in the history
  • Loading branch information
chearon authored Feb 24, 2022
1 parent 0bccc05 commit 6fd0fa5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
* Stringify CanvasGradient, CanvasPattern and ImageData like browsers do. (#1639, #1646)
* Add missing include for `toupper`.
* Throw an error instead of crashing the process if `getImageData` or `putImageData` is called on a PDF or SVG canvas (#1853)
* Compatibility with Typescript 4.6

2.9.0
==================
Expand Down
6 changes: 0 additions & 6 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,6 @@ declare class NodeCanvasRenderingContext2D extends CanvasRenderingContext2D {
*/
textDrawingMode: 'path' | 'glyph'

/** _'saturate' is non-standard._ */
globalCompositeOperation: 'saturate' | 'clear' | 'copy' | 'destination' | 'source-over' | 'destination-over' |
'source-in' | 'destination-in' | 'source-out' | 'destination-out' | 'source-atop' | 'destination-atop' |
'xor' | 'lighter' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' |
'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity'

/** _Non-standard_. Sets the antialiasing mode. */
antialias: 'default' | 'gray' | 'none' | 'subpixel'

Expand Down
1 change: 0 additions & 1 deletion types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ ctx.currentTransform = ctx.getTransform()

ctx.quality = 'best'
ctx.textDrawingMode = 'glyph'
ctx.globalCompositeOperation = 'saturate'

const grad: Canvas.CanvasGradient = ctx.createLinearGradient(0, 1, 2, 3)
grad.addColorStop(0.1, 'red')
Expand Down

0 comments on commit 6fd0fa5

Please sign in to comment.