"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var storage = window.localStorage;
var Storage = /** @class */ (function () {
    function Storage() {
    }
    Storage.prototype.setBool = function (type, value) {
        this.set(type, value ? 'true' : 'false');
    };
    Storage.prototype.getBool = function (type) {
        var str = this.get(type);
        if (str == 'true') {
            return true;
        }
        else if (str == 'false') {
            return false;
        }
        return null;
    };
    Storage.prototype.getNumber = function (type) {
        var str = this.get(type);
        return parseInt(str);
    };
    Storage.prototype.get = function (type) {
        if (storage.hasOwnProperty(type)) {
            return storage.getItem(type);
        }
        // console.warn(`没有配置:${type}`)
        return '';
    };
    Storage.prototype.set = function (type, value) {
        storage.setItem(type, value);
    };
    return Storage;
}());
exports.default = new Storage();
