Upgrading pinia 0.2 to 0.3
Unknown0.2.5 → 0.3.1
Fetching 2 releases from GitHub…0 / 2
UnknownUpgrade verdict
DepDelta is still reading the notes for this range, so breaking changes can't be ruled out yet.
In plain terms
- DepDelta is still reading the release notes in this range, so it can't rule out breaking changes yet.
- This page updates as the notes come in.
Must act Still reading release notes
DepDelta is still reading the release notes in this range. This updates as they come in.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- added:
property Vue._pStores?: Record<string, GenericStore>
- added:
export { MapStoresCustomization } from './mapHelpers' - added:
export { mapActions } from './mapHelpers' - added:
export { mapGetters } from './mapHelpers' - added:
export { mapState } from './mapHelpers' - added:
export { mapStores } from './mapHelpers' - added:
export { mapWritableState } from './mapHelpers' - added:
export { setMapStoreSuffix } from './mapHelpers'
- added:
const mapGetters: typeof mapState - added:
function mapActions<Id extends string, S extends StateTree, G, A, KeyMapper extends Record<string, keyof A>>(useStore: StoreDefinition<Id, S, G, A>, keyMapper: KeyMapper): MapActionsObjectReturn<A, KeyMapper> - added:
function mapActions<Id extends string, S extends StateTree, G, A>(useStore: StoreDefinition<Id, S, G, A>, keys: Array<keyof A>): MapActionsReturn<A> - added:
function mapState<Id extends string, S extends StateTree, G, A, KeyMapper extends Record<string, keyof S | keyof G | ((store: Store<Id, S, G, A>) => any)>>(useStore: StoreDefinition<Id, S, G, A>, keyMapper: KeyMapper): MapStateObjectReturn<Id, S, G, A, KeyMapper> - added:
function mapState<Id extends string, S extends StateTree, G, A>(useStore: StoreDefinition<Id, S, G, A>, keys: Array<keyof S | keyof G>): MapStateReturn<S, G> - added:
function mapStores<Stores extends GenericStoreDefinition[]>(...stores: [...Stores]): Spread<Stores> - added:
function mapWritableState<Id extends string, S extends StateTree, G, A, KeyMapper extends Record<string, keyof S>>(useStore: StoreDefinition<Id, S, G, A>, keyMapper: KeyMapper): MapWritableStateObjectReturn<S, KeyMapper> - added:
function mapWritableState<Id extends string, S extends StateTree, G, A>(useStore: StoreDefinition<Id, S, G, A>, keys: Array<keyof S>): MapWritableStateReturn<S> - added:
function setMapStoreSuffix(suffix: 'suffix' extends keyof MapStoresCustomization ? MapStoresCustomization['suffix'] : string): void - added:
interface MapStoresCustomization - added:
let mapStoreSuffix: string
- changed:
function defineStore<Id extends string, S extends StateTree, G, A>(options: { id: Id; state?: () => S; getters?: G & ThisType<S & StoreWithGetters<G> & PiniaCustomProperties>; actions?: A & ThisType<A & S & StoreWithState<Id, S> & StoreWithGetters<G> & PiniaCustomProperties> }): (pinia?: Pinia | null | undefined) => Store<Id, S, G, A> → function defineStore<Id extends string, S extends StateTree, G, A>(options: { id: Id; state?: () => S; getters?: G & ThisType<S & StoreWithGetters<G> & PiniaCustomProperties>; actions?: A & ThisType<A & S & StoreWithState<Id, S> & StoreWithGetters<G> & PiniaCustomProperties> }): StoreDefinition<Id, S, G, A>
- added:
call StoreDefinition(pinia?: Pinia | null | undefined): Store<Id, S, G, A> - added:
interface StoreDefinition<Id extends string, S extends StateTree, G, A> - added:
property StoreDefinition.$id: Id - added:
type GenericStoreDefinition = StoreDefinition<string, StateTree, Record<string, Method>, Record<string, Method>>