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

bug: emit cannot correctly recognize external variable key #1570

Open
hairyf opened this issue May 28, 2023 · 1 comment
Open

bug: emit cannot correctly recognize external variable key #1570

hairyf opened this issue May 28, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@hairyf
Copy link

hairyf commented May 28, 2023

<script setup lang="ts">
import { CLICK_EVENT } from '../constants'
const emit = deifneEmits({
  // 'click'
  [CLICK_EVENT ]: : (evt: MouseEvent) => evt instanceof Object
})
</script>

parse:

import { parse } from 'vue-docgen-api'

console.log(await parse('./Button.vue'))

output:

{
  // and did not carry the correct parameters
  events: [ { name: 'CLICK_EVENT' } ],
}
@elevatebart elevatebart added the enhancement New feature or request label Jun 13, 2023
@elevatebart
Copy link
Member

The system should "at least" not recognize the value indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants