-
Notifications
You must be signed in to change notification settings - Fork 96
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 strict flag to CI TS typechecking #144
Conversation
Signed-off-by: Matthew Peveler <[email protected]>
thankyou i knew there was a flag :) will wait for build |
let me rethink my typescript days a sec |
Yup, for posterity, can see https://github.com/MasterOdin/node-portfinder/runs/7820328564?check_suite_focus=true from the first commit for an example of a failed test run due to the usage of implicit any. |
Approved, awesome. Let's use strict - i wonder if any of the people 'building' this library (something that is "news" to me, i'll learn more soon i'm sure) - might be affected? is that a remote possibility? if not, i'm game, let's ship this |
aka, httptoolkit/httptoolkit-server#51 hmmm no implicit any i think then b/c of this? what do u think? does it make it harder to fork if it's strict? |
i would need to think - what is your suggestion? |
strict |
@MasterOdin - thanks again for your help today and last weekend |
People aren't "building" this library directly per se, but rather that when a consumer project uses tsc with
Only in that people cannot write type definitions that use implicit any, which isn't hard to avoid, so the added difficulty should be near zero in the scheme of things. |
I would add that this PR didn't need a new release as it wasn't touching anything end user facing, but I suppose there's no harm in it 🤷 |
i left a comment and then deleted it - yeah right? |
So like, with
complaining about how |
@MasterOdin - check this out when u have a chance httptoolkit/httptoolkit-server#51 thanks - yeah - recalling how microsoft pulled this altogether now :) |
PR adds the
--strict
flag to the tsc typechecking that the CI was doing. This increases the strength of typechecking (see https://www.typescriptlang.org/tsconfig#strict for full details), but for this particular case, it's mostly just for catching no implicit any usage. An alternative would be to use--noImplicitAny
flag instead, but it doesn't hurt to have tsc validate the definition file is as strict as possible even if some of the stuff doesn't really apply.Note, this PR will fail until #143 is merged.