Skip to content

Commit dc5d78d

Browse files
committed
refactor: add ServiceOptionsDefaults type
1 parent d343b11 commit dc5d78d

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/service-module/make-service-plugin.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,23 @@ eslint
33
@typescript-eslint/explicit-function-return-type: 0,
44
@typescript-eslint/no-explicit-any: 0
55
*/
6-
import {
7-
FeathersVuexOptions,
8-
MakeServicePluginOptions,
9-
ServiceOptionsDefaults
10-
} from './types'
6+
import { FeathersVuexOptions, MakeServicePluginOptions } from './types'
117
import makeServiceModule from './make-service-module'
128
import { globalModels, prepareAddModel } from './global-models'
139
import { makeNamespace, getServicePath, assignIfNotPresent } from '../utils'
1410
import _get from 'lodash/get'
1511

12+
interface ServiceOptionsDefaults {
13+
servicePath: string
14+
namespace: string
15+
state: {}
16+
getters: {}
17+
mutations: {}
18+
actions: {}
19+
instanceDefaults: () => {}
20+
setupInstance: (instance: {}) => {}
21+
}
22+
1623
const defaults: ServiceOptionsDefaults = {
1724
namespace: '', // The namespace for the Vuex module. Will generally be derived from the service.path, service.name, when available. Otherwise, it must be provided here, explicitly.
1825
servicePath: '',

0 commit comments

Comments
 (0)