Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9k
types(defineComponent): Support for GlobalComponents, typed Directives and respectexpose on defineComponent#3399
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
johnsoncodehk commentedMar 9, 2021
Thanks for this update, custom directives IntelliSense and Type-Checking is coming! We also need |
HcySunYang commentedMar 10, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@johnsoncodehk Edit: After reviewing the code, I think it can be implemented in this PR if possible |
Uh oh!
There was an error while loading.Please reload this page.
pikax commentedMar 10, 2021
Maybe a better name would be good, any suggestions? |
HcySunYang commentedMar 10, 2021
|
johnsoncodehk commentedMar 11, 2021
Look good, but inconsistent... declare module'vue'{interfaceComponentCustomOptions{}interfaceComponentCustomProperties{}interfaceGlobalComponents{}interfaceGlobalDirectives{}} |
pikax commentedMar 11, 2021
It looks inconsistent but they mean different things
As you can see they usually mean different things, altho the Components/Directives are used on the components, they are not enhancing the component interaction, but to provide enhancement to the render. I mean this is my logic on the naming, might be incorrect 😄 Having |
HcySunYang commentedMar 11, 2021
yeah, they are different. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
# Conflicts:#packages/dts-test/defineComponent.test-d.tsx#packages/runtime-core/src/apiDefineComponent.ts#packages/runtime-core/src/componentPublicInstance.ts
pikax commentedNov 22, 2023
/ecosystem-ci run |
This comment was marked as outdated.
This comment was marked as outdated.
# Conflicts:#packages/dts-test/appUse.test-d.ts#packages/dts-test/defineComponent.test-d.tsx#packages/runtime-core/src/apiCreateApp.ts#packages/runtime-core/src/apiDefineComponent.ts#packages/runtime-core/src/componentOptions.ts#packages/runtime-core/src/componentPublicInstance.ts#packages/runtime-core/src/directives.ts#packages/runtime-core/src/index.ts#packages/runtime-dom/src/directives/vModel.ts#packages/runtime-dom/src/directives/vOn.ts#packages/runtime-dom/src/index.ts
matthew-dean commentedJan 26, 2024
Can this be merged? |
matthew-dean commentedJan 29, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Note, one thing I figured out you can do is simply use TypeScript's <divv-popover="{ html:true, title:vm.tooltipTitle(), placement:'right', trigger:'click', content:vm.tooltipContent() }satisfiesPopoverOptions"></div> Volar's code syntax coloring of It would be great if there was an ESLint plugin then to force / enforce the use of |
expose on defineComponentpikax commentedApr 17, 2024
/ecosystem-ci run |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
vue-bot commentedApr 25, 2024
📝 Ran ecosystem CI:Open
|
unplugin-vue-components now generates this file.See:-vuejs/core#3399
Uh oh!
There was an error while loading.Please reload this page.
fix#3367
Changes
Components- to allow extraction of the components availableDirectivesandComponentCustomDirectives(aka global directives)exposed- this is a bit different from the actual implementation, this types will allow the exposed vue internal component typesDirectivetype, allowing to specify the modifiers and the expected argument.Directive usage
Now
Directiveswill hold more types to help the extensions: