migrate to typescript, with fixes

This commit is contained in:
2020-01-14 16:37:50 +08:00
parent 3d375261df
commit f06a6f4e78
32 changed files with 5071 additions and 394 deletions

15
src/background/caches.ts Normal file
View File

@ -0,0 +1,15 @@
import { logger } from "./common";
export class Caches {
private _state: string = "";
constructor() { }
get state(): string {
let s = this._state;
this._state = "";
return s;
}
setState(name: string, content: string) {
this._state = content;
logger.info(`State (${name}) recieved. To load it: some_var = new Extractor().load()`);
}
}