Skip to content

Commit

Permalink
npm run format
Browse files Browse the repository at this point in the history
  • Loading branch information
MeenaAlfons committed Dec 1, 2023
1 parent 6fe1ce6 commit 0a788cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/core/auth/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ export interface InternalAuthOptions {

export type CustomAuthOptions<AuthHandler> = {
customHandler: AuthHandler;
}
};

export type AuthOptionsT<AuthHandler> = InternalAuthOptions | CustomAuthOptions<AuthHandler>
export type AuthOptionsT<AuthHandler> =
| InternalAuthOptions
| CustomAuthOptions<AuthHandler>;

export declare type UserAuthenticationOptions = AuthOptionsT<
UserAuthenticationHandler
Expand Down
10 changes: 6 additions & 4 deletions src/core/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ function getEnableStatsConfig(opts: Options): boolean {
return false;
}

const hasCustomHandler = <T>(auth: AuthOptionsT<T>): auth is CustomAuthOptions<T> => {
return 'customHandler' in auth && auth['customHandler'] != null;
}
const hasCustomHandler = <T>(
auth: AuthOptionsT<T>
): auth is CustomAuthOptions<T> => {
return 'customHandler' in auth && auth['customHandler'] != null;
};

function buildUserAuthenticator(opts: Options): UserAuthenticationHandler {
const userAuthentication = {
Expand Down Expand Up @@ -176,7 +178,7 @@ function buildChannelAuth(opts: Options, pusher): ChannelAuthorizationOptions {
channelAuthorization,
opts.authorizer
)
}
};
}
}
return channelAuthorization;
Expand Down

0 comments on commit 0a788cc

Please sign in to comment.