Skip to content

Conversation

@alebelcor
Copy link

Hi, I have this weird TypeScript issue where—even though I have excluded node_modules in my tsconfig.json—I get a type error from "htmr" when using tsc.

I'm using verbatimModuleSyntax (documentation) to simplify import elision. The setting comes down to ensuring you use the type modifier when importing types. So I did that in src/types.ts.

I don't think it'd have any negative impact since yarn typecheck ran successfully. But feel free to let me know otherwise.

Thanks for considering!

Copy link

@lakyadam lakyadam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like typescript doesn't like this syntax.
This changing it to individual type imports like this:

import React, { type ReactHTML, type ReactSVG, type ReactNode, type ComponentType } from "react";

@alebelcor alebelcor requested a review from lakyadam December 11, 2024 22:53
Copy link

@lakyadam lakyadam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good,. Can we get this merged?

@lakyadam
Copy link

Looks good,. Can we get this merged?

@dmfrancisco @greggb @Arcath

@alebelcor alebelcor mentioned this pull request Apr 25, 2025
@beeequeue
Copy link

@pveyes any chance you could take a look at this?

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.

3 participants