From 734d5aca355ce6e2f921732d06eeb8d3e0f9248a Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 16 Oct 2020 01:39:19 +0000 Subject: [PATCH] fix(core): update --- test/{test.ts => test.both.ts} | 0 ts/index.ts | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename test/{test.ts => test.both.ts} (100%) diff --git a/test/test.ts b/test/test.both.ts similarity index 100% rename from test/test.ts rename to test/test.both.ts diff --git a/ts/index.ts b/ts/index.ts index a40df85..341d1ad 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -84,11 +84,11 @@ export const map = async (inputArg: T[], functionArg: IAsyncFunction) => { return resultArray; }; -export const timeoutWrap = (ms, promise) => { +export const timeoutWrap = (promiseArg: Promise, timeoutInMs: number) => { return new Promise((resolve, reject) => { setTimeout(() => { reject(new Error('timeout')); - }, ms); - promise.then(resolve, reject); + }, timeoutInMs); + promiseArg.then(resolve, reject); }); };