samizdatco / skia-canvas

A GPU-accelerated 2D graphics environment for Node.js
MIT License
1.7k stars 66 forks source link

Add TypeScript declaration files #50

Closed mnixry closed 2 years ago

mnixry commented 2 years ago

skia-canvas provides some awesome features, but unfortunately it cannot be used in TypeScript projects due to the lack of type declaration files.

Although there is @types/skia-canvas, it obviously doesn't keep up with current API updates, and the declaration file it currently provides doesn't exactly match skia-canvas.

My suggestion is to add an index.d.ts file to declare the types, or try to rewrite the JavaScript part of the project in TypeScript?