Skip to content

Commit

Permalink
fix(typescript): Revert add overload types for find service methods (
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Jul 24, 2020
1 parent c838d8b commit a9501ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
3 changes: 1 addition & 2 deletions packages/authentication-oauth/src/strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
16 changes: 0 additions & 16 deletions packages/feathers/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,22 +210,6 @@ declare namespace createApplication {
}

interface ServiceOverloads<T> {
/**
* 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<T[]>

/**
* 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<Paginated<T>>

/**
* Create a new resource for this service.
*
Expand Down

0 comments on commit a9501ac

Please sign in to comment.