Skip to content

Commit 8c9ee93

Browse files
committed
Don't rely on debug modules typings
This caused type errors for any project that didn't also depend on the debug module or its typings.
1 parent 888f8ee commit 8c9ee93

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/logger.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
/* tslint:disable:no-console */
2-
import { IDebugger } from 'debug'
3-
const debugFactory = require('debug')
2+
interface IDebugger {
3+
(formatter: any, ...args: any[]): void;
4+
enabled: boolean;
5+
log: Function;
6+
namespace: string;
7+
}
48

5-
export const debug : IDebugger = debugFactory('jsorm')
9+
export const debug : IDebugger = require('debug')('jsorm')
610

711
export enum LogLevel {
812
debug = 1,

0 commit comments

Comments
 (0)