Implemented strict mode for the project (broken tests, hundreds of @ts-ignore and new errors are included) [skip ci]

This commit is contained in:
ErickSkrauch
2020-01-17 23:37:52 +03:00
committed by SleepWalker
parent 10e8b77acf
commit 96049ad4ad
151 changed files with 2470 additions and 1869 deletions

View File

@@ -0,0 +1,27 @@
// On page initialization loader is already visible, so initial value is 1
let stack = 1;
export function show(): void {
if (++stack >= 0) {
const loader = document.getElementById('loader');
if (!loader) {
throw new Error('Can not find loader element');
}
loader.classList.add('is-active');
}
}
export function hide(): void {
if (--stack <= 0) {
stack = 0;
const loader = document.getElementById('loader');
if (!loader) {
throw new Error('Can not find loader element');
}
loader.classList.remove('is-active', 'is-first-launch');
}
}