You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to transpile typescript > javascript for version 0.1.40 the compiler complains about the following missing type definitions:
> tsc
Error: node_modules/@napi-rs/canvas/index.d.ts(41,20): error TS2552: Cannot find name 'DOMMatrixInit'. Did you mean 'DOMMatrix2DInit'?
Error: node_modules/@napi-rs/canvas/index.d.ts(58,26): error TS2552: Cannot find name 'DOMPointInit'. Did you mean 'DOMPoint'?
Error: node_modules/@napi-rs/canvas/index.d.ts(87,24): error TS2552: Cannot find name 'DOMMatrixInit'. Did you mean 'DOMMatrix2DInit'?
Error: node_modules/@napi-rs/canvas/index.d.ts(88,27): error TS2552: Cannot find name 'DOMMatrixInit'. Did you mean 'DOMMatrix2DInit'?
Error: node_modules/@napi-rs/canvas/index.d.ts(119,22): error TS2552: Cannot find name 'DOMMatrixInit'. Did you mean 'DOMMatrix2DInit'?
Error: node_modules/@napi-rs/canvas/index.d.ts(144,20): error TS2304: Cannot find name 'DOMRectInit'.
Error: node_modules/@napi-rs/canvas/index.d.ts(152,28): error TS2552: Cannot find name 'DOMMatrixInit'. Did you mean 'DOMMatrix2DInit'?
Error: node_modules/@napi-rs/canvas/index.d.ts(166,21): error TS2552: Cannot find name 'DOMPointInit'. Did you mean 'DOMPoint'?
Error: node_modules/@napi-rs/canvas/index.d.ts(253,5): error TS2304: Cannot find name 'CanvasRenderingContext2D'.
Error: node_modules/@napi-rs/canvas/index.d.ts(262,66): error TS2304: Cannot find name 'CanvasGradient'.
Error: node_modules/@napi-rs/canvas/index.d.ts(279,6): error TS2304: Cannot find name 'CanvasPattern'.
Error: Process completed with exit code 2.
The text was updated successfully, but these errors were encountered:
I think this should be reopened. Including "dom" in lib is not a good solution because it adds a whole bunch of ambient types like navigator and window that aren't actually defined in node. If you use a triple-slash directive, you'll pollute the global namespace for any (indirect) importers: I opened samizdatco/skia-canvas#211 today. So the only real solution is to write out the types manually, which is what we did in node-canvas: Automattic/node-canvas#2174.
When attempting to transpile typescript > javascript for version 0.1.40 the compiler complains about the following missing type definitions:
The text was updated successfully, but these errors were encountered: