File tree Expand file tree Collapse file tree 5 files changed +9
-7
lines changed Expand file tree Collapse file tree 5 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 16
16
</Page >
17
17
</template >
18
18
19
- <script >
19
+ <script lang="ts" >
20
20
import { mapActions } from ' vuex' ;
21
21
22
22
export default {
Original file line number Diff line number Diff line change 15
15
</Page >
16
16
</template >
17
17
18
- <script >
18
+ <script lang="ts" >
19
19
export default {
20
20
data () {
21
21
return {
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ import VueRouter from 'vue-router';
3
3
4
4
Vue . use ( VueRouter ) ;
5
5
6
- import Home from '../components/Home' ;
7
- import HelloWorld from '../components/HelloWorld' ;
8
- import Counter from '../components/Counter' ;
6
+ import Home from '../components/Home.vue ' ;
7
+ import HelloWorld from '../components/HelloWorld.vue ' ;
8
+ import Counter from '../components/Counter.vue ' ;
9
9
10
10
const router = new VueRouter ( {
11
11
routes : [
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import counter from './modules/counter';
5
5
6
6
Vue . use ( Vuex ) ;
7
7
8
+ declare var process : { env : { [ s : string ] : string } } ;
8
9
const debug = process . env . NODE_ENV !== 'production' ;
9
10
10
11
const store = new Vuex . Store ( {
Original file line number Diff line number Diff line change
1
+ import { MutationTree , ActionTree } from 'vuex'
1
2
const state = {
2
3
count : 0 ,
3
4
} ;
4
5
5
- const mutations = {
6
+ const mutations = < MutationTree < typeof state > > {
6
7
decrement ( state ) {
7
8
state . count -- ;
8
9
} ,
@@ -11,7 +12,7 @@ const mutations = {
11
12
} ,
12
13
} ;
13
14
14
- const actions = {
15
+ const actions = < ActionTree < typeof state , any > > {
15
16
increment : ( { commit} ) => commit ( 'increment' ) ,
16
17
decrement : ( { commit} ) => commit ( 'decrement' ) ,
17
18
} ;
You can’t perform that action at this time.
0 commit comments