Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Testing: add check that every function is mentioned in types/index.d.ts #2472

Open
gwhitney opened this issue Mar 7, 2022 · 1 comment
Open

Comments

@gwhitney
Copy link
Collaborator

gwhitney commented Mar 7, 2022

A mild thorn in the side of mathjs has been frequent need to update the TypeScript typings. #2448 if merged will make some progress toward stabilizing this, as the TypeScript "exercising" of mathjs in the tests increases over time (as well as allow the ability to make changes to those typings with confidence that existing use won't be broken).

Another piece of the puzzle would simply be a check that at least every function (perhaps with some exception list) exported by mathjs is at least mentioned in both types/index.d.ts and types/index.ts, so that there's at least a chance it is both declared and tested. That should at least prevent the (so far relatively common) case of "I added a function but oops forgot to type it."

My feeling is this should likely be another step in the new test:types script created if #2448 is merged, if possible.

@josdejong
Copy link
Owner

Good idea, makes sense!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants