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

(feat) implement generics attr on script tags #2020

Merged
merged 6 commits into from
May 25, 2023

Conversation

dummdidumm
Copy link
Member

@jasonlyu123
Copy link
Member

Overall looks good. There are two minor issues I found. Do we need an equivalent throwIfIsGeneric for the generic attribute? You can define generic on the module script now, but it doesn't do anything. I also notice that semantic tokens sometimes highlight script lang="ts" generic as a function. The current check needs to be more. I think we can skip the highlight if the highlighted identifier is render and if the mapped source includes a script tag.

@dummdidumm
Copy link
Member Author

I also notice that semantic tokens sometimes highlight script lang="ts" generic as a function.

Do you have a code snippet that reproduces this?

@jasonlyu123
Copy link
Member

<script lang="ts" generics="T extends string">

</script>

It's more apparent in a dark theme
圖片

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