Skip to content

Using vue-cookie-next breaks vues type augmentation #20

@herrmannplatz

Description

@herrmannplatz

First off all thanks for this great plugin, but the way it augments the $cookie property breaks the rest of my augmented props and the ones from other libraries too.

Switching from:

declare module '@vue/runtime-core' { export interface ComponentCustomProperties { $cookie: IVueCookieNext } }

to

declare module 'vue' { interface ComponentCustomProperties { $cookie: IVueCookieNext } }

does the trick and seems to also conform with the recommended vue way.

https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions