TypeScript decorators (v2.0.3) for Vuex ORM v0.36, providing typed property access and auto-registration of models via the ORMDatabase plugin. Superseded by Vuex ORM Next; Vuex itself is deprecated in favor of Pinia. Ships TypeScript declarations, targets es2015, and is compatible with Vue 2/Vuex 3 and Vue 3/Vuex 4. Requires manual transpile for es5 targets and Nuxt.js projects.
npm install vuex-orm-decoratorsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows auto-registration of a Vuex ORM model using decorators and ORMDatabase plugin.
Migrate to @vuex-orm/plugin or Pinia; see https://next.vuex-orm.org
Consider using Pinia for state management.
Pin @vuex-orm/core to ^0.36.1 in package.json.
Add 'declare' before property name: @Fields(...) declare name: string;
Manually register models using Vuex ORM's Database plugin.
In vue.config.js: transpileDependencies: ['vuex-orm-decorators']
Ensure package is installed with --save-dev (types included). Set 'moduleResolution' to 'node'.
Add 'experimentalDecorators': true and 'importHelpers': true to tsconfig.json.
Install and call Vue.use(Vuex) before creating the store.
Import the model file to trigger auto-registration, or use ORMDatabase.install().