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.
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 showedrather than
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.