From 976f9ff29f67b8b346cbd052e38d861b69c8abba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20R=C3=A4ntil=C3=A4?= Date: Wed, 3 Mar 2021 19:17:43 +0100 Subject: [PATCH] fix(typings): fixed typing to align with TypeScript internals --- lib/core.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/core.ts b/lib/core.ts index 6ea49d7..aff9090 100644 --- a/lib/core.ts +++ b/lib/core.ts @@ -74,7 +74,8 @@ export function logger( ( !promise.__tracedError ? "" - : `[ Stacktrace altered by https://github.com/grantila/trace-unhandled ]\n` + : `[ Stacktrace altered by ` + + `https://github.com/grantila/trace-unhandled ]\n` ) + stack ); @@ -82,7 +83,7 @@ export function logger( const state: { resolve: any; reject: any; } = { resolve: null, reject: null }; -export type PromiseResolver< T > = ( value?: T | PromiseLike< T > ) => void; +export type PromiseResolver< T > = ( value: T | PromiseLike< T > ) => void; export type PromiseRejecter = ( reason?: any ) => void; export type PromiseConstructor< T > =