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 Svelte Button and Link types #220

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

ilyakamens
Copy link
Contributor

@ilyakamens ilyakamens commented Sep 17, 2024

This PR fixes the generated Svelte types for Button and Link. Currently, the types don't allow for native HTML attributes. For example, VS Code complains about href on Link, and value on Button:

image

Similarly, svelte-check --tsconfig ./tsconfig.json fails:

image

I fixed the Link and Button by using Svelte's typing for it. I first manually fixed the generated types until the lint errors were quieted, and then changed the type generation code to match my manual changes.

There may be other elements that require a similar fix since I didn't exhaustively search for similar cases, and instead only fixed the cases I encountered. However, it should be easy to update additional elements if need be.

  • konsta versions 3.1.4 and 4.0.0.
  • svelte version 4.2.18.
  • svelte-check version 3.8.5.
  • @tsconfig/svelte version 5.0.4.

@nolimits4web nolimits4web merged commit db621ab into konstaui:master Sep 18, 2024
@nolimits4web
Copy link
Member

Merged, thanks!

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