Skip to content
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

The type declaration for global property $primevue is not woking in Vue3 #2315

Closed
hsldymq opened this issue Mar 15, 2022 · 1 comment · Fixed by #2316
Closed

The type declaration for global property $primevue is not woking in Vue3 #2315

hsldymq opened this issue Mar 15, 2022 · 1 comment · Fixed by #2316
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@hsldymq
Copy link
Contributor

hsldymq commented Mar 15, 2022

The declaration for $primevue is for Vue 2

// ./src/components/config/PrimeVue.d.ts
declare module 'vue/types/vue' {
    interface Vue {
        $primevue: {
            config: PrimeVueConfiguration;
        }
    }
}

needs to add the following declaration to support Vue 3

declare module '@vue/runtime-core' {
    interface ComponentCustomProperties {
        $primevue: {
            config: PrimeVueConfiguration;
        }
    }
}
@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Mar 15, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.12.2 milestone Mar 15, 2022
@tugcekucukoglu tugcekucukoglu self-assigned this Mar 15, 2022
@tugcekucukoglu
Copy link
Member

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants