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(astro): add define:vars to HTMLAttributes #5879

Closed
wants to merge 1 commit into from
Closed

fix(astro): add define:vars to HTMLAttributes #5879

wants to merge 1 commit into from

Conversation

ZerdoX-x
Copy link

Changes

Testing

Was not tested.

Docs

The docs don't explicitly mention any props of HTMLAttributes.

@changeset-bot
Copy link

changeset-bot bot commented Jan 17, 2023

🦋 Changeset detected

Latest commit: 38d28b8

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

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jan 17, 2023
@ZerdoX-x
Copy link
Author

Not sure why this is not fixed yet or even implemented initially.
image

@Princesseuh
Copy link
Member

Princesseuh commented Jan 17, 2023

Hello, thank you for this contribution! However, it seems like there might have been a misunderstanding on your end on how define:vars work 😅

The define:vars attribute is only available on style and script, hence why you get an error when using it somewhere else. You can see more information about the directive on our docs

Your PR also wouldn't fix this, as it updates the HTMLAttributes type that people can use manually, not the one that is used for checking the template. define:vars is also not on the interface you're omitting from, so it would just do nothing. When used manually HTMLAttributes<'script'> properly has the define:vars attribute, as it should

@ZerdoX-x
Copy link
Author

Oh.
That's cool. That is actually more convenient. Sorry for my misunderstanding and thank you for your response <3

@ZerdoX-x ZerdoX-x closed this Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants