Open SchwarzesWasser opened 1 week ago
Also getting many type errors on v4.2.1 (no problems prior), e.g.:
this.$toast.add({ /* ... */ });
> Property '$toast' does not exist on type 'CreateComponentPublicInstance<...'.
(this.$refs[`toolbarmobilemenu`] as typeof MenuX).toggle(e);
> Property 'toggle' does not exist on type 'DefineComponent<MenuProps, MenuSlots, ((e: "focus", event: Event) => void) & ((e: "blur", event: Event) => void), MenuMethods>'.
(this.$refs[`tablesettings`] as typeof Popover).hide();
> Property 'hide' does not exist on type 'DefineComponent<PopoverProps, PopoverSlots, ((e: "show") => void) & ((e: "hide") => void), PopoverMethods>'.
Describe the bug
Since version 4.1.1, many TS errors have appeared in my project. The example from stackblitz does not output type errors when executing the
npm run type-check
command. But there are a lot of errors in the IDE, for example:And there are quite a lot of such errors in different PrimeVue controls. For example, upload() and choose() methods no longer exist in the FileUpload component in template ref.
Vue: Property upload does not exist on type
.Could there be a problem updating the definition of controls? Everything worked fine before version 4.1.1
Is this a PrimeVue bug or should I work with types in some other way?
Reproducer
https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-23calj?file=src%2FApp.vue
PrimeVue version
4.1.1
Vue version
4.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response