Skip to content

fix: Consider the presence of converters when checking if attributes can be bound to the type#135

Merged
JackRobards merged 1 commit intomainfrom
consider-converters-in-attribute-binding
Jan 24, 2025
Merged

fix: Consider the presence of converters when checking if attributes can be bound to the type#135
JackRobards merged 1 commit intomainfrom
consider-converters-in-attribute-binding

Conversation

@JackRobards
Copy link
Owner

This makes it so if the attribute on a Lit component has a custom converter, then the plugin should not report errors related to it being passed an incompatible type. It is up to the converter to handle converting it from a string to the component type!

This change comes from the below PR from the runem repository (I just ported it over here). Thank you to the original author!
runem#126

@changeset-bot
Copy link

changeset-bot bot commented Jan 24, 2025

🦋 Changeset detected

Latest commit: 63ee9f6

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

This PR includes changesets to release 1 package
Name Type
@jackolope/lit-analyzer 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

@JackRobards JackRobards force-pushed the consider-converters-in-attribute-binding branch from 3ea85bf to bc574b8 Compare January 24, 2025 06:47
@JackRobards JackRobards force-pushed the consider-converters-in-attribute-binding branch from bc574b8 to 63ee9f6 Compare January 24, 2025 06:49
@JackRobards
Copy link
Owner Author

Reworked the makeElement test helper a little from the original versions - just to try and make the configurations on the @property declaration a bit nicer to use.

@JackRobards JackRobards merged commit c3cc578 into main Jan 24, 2025
@JackRobards JackRobards deleted the consider-converters-in-attribute-binding branch January 24, 2025 07:03
@github-actions github-actions bot mentioned this pull request Jan 24, 2025
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.

1 participant