This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: type check & generate defs from jsdoc #3281
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a massive PR, it's going to take some time to go through all the changes here. Is this really the smallest changeset that accomplishes this task? |
There are few things that I could do to make it somewhat smaller:
Please let me know if you want me to do 1. or the 2. I'm also happy to jump on the call if you want a walkthrough of the changes to make reviewing easier. |
This was referenced Sep 14, 2020
Xmader
reviewed
Sep 14, 2020
Xmader
reviewed
Sep 14, 2020
Xmader
reviewed
Sep 15, 2020
…hecks`. Co-authored-by: Xmader <[email protected]>
Xmader
reviewed
Sep 17, 2020
@jacobheun you've suggested taking some things off of @achingbrain's plate. I incorporated repo overhaul changes from @achingbrain so it should be ready. |
Thanks for tidying this up with all the churn in master. CI is very red, could you make sure the tests pass please? |
SgtPooki
referenced
this pull request
in ipfs/js-kubo-rpc-client
Aug 18, 2022
1. Add missing type info (via jsdoc) and fix existing one so that `tsc --noEmit` can succeed without an error. 2. Fix all the issues that `tsc` pointed out once it got enabled. 3. Add a npm script that generates typedefs & typedef maps in `dist` directory & corresponding settings in `package.json` so that when package installed from npm no config will be required to get all the typings. Co-authored-by: Xmader <[email protected]> Co-authored-by: Alex Potsides <[email protected]> Co-authored-by: achingbrain <[email protected]>
This was referenced Nov 30, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is an attempt to do following:
tsc --noEmit
can succeed without an error.tsc
pointed out once it got enabled.dist
directory & corresponding settings inpackage.json
so that when package installed from npm no config will be required to get all the typings.Unfortunately it is intertwined with some of the eslint work that I have started, in order to get rid of all the disabled warning about jsdoc comments. I was hoping we'd do ipfs/aegir#636, but if aren't doing that we'd need to port some changes into aegir and only after we'll be able to remove those eslint disables (and possibly we'd need to add more of those too).
Note that currently generated typedefs are not a good quality yet, mostly because big parts of code base aren't typed and there is quite a bit dependence on inference which I think could be improved. However I think it would be good to start here and improve by tweaking things in the repo.
@achingbrain I would really like to get this inn as soon as possible because it touches almost every single file in the repo, which would make it difficult to keep it up to date. If you're able to do a preliminary review it would be really great. I also really don't want to block on aegir, I would much rather get typedef generation and validation working and then improved it by migrate some of those pieces to the aegir.
Dependencies: