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

If a library has a single export, show that instead of import * as _library_name from #800

Open
nicolo-ribaudo opened this issue Oct 30, 2024 · 0 comments

Comments

@nicolo-ribaudo
Copy link

If a library has a simple export, such as https://jsr.io/@nic/local-highlight-registry which only exports LocalHighlightRegistry, it would be much more useful if the sidebar showed

import { LocalHighlightRegistry } from "@nic/local-highlight-registry";

rather than

import * as _nic_local_highlight_registry from "@nic/local-highlight-registry";

By doing so, users can just copy-paste the snipped without having to then modify it, making the "copy" button actually useful :)

This should only be done when there is a single export, since with multiple exports the example would probably become too long and users would likely still have to modify it manually.

@github-project-automation github-project-automation bot moved this to Needs Triage in JSR Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Triage
Development

No branches or pull requests

1 participant