Skip to content

Commit 7818aec

Browse files
vonagamdaffl
authored andcommitted
fix: Typing improvements (#1580)
1 parent 7181268 commit 7818aec

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

packages/authentication-client/src/core.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NotAuthenticated, FeathersError } from '@feathersjs/errors';
2-
import { Application } from '@feathersjs/feathers';
2+
import { Application, Params } from '@feathersjs/feathers';
33
import { AuthenticationRequest, AuthenticationResult } from '@feathersjs/authentication';
44
import { Storage, StorageWrapper } from './storage';
55

@@ -149,12 +149,12 @@ export class AuthenticationClient {
149149
return authPromise;
150150
}
151151

152-
authenticate (authentication: AuthenticationRequest): Promise<AuthenticationResult> {
152+
authenticate (authentication: AuthenticationRequest, params?: Params): Promise<AuthenticationResult> {
153153
if (!authentication) {
154154
return this.reAuthenticate();
155155
}
156156

157-
const promise = this.service.create(authentication)
157+
const promise = this.service.create(authentication, params)
158158
.then((authResult: AuthenticationResult) => {
159159
const { accessToken } = authResult;
160160

packages/primus/index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ declare const configurePrimus: FeathersPrimus;
66
export = configurePrimus;
77

88
interface FeathersPrimus {
9-
(options: any, callback?: (primus: any) => void): () => void;
10-
readonly SOCKET_KEY: unique symbol;
9+
(options?: any, callback?: (primus: any) => void): (app: any) => void;
1110
default: FeathersPrimus;
1211
}

packages/socketio/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ declare const socketio: FeathersSocketIO;
55
export = socketio;
66

77
interface FeathersSocketIO {
8-
(callback?: (io: io.Server) => void): () => void;
9-
(options: number | io.ServerOptions, callback?: (io: io.Server) => void): () => void;
10-
(port: number, options?: io.ServerOptions, callback?: (io: io.Server) => void): () => void;
8+
(callback?: (io: io.Server) => void): (app: any) => void;
9+
(options: number | io.ServerOptions, callback?: (io: io.Server) => void): (app: any) => void;
10+
(port: number, options?: io.ServerOptions, callback?: (io: io.Server) => void): (app: any) => void;
1111
default: FeathersSocketIO;
1212
}

0 commit comments

Comments
 (0)