Skip to content

Commit 6f2184b

Browse files
committed
chore: remove more vue 2
1 parent b25e381 commit 6f2184b

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

README.md

+1-18
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
- 📦 Extremely light
2424
- ⛰️ Nuxt Module
2525

26-
Pinia works with both Vue 2 and Vue 3.
26+
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.
2727

2828
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.
2929

@@ -130,23 +130,6 @@ app.use(pinia)
130130
app.mount('#app')
131131
```
132132

133-
```js
134-
// Vue 2
135-
import { createPinia, PiniaVuePlugin } from 'pinia'
136-
137-
Vue.use(PiniaVuePlugin)
138-
const pinia = createPinia()
139-
140-
new Vue({
141-
el: '#app',
142-
// other options...
143-
// ...
144-
// note the same `pinia` instance can be used across multiple Vue apps on
145-
// the same page
146-
pinia,
147-
})
148-
```
149-
150133
For more detailed instructions, including [Nuxt configuration](https://pinia.vuejs.org/ssr/nuxt.html#nuxt-js), check the [Documentation](https://pinia.vuejs.org).
151134

152135
### Create a Store

packages/pinia/src/types.ts

-10
Original file line numberDiff line numberDiff line change
@@ -405,14 +405,6 @@ export interface _StoreWithState<
405405
* store is used again, it will reuse the previous state.
406406
*/
407407
$dispose(): void
408-
409-
/**
410-
* Vue 2 only. Is the store ready. Used for store cross usage. Getters automatically compute when they are added to
411-
* the store, before the store is actually ready, this allows to avoid calling the computed function yet.
412-
*
413-
* @internal
414-
*/
415-
_r?: boolean
416408
}
417409

418410
/**
@@ -464,8 +456,6 @@ export type _StoreWithGetters_Writable<G> = {
464456
? K
465457
: // NOTE: there is still no way to have a different type for a setter and a getter in TS with dynamic keys
466458
// https://github.com/microsoft/TypeScript/issues/43826
467-
// NOTE: to support Vue 2.7, we need to use Readonly and not infer the second type param
468-
// https://github.com/vuejs/pinia/issues/2767#issuecomment-2601284366
469459
never]: G[K] extends Readonly<WritableComputedRef<infer R>> ? R : never
470460
}
471461

0 commit comments

Comments
 (0)