Configure TypeScript for global loglevel usage
mainIf you are using TypeScript and want to use loglevel as a global variable, you must declare it manually.
- Create a
loglevel.d.tsfile. - Ensure the file is included in your build (via
tsconfig.jsoninclude, command line, or a triple-slash reference). - Add the following content to
loglevel.d.ts:
import * as log from 'loglevel';
export as namespace log;
export = log;