Configuration
model
Option | Default | Description |
---|---|---|
withMeta | false | Activates 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
Option | Default | Description |
---|---|---|
provider | Weakcache | Defines which cache provider should be used |
shared | true | Activates the cache to be shared between all repositories |
pinia
Option | Default | Description |
---|---|---|
storeType | optionStore | Defines which store syntax to use. Either optionStore or setupStore |
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
Table of Contents