championswimmer / vuex-persist

A Vuex plugin to persist the store. (Fully Typescript enabled)
http://championswimmer.in/vuex-persist
MIT License
1.67k stars 116 forks source link

Where is the State type defined? #126

Open c0dezli opened 5 years ago

c0dezli commented 5 years ago

In the document you stated

import Vue from 'vue'
import Vuex from 'vuex'
import VuexPersistence from 'vuex-persist'

Vue.use(Vuex)

const store = new Vuex.Store<State>({
  state: {
    user: { name: 'Arnav' },
    navigation: { path: '/home' }
  },
  plugins: [new VuexPersistence().plugin]
})

export default store

where I can see new Vuex.Store<State>

But where is the State defined? No one mentioned it

ChuckFields commented 5 years ago

@C0deZLee Take a look at the detailed example. You'll see where State is defined. Keep in mind that this is in TypeScript.