tapjs / tap-parser

parse the test anything protocol
121 stars 35 forks source link

TypeScript typings for TapJS and/or tap-parser #54

Closed ORESoftware closed 4 years ago

ORESoftware commented 7 years ago

Hey :)

I tried this

npm install -D @types/tap-parser

to no avail. Is there a way to get typings for this package? What's the best way

I am definitely looking for a TypeScript definition for "testpoint":

 p.on('assert', function (testpoint) {

 });

thx

isaacs commented 4 years ago

I have not investigated how to get typings for this package.

As with node-tap, I'm happy to accept a pull request that adds type information, provided:

  1. The type information covers the public API completely.
  2. There is a test which will fail if the API surface changes without updating the type information. (Adding a devDep on typescript is fine. Adding more work than running npm test is not fine.)
  3. Apart from updating the type information when it breaks (as detected by the test), no other work is required from me.

I realize it would be easier for typescript users if I would instead just rewrite this module in typescript, but I prefer JavaScript.