Заглушка консоли в TypeScript:
if (!window.console) {
console = {
assert: () => { },
clear: () => { },
count: () => { },
debug: () => { },
dir: () => { },
dirxml: () => { },
error: () => { },
group: () => { },
groupCollapsed: () => { },
groupEnd: () => { },
info: () => { },
log: () => { },
msIsIndependentlyComposed: (e: Element) => false,
profile: () => { },
profileEnd: () => { },
select: () => { },
time: () => { },
timeEnd: () => { },
trace: () => { },
warn: () => { },
}
};