Skip to content

Commit

Permalink
fix: Typing improvements (#1580)
Browse files Browse the repository at this point in the history
  • Loading branch information
vonagam authored and daffl committed Sep 25, 2019
1 parent 7181268 commit 7818aec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/authentication-client/src/core.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NotAuthenticated, FeathersError } from '@feathersjs/errors';
import { Application } from '@feathersjs/feathers';
import { Application, Params } from '@feathersjs/feathers';
import { AuthenticationRequest, AuthenticationResult } from '@feathersjs/authentication';
import { Storage, StorageWrapper } from './storage';

Expand Down Expand Up @@ -149,12 +149,12 @@ export class AuthenticationClient {
return authPromise;
}

authenticate (authentication: AuthenticationRequest): Promise<AuthenticationResult> {
authenticate (authentication: AuthenticationRequest, params?: Params): Promise<AuthenticationResult> {
if (!authentication) {
return this.reAuthenticate();
}

const promise = this.service.create(authentication)
const promise = this.service.create(authentication, params)
.then((authResult: AuthenticationResult) => {
const { accessToken } = authResult;

Expand Down
3 changes: 1 addition & 2 deletions packages/primus/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ declare const configurePrimus: FeathersPrimus;
export = configurePrimus;

interface FeathersPrimus {
(options: any, callback?: (primus: any) => void): () => void;
readonly SOCKET_KEY: unique symbol;
(options?: any, callback?: (primus: any) => void): (app: any) => void;
default: FeathersPrimus;
}
6 changes: 3 additions & 3 deletions packages/socketio/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ declare const socketio: FeathersSocketIO;
export = socketio;

interface FeathersSocketIO {
(callback?: (io: io.Server) => void): () => void;
(options: number | io.ServerOptions, callback?: (io: io.Server) => void): () => void;
(port: number, options?: io.ServerOptions, callback?: (io: io.Server) => void): () => void;
(callback?: (io: io.Server) => void): (app: any) => void;
(options: number | io.ServerOptions, callback?: (io: io.Server) => void): (app: any) => void;
(port: number, options?: io.ServerOptions, callback?: (io: io.Server) => void): (app: any) => void;
default: FeathersSocketIO;
}

0 comments on commit 7818aec

Please sign in to comment.