diff --git a/src/index.ts b/src/index.ts index 5e6402e00..e3d293a53 100644 --- a/src/index.ts +++ b/src/index.ts @@ -38,7 +38,9 @@ function yn (value: string | undefined) { * Debugging `ts-node`. */ const shouldDebug = yn(process.env.TS_NODE_DEBUG) -const debug = shouldDebug ? console.log.bind(console, 'ts-node') : () => undefined +const debug = shouldDebug ? + (...args: any) => console.log(`[ts-node ${new Date().toISOString()}]`, ...args) + : () => undefined const debugFn = shouldDebug ? (key: string, fn: (arg: T) => U) => { let i = 0