Configuration

model

OptionDefaultDescription
withMetafalseActivates the _meta field to be saved for every model
visible[*]Sets default visible fields for every model
hidden[]Sets default hidden fields for every model
namespace''Define a namespace for the store as prefix

cache

OptionDefaultDescription
providerWeakcacheDefines which cache provider should be used
sharedtrueActivates the cache to be shared between all repositories

Typescript Declarations

export interface ModelConfigOptions {
  withMeta?: boolean
  hidden?: string[]
  namespace?: string
  visible?: string[]
}
export interface CacheConfigOptions {
  shared?: boolean
  provider?: typeof WeakCache<string, Model[]>
}
export interface InstallOptions {
  model?: ModelConfigOptions
  cache?: CacheConfigOptions | boolean
}
const options: InstallOptions