diff --git a/packages/adapter-commons/src/index.ts b/packages/adapter-commons/src/index.ts index bfb73448d0..8bc5d58d7f 100644 --- a/packages/adapter-commons/src/index.ts +++ b/packages/adapter-commons/src/index.ts @@ -1,6 +1,6 @@ import { _ } from '@feathersjs/commons'; -export { AdapterService, InternalServiceMethods, ServiceOptions, Paginated } from './service'; +export { AdapterService, InternalServiceMethods, ServiceOptions } from './service'; export { filterQuery, FILTERS, OPERATORS } from './filter-query'; export * from './sort'; diff --git a/packages/adapter-commons/src/service.ts b/packages/adapter-commons/src/service.ts index 4d18d12fe7..5ccdc55f02 100644 --- a/packages/adapter-commons/src/service.ts +++ b/packages/adapter-commons/src/service.ts @@ -1,14 +1,7 @@ import { NotImplemented, BadRequest, MethodNotAllowed } from '@feathersjs/errors'; -import { ServiceMethods, Params, Id, NullableId } from '@feathersjs/feathers'; +import { ServiceMethods, Params, Id, NullableId, Paginated } from '@feathersjs/feathers'; import { filterQuery } from './filter-query'; -export interface Paginated { - total: number; - limit: number; - skip: number; - data: T[]; -} - const callMethod = (self: any, name: any, ...args: any[]) => { if (typeof self[name] !== 'function') { return Promise.reject(new NotImplemented(`Method ${name} not available`)); diff --git a/packages/feathers/src/declarations.ts b/packages/feathers/src/declarations.ts index 523928fb4e..8865f5f5e7 100644 --- a/packages/feathers/src/declarations.ts +++ b/packages/feathers/src/declarations.ts @@ -7,6 +7,13 @@ type OptionalPick = Pick> export type { NextFunction }; +export interface Paginated { + total: number; + limit: number; + skip: number; + data: T[]; +} + export interface ServiceOptions { events?: string[]; methods?: string[];