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

ReturnType<...> idiom obscures reference docs for public APIs #9765

Open
Tracked by #9757
dckc opened this issue Jul 24, 2024 · 0 comments
Open
Tracked by #9757

ReturnType<...> idiom obscures reference docs for public APIs #9765

dckc opened this issue Jul 24, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@dckc
Copy link
Member

dckc commented Jul 24, 2024

What is the Problem Being Solved?

When a type such as CosmosInterchainService are defined using the typescript ReturnType<...> idiom, vs-code hover shows the type as expected, but the reference docs (CosmosInterchainService) don't show the methods and stuff; they just show a link to the prepareCosmosInterchainService function.

This is convenient during development, but for external APIs, the indirection is obscure.

Description of the Design

Write out the type long-hand, and use satisfies or some such to ensure that the prepareCosmosInterchainService matches.

Security / Scaling / Upgrade Considerations

none. docs only.

Test Plan

I can't think of anything beyond manual review.

cc @mitdralla @turadg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant