import Vue from 'vue' type consoleFuncs = keyof Console function emptyConsoleFunctions (): void { // eslint-disable-next-line @typescript-eslint/no-empty-function const noop = (): void => {} const methods: consoleFuncs[] = [ 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn' ] let length: number = methods.length const console = window.console while (length-- >= 0) { const key: consoleFuncs = methods[length] console[key] = noop } }