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

fix #1814 incorrect typing embedding for h and html #1815

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

ocavue
Copy link
Contributor

@ocavue ocavue commented Jul 22, 2023

Summary

Close #1814

The h/types/index.d.ts in solid-js@1.7.8 is incorrect. It imports hyper-dom-expressions, but hyper-dom-expressions is not included in the package.json of solid-js.

image

By explictly importing the type HyperScript, tsc can output the following h/types/index.d.ts, which is what we actually want.

import type { HyperScript } from "./hyperscript";
declare const h: HyperScript;
export default h;

solid-js/html has the same issue too.

How did you test this change?

Run pnpm run types and check .d.ts files under dist/.

@changeset-bot
Copy link

changeset-bot bot commented Jul 22, 2023

🦋 Changeset detected

Latest commit: 43cbf65

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

@ocavue ocavue marked this pull request as ready for review July 22, 2023 07:44
@ocavue ocavue changed the title fix #1814 incorrect typing for hyperscript fix #1814 incorrect typing embedding for h and html Jul 22, 2023
@ryansolid ryansolid merged commit 44a2bf0 into solidjs:main Jul 25, 2023
1 check passed
@ryansolid
Copy link
Member

Thank you for finding and fixing this issue.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5629572208

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 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.891%

Totals Coverage Status
Change from base Build 5522715028: 0.0%
Covered Lines: 4131
Relevant Lines: 4332

💛 - Coveralls

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.

Cannot find module 'hyper-dom-expressions' or its corresponding type declarations
3 participants