-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
Use @ts-check wherever appropriate #1905
Comments
Adding |
I'm all for this! |
As an added bonus... if we do manage to get full TS conformance, we might eventually be able to compile some modules as WASM (🤞). |
TIL AssemblyScript exists 😮 |
@saschanaz I am taking this up if that's fine. Oh and Happy New Year!! 😃 |
@saschanaz, this can be closed, right? |
We still have files without |
Oh, ok. Thanks for confirming. |
w3c/webidl2.js#255 is currently a blocker. |
I need to play less computer games and spend some time learning ts. #lifegoals. |
Can I do this? |
@rahulpurohit29 If you have some TypeScript and JSDoc experience, sure. |
If I just add |
All |
That might be a good place to start - but @saschanaz will know more. Try it and see what errors are emitted. For where the type checks fail, then I assume you would need to go and fix those errors. |
I've found too hard to do fix everything at once, so if you get too much errors then just solve some of them and open a PR. Then we can make things better progressively. |
Breaking up the problem is a good suggestion... @rahulpurohit29, try to do one file at a time. Any fixes you can make will be a significant contribution to the project. It will also make it easier for us to review the changes you make (and a good opportunity for you to understand the code). |
If no one is working on this, I would like to take it up. |
@isunitha98selvan Good, feel free to ask questions when needed. |
@saschanaz I added "checkJS":true to jsconfig.json. I then tried to test it by running: tsc -p jsconfig.json. I got a bunch of TS5055 errors i.e JS file would overwrite input file. I am kind of stuck here. How should I proceed? |
@isunitha98selvan That's weird, would you try |
@saschanaz ended up with almost 795 errors! Not sure where to start debugging |
You can ignore errors from third-party libraries for now. |
* chore: use @ts-check in all src files Fixes #1905 * Fix param name in src/type-helper.d.ts Co-Authored-By: Sid Vishnoi <[email protected]>
It enables strict type check for JavaScripts on any TypeScript-based IDE (e.g. VSCode) so that inappropriate function call can be prohibited before running tests.
The text was updated successfully, but these errors were encountered: