const consoleExists = Boolean(window.console);

const logger = {
  info: (message: string) => {
    if (consoleExists) {
      window.console.info(`Canvasimo: ${message}`);
    }
  },
  warn: (message: string) => {
    if (consoleExists) {
      window.console.warn(`Canvasimo: ${message}`);
    }
  },
};

export default logger;

const logger = {
  info: (message: string) => {
    // tslint:disable-next-line:no-console
    // tslint:disable-next-line:strict-type-predicates
    if (console && typeof console.info === 'function') {
      // tslint:disable-next-line:no-console
      console.info(`Canvasimo: ${message}`);
    }
  },
  warn: (message: string) => {
    // tslint:disable-next-line:no-console
    // tslint:disable-next-line:strict-type-predicates
    if (console && typeof console.warn === 'function') {
      // tslint:disable-next-line:no-console
      console.warn(`Canvasimo: ${message}`);
    }
  },
};

export default logger;

--- 
+++ 
@@ -1,18 +1,14 @@
+const consoleExists = Boolean(window.console);
+
 const logger = {
   info: (message: string) => {
-    // tslint:disable-next-line:no-console
-    // tslint:disable-next-line:strict-type-predicates
-    if (console && typeof console.info === 'function') {
-      // tslint:disable-next-line:no-console
-      console.info(`Canvasimo: ${message}`);
+    if (consoleExists) {
+      window.console.info(`Canvasimo: ${message}`);
     }
   },
   warn: (message: string) => {
-    // tslint:disable-next-line:no-console
-    // tslint:disable-next-line:strict-type-predicates
-    if (console && typeof console.warn === 'function') {
-      // tslint:disable-next-line:no-console
-      console.warn(`Canvasimo: ${message}`);
+    if (consoleExists) {
+      window.console.warn(`Canvasimo: ${message}`);
     }
   },
 };
Check for window.console and use this for logs
