Skip to content

Commit 1091ea4

Browse files
committed
rename: SetupContext => ModelSetupContext to avoid name clash with @vue/composition-api SetupContext
1 parent d37514d commit 1091ea4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
FeathersVuexOptions,
2323
HandleEvents,
2424
ModelStatic,
25-
SetupContext
25+
ModelSetupContext
2626
} from './service-module/types'
2727
import { initAuth, hydrateApi } from './utils'
2828
import { FeathersVuex } from './vue-plugin/vue-plugin'
@@ -111,5 +111,5 @@ export {
111111
useFind,
112112
useGet,
113113
ServiceState,
114-
SetupContext
114+
ModelSetupContext
115115
}

src/service-module/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ declare module '..' {
8080
}
8181
}
8282

83-
export interface SetupContext {
83+
export interface ModelSetupContext {
8484
/**
8585
* The global Vuex store
8686
*/
@@ -189,18 +189,18 @@ export interface ModelStatic<D extends {} = {}> extends EventEmitter {
189189
* @param data the instance data
190190
* @param ctx setup context
191191
*/
192-
instanceDefaults(data: Partial<D>, ctx: SetupContext): Partial<D>
192+
instanceDefaults(data: Partial<D>, ctx: ModelSetupContext): Partial<D>
193193

194194
/**
195-
* A new setupinstance class method is now available in version 2.0.
195+
* A new setupInstance class method is now available in version 2.0.
196196
* This method allows you to transform the data and setup the final
197197
* instance based on incoming data. For example, you can access the
198198
* models object to reference other service Model classes and create
199199
* data associations.
200200
* @param data the instance data
201201
* @param ctx setup context
202202
*/
203-
setupInstance(data: Partial<D>, ctx: any): Partial<D>
203+
setupInstance(data: Partial<D>, ctx: ModelSetupContext): Partial<D>
204204

205205
/**
206206
* Gets called just before sending the data to the API server. It gets
@@ -289,7 +289,7 @@ export interface ModelInstance<D extends {} = {}> {
289289
* the update id.
290290
* @param params Params passed to the Feathers client request
291291
*/
292-
update(parms?: Params): Promise<this>
292+
update(params?: Params): Promise<this>
293293
/**
294294
* The save method is a convenience wrapper for the create/patch
295295
* methods, by default. If the records has no _id, the

0 commit comments

Comments
 (0)