From e4f463a7230315d0fdde557e244496a2961712f7 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Fri, 17 Feb 2023 11:10:56 +0800 Subject: [PATCH] =?UTF-8?q?ignore=20typescript=20=E2=89=A5=204.1=20regress?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug-Debian: https://bugs.debian.org/975794 Forwarded: no Last-Update: 2021-10-27 Gbp-Pq: Name fix-typescript.patch --- src/promisify.ts | 1 + test/test.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/promisify.ts b/src/promisify.ts index 60cc662..3350ff9 100644 --- a/src/promisify.ts +++ b/src/promisify.ts @@ -24,6 +24,7 @@ export default function promisify(fn: LegacyCallback): AgentCallbackPromise { if (err) { reject(err); } else { + // @ts-ignore resolve(rtn); } } diff --git a/test/test.ts b/test/test.ts index 7c975de..5a5c808 100644 --- a/test/test.ts +++ b/test/test.ts @@ -250,6 +250,7 @@ describe('Agent (TypeScript)', () => { await req({ agent, ...info }); } catch (err) { gotError = true; +// @ts-ignore assert.equal(err.message, 'bad'); } @@ -277,6 +278,7 @@ describe('Agent (TypeScript)', () => { await req({ agent, ...info }); } catch (err) { gotError = true; +// @ts-ignore assert.equal(err.message, 'bad'); }