Move web_api.js and js/modules/crypto.js to TypeScript
This commit is contained in:
parent
71436d18e2
commit
9ab54b9b83
29 changed files with 770 additions and 427 deletions
|
@ -1,21 +1,9 @@
|
|||
interface ShimmedWindow extends Window {
|
||||
getExpiration: () => string;
|
||||
log: {
|
||||
info: (...args: any) => void;
|
||||
error: (...args: any) => void;
|
||||
};
|
||||
}
|
||||
|
||||
const unknownWindow = window as unknown;
|
||||
const shimmedWindow = unknownWindow as ShimmedWindow;
|
||||
|
||||
// @ts-ignore
|
||||
const env = window.getEnvironment();
|
||||
|
||||
const NINETY_ONE_DAYS = 86400 * 91 * 1000;
|
||||
|
||||
export function hasExpired() {
|
||||
const { getExpiration, log } = shimmedWindow;
|
||||
const { getExpiration, log } = window;
|
||||
|
||||
let buildExpiration = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue