File tree 3 files changed +6
-31
lines changed
3 files changed +6
-31
lines changed Original file line number Diff line number Diff line change 9
9
"eslint.validate" : [
10
10
" javascript" ,
11
11
{ "language" : " typescript" , "autoFix" : true }
12
- ]
12
+ ],
13
+ "editor.codeActionsOnSave" : {
14
+ "source.fixAll.eslint" : true
15
+ }
13
16
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { createStore } from '../../../src'
2
2
3
3
export const useUserStore = createStore ( 'user' , ( ) => ( {
4
4
name : 'Eduardo' ,
5
- isAdmin : true as boolean ,
5
+ isAdmin : true ,
6
6
} ) )
7
7
8
8
export function logout ( ) {
Original file line number Diff line number Diff line change 1
1
import { Ref } from '@vue/composition-api'
2
2
3
- interface JSONSerializable {
4
- toJSON ( ) : string
5
- }
6
-
7
- export type StateTreeValue =
8
- | string
9
- | symbol
10
- | number
11
- | boolean
12
- | null
13
- | void
14
- | Function
15
- | StateTree
16
- | StateTreeArray
17
- | JSONSerializable
18
-
19
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
20
- export interface StateTree
21
- extends Record < string | number | symbol , StateTreeValue > { }
3
+ export type StateTree = Record < string | number | symbol , any >
22
4
23
5
export function isPlainObject (
24
6
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -32,16 +14,6 @@ export function isPlainObject(
32
14
)
33
15
}
34
16
35
- // symbol is not allowed yet https://github.com/Microsoft/TypeScript/issues/1863
36
- // export interface StateTree {
37
- // [x: number]: StateTreeValue
38
- // [x: symbol]: StateTreeValue
39
- // [x: string]: StateTreeValue
40
- // }
41
-
42
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
43
- interface StateTreeArray extends Array < StateTreeValue > { }
44
-
45
17
export interface StoreGetter < S extends StateTree , T = any > {
46
18
( state : S ) : T
47
19
}
You can’t perform that action at this time.
0 commit comments