kach / nearley

📜🔜🌲 Simple, fast, powerful parser toolkit for JavaScript.
https://nearley.js.org
MIT License
3.57k stars 231 forks source link

TypeScript type definitions #578

Open corwin-of-amber opened 3 years ago

corwin-of-amber commented 3 years ago

(still working on this branch, just letting you know)

I imported the definitions from DefinitelyTyped and added the missing constructor. I am working on porting their tests to use tsd, theirs use dtslint which is a huge overkill.

corwin-of-amber commented 3 years ago

BTW I see coffee-script referenced in coffee-script but no .coffee files. Looks like docopt is written in CoffeeScript but is already compiled to JS in the npm package, so perhaps this dep can be removed?

corwin-of-amber commented 3 years ago

I added the test files and they look ok, to run them all that needs to be done is npx tsd. Should I add this command to the npm run test script?