File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ import {
22
22
FeathersVuexOptions ,
23
23
HandleEvents ,
24
24
ModelStatic ,
25
- ModelSetupContext
25
+ ModelSetupContext ,
26
+ Model ,
27
+ ModelClone
26
28
} from './service-module/types'
27
29
import { initAuth , hydrateApi } from './utils'
28
30
import { FeathersVuex } from './vue-plugin/vue-plugin'
@@ -54,10 +56,7 @@ declare module 'vue' {
54
56
}
55
57
}
56
58
57
- export default function feathersVuex < DefaultBaseModelType = { } > (
58
- feathers ,
59
- options : FeathersVuexOptions
60
- ) {
59
+ export default function feathersVuex ( feathers , options : FeathersVuexOptions ) {
61
60
if ( ! feathers || ! feathers . service ) {
62
61
throw new Error (
63
62
'The first argument to feathersVuex must be a feathers client.'
@@ -86,8 +85,8 @@ export default function feathersVuex<DefaultBaseModelType = {}>(
86
85
87
86
return {
88
87
makeServicePlugin,
89
- BaseModel : BaseModel as ModelStatic < DefaultBaseModelType > ,
90
- castBaseModel : < T > ( ) => BaseModel as ModelStatic < T > ,
88
+ BaseModel : BaseModel as ModelStatic ,
89
+ castBaseModel : < T extends { } = { } > ( ) => BaseModel as ModelStatic < T > ,
91
90
makeAuthPlugin,
92
91
FeathersVuex,
93
92
models,
@@ -110,6 +109,9 @@ export {
110
109
clients ,
111
110
useFind ,
112
111
useGet ,
112
+ Model ,
113
+ ModelClone ,
114
+ ModelStatic ,
113
115
ServiceState ,
114
116
ModelSetupContext
115
117
}
Original file line number Diff line number Diff line change @@ -115,12 +115,12 @@ export interface ModelInstanceOptions {
115
115
/**
116
116
* FeathersVuex Model with readonly data props
117
117
*/
118
- type Model < D extends { } = { } > = ModelInstance < D > & Readonly < D >
118
+ export type Model < D extends { } = { } > = ModelInstance < D > & Readonly < D >
119
119
120
120
/**
121
121
* FeathersVuex Model clone with writeable data props
122
122
*/
123
- type ModelClone < D extends { } = { } > = ModelInstanceClone < D > & D
123
+ export type ModelClone < D extends { } = { } > = ModelInstanceClone < D > & D
124
124
125
125
/** Static Model interface */
126
126
export interface ModelStatic < D extends { } = { } > extends EventEmitter {
You can’t perform that action at this time.
0 commit comments