diff --git a/src/app/graph-populate.app.ts b/src/app/graph-populate.app.ts index c4a281e..2b15a09 100644 --- a/src/app/graph-populate.app.ts +++ b/src/app/graph-populate.app.ts @@ -4,18 +4,12 @@ import serviceMixin from './graph-populate.service-mixin' import type { Application } from '@feathersjs/feathers' import type { InitOptions } from '../types' -declare module '@feathersjs/feathers' { - interface Application { - graphPopulate: GraphPopulateApplication - } -} - // eslint-disable-next-line @typescript-eslint/no-unused-vars export function initApp(options?: InitOptions): (app: Application) => void { return (app: Application): void => { const graphPopulate = new GraphPopulateApplication(app) - app.graphPopulate = graphPopulate + ;(app as any).graphPopulate = graphPopulate app.mixins.push(serviceMixin) } diff --git a/src/index.ts b/src/index.ts index 4403421..2445afc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,5 +10,6 @@ export { paramsFromClient } from './hooks/params-from-client.hook' export { definePopulates } from './utils/define-populates' export { initApp as default } from './app/graph-populate.app' +export { type GraphPopulateApplication } from './app/graph-populate.class' export * from './types'