pierrec / node-eval

Evaluate node require() module content directly
MIT License
93 stars 16 forks source link

Add TypeScript definitions file #20

Closed JacobFischer closed 3 years ago

JacobFischer commented 4 years ago

This adds a simple TypeScript definitions file for this module.

For TypeScript users this adds the correct shape of the eval function this module exports, complete with all the different ways a user can pass in arguments, and the different shapes they can be. Thank you for maintaining simple and easy to follow source code so I could type it.

If this project does not want to maintain its own definitions, this PR can be closed, and I will instead make a similar PR to DefinitelyTyped.

Note: This PR does not change any runtime behavior. It just simply adds a new file for the TS types, and an entry in package.json pointing to it.

NickKelly1 commented 3 years ago

Doesn't look like this will be merged any time soon Please PR this into DefinitelyTyped