deno.land / std@0.224.0 / log / debug.ts
1234567891011121314151617181920212223// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.
import { getLogger } from "./get_logger.ts";import type { GenericFunction } from "./logger.ts";
/** Log with debug level, using default logger. */export function debug<T>(msg: () => T, ...args: unknown[]): T | undefined;export function debug<T>( msg: T extends GenericFunction ? never : T, ...args: unknown[]): T;export function debug<T>( msg: (T extends GenericFunction ? never : T) | (() => T), ...args: unknown[]): T | undefined { // Assist TS compiler with pass-through generic type if (msg instanceof Function) { return getLogger("default").debug(msg, ...args); } return getLogger("default").debug(msg, ...args);}
Version Info