From a9501acb4d3ef58dfb87d62c57a9bf76569da281 Mon Sep 17 00:00:00 2001 From: David Luecke Date: Thu, 23 Jul 2020 19:14:12 -0700 Subject: [PATCH] fix(typescript): Revert add overload types for `find` service methods (#1972)" (#2025) --- packages/authentication-oauth/src/strategy.ts | 3 +-- packages/feathers/index.d.ts | 16 ---------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/authentication-oauth/src/strategy.ts b/packages/authentication-oauth/src/strategy.ts index 86bdef0b63..1a2358872f 100644 --- a/packages/authentication-oauth/src/strategy.ts +++ b/packages/authentication-oauth/src/strategy.ts @@ -103,8 +103,7 @@ export class OAuthStrategy extends AuthenticationBaseStrategy { ...params, query }); - - const [ entity = null ] = Array.isArray(result) ? result : result.data + const [ entity = null ] = result.data ? result.data : result; debug('findEntity returning', entity); diff --git a/packages/feathers/index.d.ts b/packages/feathers/index.d.ts index 4676a291a8..6972f5ae92 100644 --- a/packages/feathers/index.d.ts +++ b/packages/feathers/index.d.ts @@ -210,22 +210,6 @@ declare namespace createApplication { } interface ServiceOverloads { - /** - * Retrieve all resources from this service. - * - * @param params - Service call parameters {@link Params} - * @see {@link https://docs.feathersjs.com/api/services.html#find-params|Feathers API Documentation: .find(params)} - */ - find? (params: Params & { paginate: false}): Promise - - /** - * Retrieve all resources from this service. - * - * @param params - Service call parameters {@link Params} - * @see {@link https://docs.feathersjs.com/api/services.html#find-params|Feathers API Documentation: .find(params)} - */ - find? (params?: Params): Promise> - /** * Create a new resource for this service. *