bfirsh / jsnes

A JavaScript NES emulator.
https://jsnes.org
Apache License 2.0
6.12k stars 831 forks source link

Add types for exported module #413

Open darthgoldstein opened 2 years ago

darthgoldstein commented 2 years ago

Added a few .d.ts files to describe the types of the exported modules for this project. Resolve Issue 412

darthgoldstein commented 2 years ago

@bfirsh I'd really love it if you could take a quick look and give me feedback or merge this change :)

bfirsh commented 2 years ago

Boom, amazing thank you! I wonder if there is a way to add a simple test to this to ensure they stay in sync? No big deal if it's difficult.

darthgoldstein commented 2 years ago

That the types stay in sync with the actual classes that they represent?

bfirsh commented 2 years ago

Yeah, exactly. I wonder if there's a simple typescript lint or compile command that could run in CI, or something. Not a big deal if it's not simple.

bfirsh commented 2 years ago

Looks like the build is broken anyway, sigh. (It's also broken on master.)

darthgoldstein commented 2 years ago

Looks like the build is broken anyway, sigh. (It's also broken on master.)

Well that's no fun. I just uploaded #415 which should ideally fix the build issue.