pinia-plugin-subscription 0.0.0-beta.2 → 0.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,29 @@
1
1
  import type { PiniaPlugin, PiniaPluginContext, Store as PiniaStore, StateTree } from "pinia"
2
2
  import type { PluginSubscriber as PluginSubscriberInterface, PluginSubscription, PluginSubscriptions, StoreOnActionSubscription, StoreMutationSubscription } from "./plugin"
3
- import type { DefineAugmentedStore, PluginStoreOptions, StatePropertyValue, StoreOptions, StoreOptionsPropertyValue } from "./store"
3
+ import { DefineAugmentedStore, PluginStoreOptions, StatePropertyValue, StoreOptions, StoreOptionsPropertyValue } from "./store"
4
4
 
5
5
 
6
6
  declare module 'pinia-plugin-subscription' {
7
- export function createPlugin(subscribers: PluginSubscriberInterface<Store>[], debug?: boolean): PiniaPlugin;
7
+ export function createPlugin(subscribers: PluginSubscriberInterface[], debug?: boolean): PiniaPlugin;
8
8
 
9
9
  export function defineAStore<TStore, TState>(id: string, storeDefinition: () => AnyObject, storeOptions?: StoreOptions): DefineAugmentedStore<TStore, TState>
10
10
 
11
11
  export function isEmpty(value: any): boolean
12
12
 
13
- export abstract class PluginSubscriber<Instance extends Store> implements PluginSubscriberInterface<Instance> {
13
+ export abstract class PluginSubscriber<Instance extends Store> implements PluginSubscriberInterface {
14
14
  public name: string
15
15
  public resetStoreCallback: ((store?: PiniaStore) => void) | undefined
16
16
  public storeOnActionSubscription: StoreOnActionSubscription | undefined
17
17
  public storeMutationSubscription: StoreMutationSubscription | undefined
18
18
  public subscriptions: PluginSubscriptions | undefined
19
19
 
20
- constructor(pluginName: string, createInstanceFunction: (store: PiniaStore, options: AnyObject, debug?: boolean) => Store | undefined)
20
+ constructor(pluginName: string, createInstanceFunction: (store: PiniaStore, options: AnyObject, debug?: boolean) => Instance | undefined)
21
21
 
22
22
  public invoke(context: PiniaPluginContext, debug?: boolean): void
23
23
  }
24
24
 
25
25
  export class Store {
26
- constructor(store: PiniaStore, options: PluginStoreOptions, debug?: boolean)
26
+ constructor(store: PiniaStore, options: AnyObject, debug?: boolean)
27
27
 
28
28
  public debug: boolean
29
29
  public onAction: StoreOnActionSubscription | undefined
@@ -71,4 +71,4 @@ export interface SearchCollectionCriteria {
71
71
  [key: number | string | symbol]: boolean | number | string;
72
72
  }
73
73
  export type { CustomStore, DefineAugmentedStore, PluginStoreOptions, StatePropertyValue, StoreOptions, StoreOptionsPropertyValue } from "./store";
74
- export type { PluginSubscriber } from "./plugin";
74
+ export type { PluginSubscriber as PluginSubscriberInterface } from "./plugin";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Alexandre Bidaud <alexbidaud85@gmail.com> (https://github.com/AlxBDo)",
3
3
  "name": "pinia-plugin-subscription",
4
- "version": "0.0.0-beta.2",
4
+ "version": "0.0.0-beta.3",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {