samizdatco / skia-canvas

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

Add TypeScript types #52

Closed cprecioso closed 2 years ago

cprecioso commented 2 years ago

Closes #50

I imported the types from @types/skia-canvas, and updated them to the current API. I also added a // @ts-check annotation to the tests so they also work to check that the surface is correctly typed.

cprecioso commented 2 years ago

You're welcome, and thanks for the detailed review!

cprecioso commented 2 years ago

Btw @samizdatco if you do a release, I'll send a PR over to https://github.com/DefinitelyTyped/DefinitelyTyped to remove the types now that they're bundled