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

make a named export for solid-js/html for autocompletion in IDEs #2267

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trusktr
Copy link
Contributor

@trusktr trusktr commented Sep 1, 2024

Summary

Clearly-named exports appear as autocomplete results in IDEs like VS Code. This allows someone to, for example, write the following JS code with | representing the cursor location:

function Comp() {
  return html|
}

and IDEs that use TypeScript Language Server (f.e. VS Code) will propose to automatically add import {html} from 'solid-js/html', converting the code to the following when the user hits the Tab key (default in most IDEs) to accept the auto-completion:

import {html} from 'solid-js/html'

function Comp() {
  return html|
}

Copy link

changeset-bot bot commented Sep 1, 2024

🦋 Changeset detected

Latest commit: 467e872

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
solid-js Patch
test-integration Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coveralls
Copy link

coveralls commented Sep 1, 2024

Pull Request Test Coverage Report for Build 10655705996

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.342%

Totals Coverage Status
Change from base Build 10586064173: 0.0%
Covered Lines: 4196
Relevant Lines: 4429

💛 - Coveralls

@trusktr
Copy link
Contributor Author

trusktr commented Sep 1, 2024

Actually I just tested, and autocompletion will work as long as the app already imports the default html somewhere first. So this change is not needed for that.

This does make it easy to write things like export * from 'solid-js/html' though, so I'd say keep it.

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.

2 participants