Skip to content

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

@nicolo-ribaudo

Description

@nicolo-ribaudo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docs genRelated to the documentation generationupstreamIssue is in upstream project

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions