]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
fix(types): use declare module vue
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 17 May 2023 07:09:07 +0000 (09:09 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 17 May 2023 07:09:11 +0000 (09:09 +0200)
This has been the recommended approach for a while and supports more cases. See https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties for more information

packages/pinia/src/globalExtensions.ts

index 9575fa3d835c76730a689470eaf985cf897b39e2..de568fe5f94adc42e9733e5d3f0ae61c355ddc4a 100644 (file)
@@ -35,7 +35,7 @@ declare module 'vue/types/options' {
 }
 
 // @ts-ignore: works on Vue 3, fails in Vue 2
-declare module '@vue/runtime-core' {
+declare module 'vue' {
   export interface ComponentCustomProperties {
     /**
      * Access to the application's Pinia