Subscribe on changes!

EmitsOptions has different shape requirements on FunctionalComponent<P, E> VS script setup's defineEmits<E>()

avatar
Jul 19th 2021

What problem does this feature solve?

If the E in FunctionalComponent<P, E> is EmitsOptions, and the E in defineEmits() is EmitsOption, why do they have different shapes?

E in FunctionalComponent<P, E> has to be { "event-name": (param: Param) => void }

E in defineEmits() has to be { (event: "event-name", param: Param): void }

What does the proposed API look like?

{ "event-name": (param: Param) => void }

avatar
Jul 19th 2021

Hello, thank you for taking time filling this issue!

However, we kindly ask you to use our Issue Helper when creating new issues, in order to ensure every issue provides the necessary information for us to investigate. This explains why your issue has been automatically closed by me (your robot friend!).

I hope to see your helper-created issue very soon!