lys-lang / node-ebnf

Create AST PEG Parsers from formal grammars in JavaScript
https://menduz.com/ebnf-highlighter/
MIT License
104 stars 9 forks source link

Add typescript types #8

Closed Benny- closed 5 years ago

Benny- commented 5 years ago

At the moment type information is lost when the project is transpiled to JS.

To get the type information back for library users follow these instructions: including-declarations-in-your-npm-package

Benny- commented 5 years ago

It seems the proper lines are already present in package.json! I'm not sure why my typescript program does not pick up the types.

Benny- commented 5 years ago

I solved my issue. I had to add "moduleResolution": "node", to the compilerOptions object in tsconfig.json.