You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Is there a reason why the signature of the emitted method in the wrapper class is limited to primitive types and does not infer possible event names and types of their arguments using it's generic class type argument.
Indeed, in typescript projects, it is much more convenient to have autocompletion for possible events that are declared by a component.
Describe the solution you'd like
Infer possible event names (and types of their arguments) if the component declares the appropriate type annotations.
Describe alternatives you've considered
As a temporary alternative, I created a wrapper over the mount function, which redefines the signature of the emitted function in the returned object using typecast (while its runtime implementation remains the same). I calculate the types based on the signature of the $emit method using the generic Parameters helper.
Additional context
-
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Is there a reason why the signature of the emitted method in the wrapper class is limited to primitive types and does not infer possible event names and types of their arguments using it's generic class type argument.
Indeed, in typescript projects, it is much more convenient to have autocompletion for possible events that are declared by a component.
Describe the solution you'd like
Infer possible event names (and types of their arguments) if the component declares the appropriate type annotations.
Describe alternatives you've considered
As a temporary alternative, I created a wrapper over the mount function, which redefines the signature of the emitted function in the returned object using typecast (while its runtime implementation remains the same). I calculate the types based on the signature of the $emit method using the generic Parameters helper.
Additional context
-
The text was updated successfully, but these errors were encountered: