kmamal / node-sdl

🎮 SDL bindings for Node.js
https://www.npmjs.com/package/@kmamal/sdl
MIT License
121 stars 11 forks source link

Fix type declarations; add wildcard declaration for window event handler registration #34

Closed ahamid closed 1 year ago

ahamid commented 1 year ago

Fixes type declarations and adds wildcard declaration for window event handler registration, discovered with Hello World example under Typescript.

As an aside, I attempted to follow the contribution instructions for building and then testing. I found I had to add a main entry to package.json that mirrors the export entry, otherwise require('..') could not be resolved (using latest node 20.3.0). I don't know why. After that npm run test launched two windows, but I'm not sure if anything was happening :man_shrugging: I assume changing type defs is not significant from regression perspective.

Thanks for these bindings, I'm just getting started with experimenting with some graphics programming.

kmamal commented 1 year ago

@ahamid Thanks for the PR!

I'll try to figure out what's wrong with main vs exports.

Don't worry about the tests. I can't really do a lot of automatic testing for this package, so npm test mainly just launches some manual tests,