Skip to content

Not compatible with TypeScript 4.6 #2000

@SimenB

Description

@SimenB

Issue or Feature

Steps to Reproduce

https://github.com/SimenB/canvas-ts

node_modules/canvas/types/index.d.ts:170:2 - error TS2416: Property 'globalCompositeOperation' in type 'NodeCanvasRenderingContext2D' is not assignable to the same property in base type 'CanvasRenderingContext2D'.
  Type '"clear" | "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | ... 16 more ... | "destination"' is not assignable to type 'GlobalCompositeOperation'.
    Type '"clear"' is not assignable to type 'GlobalCompositeOperation'.

170  globalCompositeOperation: 'saturate' | 'clear' | 'copy' | 'destination' | 'source-over' | 'destination-over' |
     ~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in node_modules/canvas/types/index.d.ts:170

Your Environment

  • Version of node-canvas (output of npm list canvas or yarn list canvas): 2.9.0
  • Environment (e.g. node 4.2.0 on Mac OS X 10.8): Node 16.14.0 on macOS 12.2.1 (TypeScript 4.6)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions