diff --git a/packages/authentication-client/src/index.ts b/packages/authentication-client/src/index.ts index ecf0f0f1b2..f6650418da 100644 --- a/packages/authentication-client/src/index.ts +++ b/packages/authentication-client/src/index.ts @@ -5,7 +5,7 @@ import { AuthenticationResult, AuthenticationRequest } from '@feathersjs/authent import { Storage, MemoryStorage, StorageWrapper } from './storage'; declare module '@feathersjs/feathers' { - interface Application { + interface Application { io?: any; rest?: any; primus?: any; diff --git a/packages/authentication/test/jwt.test.ts b/packages/authentication/test/jwt.test.ts index 2e2c6b052e..8761644e25 100644 --- a/packages/authentication/test/jwt.test.ts +++ b/packages/authentication/test/jwt.test.ts @@ -14,7 +14,8 @@ const { authenticate } = hooks; describe('authentication/jwt', () => { let app: Application<{ authentication: AuthenticationService & Service, - users: Service + users: Service, + protected: Service }>; let user: any; let accessToken: string; diff --git a/packages/feathers/index.d.ts b/packages/feathers/index.d.ts index 46bd95a6e1..676b94521d 100644 --- a/packages/feathers/index.d.ts +++ b/packages/feathers/index.d.ts @@ -178,10 +178,10 @@ declare namespace createApplication { type ServiceMixin = (service: Service, path: string) => void; - interface Application extends EventEmitter { + interface Application extends EventEmitter { version: string; - services: ServiceTypes; + services: keyof ServiceTypes extends never ? any : ServiceTypes; mixins: ServiceMixin[]; @@ -207,7 +207,7 @@ declare namespace createApplication { service (location: L): ServiceTypes[L]; - service (location: string): Service; + service (location: string): keyof ServiceTypes extends never ? any : never; use (path: string, service: Partial & SetupMethod> | Application, options?: any): this;