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

"TS1002: Unterminated string literal" in slots #2710

Closed
KaelWD opened this issue Apr 25, 2023 · 3 comments
Closed

"TS1002: Unterminated string literal" in slots #2710

KaelWD opened this issue Apr 25, 2023 · 3 comments
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first upstream

Comments

@KaelWD
Copy link

KaelWD commented Apr 25, 2023

Volar v1.5.2

<template>
  <v-data-table>
    <template #item.item>
      foo
    </template>
  </v-data-table>
</template>

Seems to have something to do with the first part of the slot name being repeated.

1.5.2 and 1.5.3 both output

__VLS_14.slots!["item>
     "];

I expect

__VLS_14.slots!["item.item"];
@johnsoncodehk
Copy link
Member

This seems to be a problem with the template compiler, I fixed a reverse case in the past: vuejs/core#3494

@johnsoncodehk johnsoncodehk added upstream bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first labels Apr 25, 2023
johnsoncodehk added a commit that referenced this issue Apr 25, 2023
@johnsoncodehk
Copy link
Member

Hi, do you expect __VLS_14.slots!["item.item"]; instead of __VLS_14.slots!["item"];?

@KaelWD
Copy link
Author

KaelWD commented Apr 26, 2023

Yes, vue treats slots differently to normal directives. The entire part after v-slot: is the slot name, there's no "modifiers"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first upstream
Projects
None yet
Development

No branches or pull requests

2 participants