Reimplement scripts with TS

This commit is contained in:
ErickSkrauch
2020-01-17 12:44:22 +03:00
committed by SleepWalker
parent 649e7b8e23
commit 10e8b77acf
11 changed files with 343 additions and 188 deletions

View File

@@ -35,6 +35,9 @@
"whatwg-fetch": "^3.0.0"
},
"devDependencies": {
"@types/debounce": "^1.2.0",
"@types/intl": "^1.2.0",
"@types/raf": "^3.4.0",
"@types/react-helmet": "^5.0.15",
"@types/webpack-env": "^1.15.0",
"enzyme": "^3.8.0",

View File

@@ -3,7 +3,7 @@ import options from 'app/services/api/options';
let readyPromise: Promise<void>;
let lang = 'en';
let sitekey;
let sitekey: string;
export type CaptchaID = string;

View File

@@ -17,16 +17,17 @@ export function hasStorage() {
return _hasStorage;
}
class DummyStorage {
getItem(key) {
// TODO: work on
class DummyStorage implements Storage {
getItem(key: string): string | null {
return this[key] || null;
}
setItem(key, value) {
setItem(key: string, value: string): void {
this[key] = value;
}
removeItem(key) {
removeItem(key: string): void {
Reflect.deleteProperty(this, key);
}
}