From bbcdf1bb8a305bfd8d74150024c33cdaabe950fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Thu, 31 Jan 2019 17:52:27 +0900 Subject: [PATCH] Create type definition for 'promise-any' (#4055) --- src/@types/promise-any.d.ts | 7 +++++++ src/remote/activitypub/request.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 src/@types/promise-any.d.ts diff --git a/src/@types/promise-any.d.ts b/src/@types/promise-any.d.ts new file mode 100644 index 000000000..97060b84b --- /dev/null +++ b/src/@types/promise-any.d.ts @@ -0,0 +1,7 @@ +declare module 'promise-any' { + function promiseAny(iterable: Iterable>): Promise; + + namespace promiseAny {} // Hack + + export = promiseAny; +} diff --git a/src/remote/activitypub/request.ts b/src/remote/activitypub/request.ts index 0ac64fc38..7e487f76e 100644 --- a/src/remote/activitypub/request.ts +++ b/src/remote/activitypub/request.ts @@ -4,7 +4,7 @@ import { URL } from 'url'; import * as debug from 'debug'; import * as crypto from 'crypto'; const { lookup } = require('lookup-dns-cache'); -const promiseAny = require('promise-any'); +import * as promiseAny from 'promise-any'; import config from '../../config'; import { ILocalUser } from '../../models/user';