Skip to content

Commit

Permalink
chore: remove more vue 2
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Feb 9, 2025
1 parent b25e381 commit 6f2184b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
19 changes: 1 addition & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions packages/pinia/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/**
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 6f2184b

Please sign in to comment.