External module "stateful-service"

Index

Functions

ServiceHelper

  • ServiceHelper(): ClassDecorator
  • Classes with ServiceHelper decorator saves constructor's arguments to send them with each called mutation. We need to save constructor arguments to create the same class instance in another window. Caveats:

    • constructor arguments must be able to be serialized
    • constructor must not have side effects

    Returns ClassDecorator

getModule

  • getModule(ModuleContainer: any): Module<any, any>
  • Returns an injectable Vuex module

    Parameters

    • ModuleContainer: any

    Returns Module<any, any>

mutation

  • mutation(options?: object): (Anonymous function)
  • Parameters

    • Default value options: object = { vuexSyncIgnore: false }
      • vuexSyncIgnore: boolean

    Returns (Anonymous function)

registerMutation

  • registerMutation(target: any, methodName: string, descriptor: PropertyDescriptor, options?: object): PropertyDescriptor
  • Parameters

    • target: any
    • methodName: string
    • descriptor: PropertyDescriptor
    • Default value options: object = { vuexSyncIgnore: false }
      • vuexSyncIgnore: boolean

    Returns PropertyDescriptor