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

Support defineEmits #25

Closed
3 tasks done
so1ve opened this issue Nov 4, 2023 · 5 comments · Fixed by #29 or #31
Closed
3 tasks done

Support defineEmits #25

so1ve opened this issue Nov 4, 2023 · 5 comments · Fixed by #29 or #31
Labels
enhancement New feature or request

Comments

@so1ve
Copy link
Owner

so1ve commented Nov 4, 2023

Clear and concise description of the problem

Suggested solution

Alternative

No response

Additional context

vuejs/core#9541

Validations

@so1ve so1ve added the enhancement New feature or request label Nov 4, 2023
@JounQin
Copy link

JounQin commented Nov 4, 2023

[plugin:unplugin-vue-complex-types] ts.isIntersectionTypeNode is not a function
/Users/JounQin/Workspaces/Outsouring/coin/frontend/src/components/TokenSearchModal.vue
    at Printer.print (file:///Users/JounQin/Workspaces/Outsouring/coin/frontend/node_modules/unplugin-vue-complex-types/dist/index.mjs:220:12)
    at transform (file:///Users/JounQin/Workspaces/Outsouring/coin/frontend/node_modules/unplugin-vue-complex-types/dist/index.mjs:250:31)
    at TransformContext.transform (file:///Users/JounQin/Workspaces/Outsouring/coin/frontend/node_modules/unplugin-vue-complex-types/dist/index.mjs:267:12)
    at Object.transform (file:///Users/JounQin/Workspaces/Outsouring/coin/frontend/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:44345:62)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async loadAndTransform (file:///Users/JounQin/Workspaces/Outsouring/coin/frontend/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:55015:29)
    at async viteTransformMiddleware (file:///Users/JounQin/Workspaces/Outsouring/coin/frontend/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:64417:32
{
  "typescript": "^5.2.2"
}
const emit = defineEmits<{
  activePairChange: [pair: Pair]
  'update:open': [open: boolean]
}>()

@so1ve
Copy link
Owner Author

so1ve commented Nov 5, 2023

@JounQin This looks pretty weird, currently we doesn't process defineEmits at all. Could you please open a new issue with minimal reproduction? Thanks!

#27

@so1ve
Copy link
Owner Author

so1ve commented Nov 5, 2023

@JounQin Just curious: since defineEmits's event argument type doesn't affect runtime, what about we transform it to

defineEmits(['activePairChange', 'update:open'])

?

@JounQin
Copy link

JounQin commented Nov 5, 2023

Thanks for confirming, I think that would work as expected.

Copy link

This issue has been locked since it has been closed for more than 14 days.

If you have found a concrete bug or regression related to it, please open a new issue. If you have any other comments you should create a new discussion.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants