IBM / report-toolkit

A toolkit for consumers of Node.js diagnostic Reports
https://ibm.github.io/report-toolkit
Other
84 stars 10 forks source link

add typescript definitions #16

Closed boneskull closed 5 years ago

boneskull commented 5 years ago

ansi-escapes has an example of providing types and testing those types.

boneskull commented 5 years ago

a prereq to this is probably going to be more docstrings.

boneskull commented 5 years ago

Adding

// @ts-check

to the top of a JS file lets VSCode validate the types (to the best of its ability) against existing TS types. This seems like a good way to ensure they are correct while implementing.

There's likely also a way to do the type checks as part of the build.... that way might actually be conversion to TypeScript. not sure.

boneskull commented 5 years ago

this is essentially done, but not yet merged.

boneskull commented 5 years ago

this is resolved by a7400201fa3e6ee75e48e40af0b8270fbd3e4761