]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
chore: remove more vue 2
authorEduardo San Martin Morote <posva13@gmail.com>
Sun, 9 Feb 2025 21:34:29 +0000 (22:34 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Sun, 9 Feb 2025 21:34:31 +0000 (22:34 +0100)
README.md
packages/pinia/src/types.ts

index 39470299cc7ca84d448d4783cf15ed14521765ec..801167e8bbe2202b57700141534ca0032ec67421 100644 (file)
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@
 - 📦 Extremely light
 - ⛰️ Nuxt Module
 
-Pinia works with both Vue 2 and Vue 3.
+The latest version of pinia works with Vue 3. See the branch [v2](https://github.com/vuejs/pinia/tree/v2) for a version that works with Vue 2.
 
 Pinia is the most similar English pronunciation of the word _pineapple_ in Spanish: _piña_. A pineapple is in reality a group of individual flowers that join together to create a multiple fruit. Similar to stores, each one is born individually, but they are all connected at the end. It's also a delicious tropical fruit indigenous to South America.
 
@@ -130,23 +130,6 @@ app.use(pinia)
 app.mount('#app')
 ```
 
-```js
-// Vue 2
-import { createPinia, PiniaVuePlugin } from 'pinia'
-
-Vue.use(PiniaVuePlugin)
-const pinia = createPinia()
-
-new Vue({
-  el: '#app',
-  // other options...
-  // ...
-  // note the same `pinia` instance can be used across multiple Vue apps on
-  // the same page
-  pinia,
-})
-```
-
 For more detailed instructions, including [Nuxt configuration](https://pinia.vuejs.org/ssr/nuxt.html#nuxt-js), check the [Documentation](https://pinia.vuejs.org).
 
 ### Create a Store
index 37054ac656c4dfaa66094ba1fd17e4e1c8bd90cb..97651e9922c0ec8ec1eb6657715e8bfb4e1cc1c2 100644 (file)
@@ -405,14 +405,6 @@ export interface _StoreWithState<
    * store is used again, it will reuse the previous state.
    */
   $dispose(): void
-
-  /**
-   * Vue 2 only. Is the store ready. Used for store cross usage. Getters automatically compute when they are added to
-   * the store, before the store is actually ready, this allows to avoid calling the computed function yet.
-   *
-   * @internal
-   */
-  _r?: boolean
 }
 
 /**
@@ -464,8 +456,6 @@ export type _StoreWithGetters_Writable<G> = {
     ? K
     : // NOTE: there is still no way to have a different type for a setter and a getter in TS with dynamic keys
       // https://github.com/microsoft/TypeScript/issues/43826
-      // NOTE: to support Vue 2.7, we need to use Readonly and not infer the second type param
-      // https://github.com/vuejs/pinia/issues/2767#issuecomment-2601284366
       never]: G[K] extends Readonly<WritableComputedRef<infer R>> ? R : never
 }