Skip to content
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

Update ts-jsdoc.md #703

Closed
wants to merge 1 commit into from
Closed

Update ts-jsdoc.md #703

wants to merge 1 commit into from

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented Dec 19, 2020

Unfortunately TS still generates strange imports paths in various places e.g. 'multihashes' is turned in the generated types into multihashes/src/ which than is not caught by our types mapping. Which we could catch with additional mapping proposed by this pull request.

@Gozala Gozala requested a review from hugomrdias December 19, 2020 00:17
"*": {
"src/*": [
"dist/src/*",
"dist/src/*/index"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this import path issue is caused by this line ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line works around microsoft/TypeScript#41284, but evidently src/* pattern does not match import paths lib/src/, hence workaround in this pull.

@hugomrdias
Copy link
Member

maybe we should stop using the typesVersions workaround ?

if i remove typesVersions from cids this stops breaking.

We only have this workaround to deep import types, and the only package that should actually allow this is ipfs-utils because its just a collection of atomic utils that should be imported one by one.

/cc @vasco-santos

@vasco-santos
Copy link
Member

maybe we should stop using the typesVersions workaround ?

Yes, I think that could be the way to go.

We only have this workaround to deep import types, and the only package that should actually allow this is ipfs-utils because its just a collection of atomic utils that should be imported one by one.

libp2p/js-libp2p-interfaces and libp2p/js-libp2p-utils also need to support this though

@hugomrdias
Copy link
Member

hugomrdias commented Jan 6, 2021

maybe we should stop using the typesVersions workaround ?

Yes, I think that could be the way to go.

We only have this workaround to deep import types, and the only package that should actually allow this is ipfs-utils because its just a collection of atomic utils that should be imported one by one.

libp2p/js-libp2p-interfaces and libp2p/js-libp2p-utils also need to support this though

We keep the instructions on how to use typeVersions for these special repos and remove it from the default config. Sounds good ?

Also these repos in general dont have the problem with the index entry point because they shouldn't have one single entry point by definition.

@vasco-santos
Copy link
Member

We keep the instructions on how to use typeVersions for these special repos and remove it from the default config. Sounds good ?

Yes!

@hugomrdias hugomrdias deleted the chore/improve-ts-doc branch February 23, 2021 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants