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

no error on wrong emit callback #517

Closed
andylix opened this issue Sep 22, 2021 · 4 comments
Closed

no error on wrong emit callback #517

andylix opened this issue Sep 22, 2021 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@andylix
Copy link

andylix commented Sep 22, 2021

https://github.com/andylix/volar-emit-type-unknown/tree/wrong-callback

<script lang="ts" setup>
import MyButton from './components/MyButton.vue'

// right callback
function add(param: number) {
  console.log('add', param)
}

// wrong callback
function foo(str: string) {
  console.log(str)
}

</script>

<template>
  <img alt="Vue logo" src="./assets/logo.png" />
  <MyButton
    @add-something="foo"
  ></MyButton>
</template>

I remember that it showed the right error in a previous Volar version, but it doesn't show any error anymore.

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Sep 22, 2021

Emmmm it's fixed. 😅 btw thanks for the repro case :)

@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Sep 22, 2021
@johnsoncodehk
Copy link
Member

johnsoncodehk commented Sep 22, 2021

Duplicate of #516

@johnsoncodehk johnsoncodehk marked this as a duplicate of #516 Sep 22, 2021
@andylix
Copy link
Author

andylix commented Sep 23, 2021

Duplicate of #516

Hi, when will this be installable in VSCode?

@johnsoncodehk
Copy link
Member

I have to resolve #502, #515, #519 in next version, you can package master branch yourself for now:

$ git clone https://github.com/johnsoncodehk/volar.git
$ cd volar
$ yarn && yarn compile
$ cd extensions/vscode-vue-language-features
$ yarn prerelease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants