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

use kebab in defineSlot will lose ts-check #3819

Closed
Kanade-Lu opened this issue Dec 22, 2023 · 4 comments · Fixed by #4478
Closed

use kebab in defineSlot will lose ts-check #3819

Kanade-Lu opened this issue Dec 22, 2023 · 4 comments · Fixed by #4478
Labels
bug Something isn't working upstream

Comments

@Kanade-Lu
Copy link

Vue version

3.3.11

Link to minimal reproduction

https://play.vuejs.org/#eNqNVE1PGzEQ/StT9xCQ2F1V3NJNRIs40ENbFY6+bNaTxNRfsr0hFcp/79gmsIkI4rJ69jzPm3nr8RP75ly9GZBNWRt6L12EgHFwc26kdtZHuLbawdJbDZO6SYtEn3zlhpvemhCBvku5ghk8cQPQTWHSTS4SXBBcFNgT7AsUBEWCO27apmiSGi0iaqe6iLQCaLPutCSfcVYAZzlI4T0ZPqsuxKq3atAmzNvmIMtJYhfEmEu8T1UFYW0HJWCBgN5bD1BVb6e5/qDcM+9ILVPbbCbhUYBdsBhKp/VDsIb+SjY1ta+dVOh/uSjJdc6mxe4U65Syjz/yXvQDZpfzmTX2f9/YfwjbtMfZb48B/QY5e4nFzq8wlvDN3U/cEn4JaisGRex3gn8wUMupxkL7PhhBZY94udrbfLekWd2Hm21EE/ZNpUITc5f5nNFdSzadav213Mv6Mp+je0Uulrtb6c4d+VgCh0lIoxS7jtGFadP0wtAxgUpufG0wNsbp5opojR9MlBorYfUVKdZfLhshQxzv1xh0tfD2kaytnbeCUo3aT1my6b7yaAT6ZM7HxI+OHRRwFDsoIumPvNnP8GjkVWfSjCVfyvjDCg162dPmfZ45buI/h3B7p2wMNOvFPc7GM5X6OKOOqQ0I0dPfPYfZHDZWilfy80QQ9ySV6hS4lAazWFs052fn+ZF458UQcpNAxuRKWhwMHdv9B6sRqAc=

Steps to reproduce

Comp.vue

type ISlots =  {
  "last-columns": (props: string) => void
  "lastColumns":(props: string) => void
}
defineSlots<ISlots>()

App.vue

  <Comp :config="config">
    <template #last-columns></template>
    <template #last-columnsasd></template>  <!-- should be error  -->
    <template #lastColumns></template>
    <template #lastColumnsasd></template>
   </Comp>

What is expected?

use kebab in defineSlot should check slot name error

What is actually happening?

use kebab in defineSlot lose slot name check

System Info

No response

Any additional comments?

No response

@baiwusanyu-c
Copy link
Member

cc/ @so1ve

@so1ve
Copy link
Member

so1ve commented Dec 22, 2023

Could you please transfer this issue to vuejs/language-tools?

@LinusBorg LinusBorg transferred this issue from vuejs/core Dec 22, 2023
@Kanade-Lu
Copy link
Author

This issue appears to have been forgotten. Does this behavior meet expectations?

@KermanX
Copy link
Collaborator

KermanX commented Jun 17, 2024

This seems to be a TypeScript bug/limitation:

TypeScript Playground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
5 participants