Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
feat: #4 reduce any types
Browse files Browse the repository at this point in the history
  • Loading branch information
pamapa committed Oct 6, 2021
1 parent 09dd77b commit 312b341
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/StateStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface StateStore {
set(key: string, value: any): Promise<void>;
get(key: string): Promise<any>;
remove(key: string): Promise<any>;
set(key: string, value: string): Promise<void>;
get(key: string): Promise<string | null>;
remove(key: string): Promise<string | null>;
getAllKeys(): Promise<string[]>;
}
2 changes: 1 addition & 1 deletion src/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface UserProfile {
sid?: string;
azp?: string;
at_hash?: string;
auth_time?: any;
auth_time?: number;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/navigators/IFrameWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class IFrameWindow implements IWindow {
return await this._promise;
}

protected _success(data: any): void {
protected _success(data: NavigateResponse): void {
this._cleanup();

Log.debug("IFrameWindow: Successful response from frame window");
Expand Down Expand Up @@ -92,7 +92,7 @@ export class IFrameWindow implements IWindow {
this._error("Frame window timed out");
}

protected _message = (e: any): void => {
protected _message = (e: MessageEvent): void => {
Log.debug("IFrameWindow.message");

const origin = location.protocol + "//" + location.host;
Expand Down
12 changes: 6 additions & 6 deletions src/navigators/PopupWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export class PopupWindow implements IWindow {
return await this._promise;
}

_messageReceived = (event: MessageEvent): void => {
protected _messageReceived = (event: MessageEvent): void => {
if (event.origin !== window.location.origin) {
Log.warn("PopupWindow:messageRecieved: Message not coming from same origin: " + event.origin);
Log.warn("PopupWindow:_messageReceived: Message not coming from same origin: " + event.origin);
return;
}

Expand All @@ -73,19 +73,19 @@ export class PopupWindow implements IWindow {
// @ts-ignore
const callback = window["popupCallback_" + data.state];
if (callback) {
Log.debug("PopupWindow.notifyOpener: passing url message to opener");
Log.debug("PopupWindow._messageReceived: passing url message to opener");
callback(url, keepOpen);
}
else {
Log.warn("PopupWindow.notifyOpener: no matching callback found on opener");
Log.warn("PopupWindow._messageReceived: no matching callback found on opener");
}
}
else {
Log.warn("PopupWindow.notifyOpener: no state found in response url");
Log.warn("PopupWindow._messageReceived: no state found in response url");
}
}

protected _success(data: any): void {
protected _success(data: NavigateResponse): void {
Log.debug("PopupWindow.callback: Successful response from popup window");

this._cleanup();
Expand Down
2 changes: 1 addition & 1 deletion src/utils/JoseUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface JwtPayload {
exp?: number;
sub?: string;
nonce?: string;
auth_time?: any;
auth_time?: number;
}

export class JoseUtil {
Expand Down

0 comments on commit 312b341

Please sign in to comment.