summaryrefslogtreecommitdiff
path: root/std/log/mod.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-08-25 09:43:54 +1000
committerGitHub <noreply@github.com>2020-08-24 19:43:54 -0400
commitc4d5b01acfe0cac31f94743a57e8e619178ba563 (patch)
tree1987fe2e23c4db59a44159f4c7d21ecc61be4ad3 /std/log/mod.ts
parent9b0f9c876529696c8008dda8b3606e34d3fe98dc (diff)
feat: update to TypeScript 4.0 (#6514)
Diffstat (limited to 'std/log/mod.ts')
-rw-r--r--std/log/mod.ts21
1 files changed, 11 insertions, 10 deletions
diff --git a/std/log/mod.ts b/std/log/mod.ts
index 10feb04b1..512de534b 100644
--- a/std/log/mod.ts
+++ b/std/log/mod.ts
@@ -1,5 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { Logger } from "./logger.ts";
+import type { GenericFunction } from "./logger.ts";
import {
BaseHandler,
ConsoleHandler,
@@ -76,11 +77,11 @@ export function getLogger(name?: string): Logger {
export function debug<T>(msg: () => T, ...args: unknown[]): T | undefined;
export function debug<T>(
- msg: T extends Function ? never : T,
+ msg: T extends GenericFunction ? never : T,
...args: unknown[]
): T;
export function debug<T>(
- msg: (T extends Function ? never : T) | (() => T),
+ msg: (T extends GenericFunction ? never : T) | (() => T),
...args: unknown[]
): T | undefined {
// Assist TS compiler with pass-through generic type
@@ -92,11 +93,11 @@ export function debug<T>(
export function info<T>(msg: () => T, ...args: unknown[]): T | undefined;
export function info<T>(
- msg: T extends Function ? never : T,
+ msg: T extends GenericFunction ? never : T,
...args: unknown[]
): T;
export function info<T>(
- msg: (T extends Function ? never : T) | (() => T),
+ msg: (T extends GenericFunction ? never : T) | (() => T),
...args: unknown[]
): T | undefined {
// Assist TS compiler with pass-through generic type
@@ -108,11 +109,11 @@ export function info<T>(
export function warning<T>(msg: () => T, ...args: unknown[]): T | undefined;
export function warning<T>(
- msg: T extends Function ? never : T,
+ msg: T extends GenericFunction ? never : T,
...args: unknown[]
): T;
export function warning<T>(
- msg: (T extends Function ? never : T) | (() => T),
+ msg: (T extends GenericFunction ? never : T) | (() => T),
...args: unknown[]
): T | undefined {
// Assist TS compiler with pass-through generic type
@@ -124,11 +125,11 @@ export function warning<T>(
export function error<T>(msg: () => T, ...args: unknown[]): T | undefined;
export function error<T>(
- msg: T extends Function ? never : T,
+ msg: T extends GenericFunction ? never : T,
...args: unknown[]
): T;
export function error<T>(
- msg: (T extends Function ? never : T) | (() => T),
+ msg: (T extends GenericFunction ? never : T) | (() => T),
...args: unknown[]
): T | undefined {
// Assist TS compiler with pass-through generic type
@@ -140,11 +141,11 @@ export function error<T>(
export function critical<T>(msg: () => T, ...args: unknown[]): T | undefined;
export function critical<T>(
- msg: T extends Function ? never : T,
+ msg: T extends GenericFunction ? never : T,
...args: unknown[]
): T;
export function critical<T>(
- msg: (T extends Function ? never : T) | (() => T),
+ msg: (T extends GenericFunction ? never : T) | (() => T),
...args: unknown[]
): T | undefined {
// Assist TS compiler with pass-through generic type