-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
feat(types): Add Exposed template to SetupContext #13177
base: main
Are you sure you want to change the base?
feat(types): Add Exposed template to SetupContext #13177
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-ssr
@vue/compiler-sfc
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Thanks for the PR! Could you please add test cases for this change in:
This would help verify the type behavior. |
I added a test, but i was able to achieve the goal just partially, the expose keys seem to be typed properly, but the values are not typed at all, do you have any suggestions? |
This PR allows the possibility to type
expose
when usingdefineComponent
with composition apiI added the template wherever it would be needed.
i'm not sure if in
packages/runtime-core/src/componentOptions.ts
at line 142 it's needed as well, as i already see anExposed
template, but doesn't look like having the type for the one inSetupContext
. let me know if everything is fine