-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add definitions of ajv #10498
add definitions of ajv #10498
Conversation
ajv/ajv.d.ts Checklist
|
@sandersn It doesn't look like this should have been merged, the type definitions were already contributed to the library in April - see ajv-validator/ajv#163. Is there any way you can make checking the library part of the PR process so these get rejected - it's not the first one I've come across now, since people misunderstand how it all works and there's a lot of issues like ajv-validator/ajv#225 (not everyone asks the library author first). |
At the very least we should check notNeededPackages.json and give an error if it's in there. @andy-ms does this already happen? Our bundling instructions tell authors to update notNeededPackages.json. (Although, note that file didn't exist in August.) However, I don't think checking the library itself would be reliable enough since it depends on authors following the bundling instructions correctly. @andy-ms @RyanCavanaugh do you have thoughts on this? On the human side, we could also:
|
Sounds great 👍 Though the manual list might be tricky for authors, I definitely don't add every library I publish to that list so I wouldn't expect others to. Seems like it's more useful for deprecation from DefinitelyTyped as you can't automate it for new packages (side note: would it help to have a job that updates your list with packages found on NPM with Why wouldn't checking the library be reliable enough? If it can't be checked automatically, there's no way TypeScript would resolve it. At the very least, it seems like it'd be a simple automatic check which compliments the other points. Sure, there's still some cases where it won't work (e.g. the author uses |
FYI: I started a PR to remove the types. #13028 |
We already do include I was thinking of adding a check in |
Thanks @andy-ms! Having it automated would be a nice-to-have as I've seen not everyone is actually aware that modules can publish the |
case 1. Add a new type definition.
--target es6
and--noImplicitAny
options.-tests.ts
or-tests.tsx
.