UNPKG

isa-auth-core

Version:
43 lines (42 loc) 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return _default; } }); const _store = require("../store"); class AuthBaseService { initStore(prevState) { (0, _store.setAuthState)(prevState); (0, _store.setAuthInfo)(null); } getAuthState() { return (0, _store.getAuthState)(); } setAuthState(value) { (0, _store.setAuthState)(value); } getAuthInfo() { return (0, _store.getAuthInfo)(); } setAuthInfo(value) { (0, _store.setAuthInfo)(value); } watchAuthState(callback) { return (0, _store.watchAuthState)(callback); } clearAuthState() { (0, _store.setAuthState)(false); (0, _store.setAuthInfo)(null); } constructor(){ // 초기 상태 등록 this.initStore(false); } } const _default = AuthBaseService; //# sourceMappingURL=baseAuthService.js.map