summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/@types/promise-any.d.ts7
-rw-r--r--src/remote/activitypub/request.ts2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/@types/promise-any.d.ts b/src/@types/promise-any.d.ts
new file mode 100644
index 0000000000..97060b84bd
--- /dev/null
+++ b/src/@types/promise-any.d.ts
@@ -0,0 +1,7 @@
+declare module 'promise-any' {
+ function promiseAny<T>(iterable: Iterable<T | PromiseLike<T>>): Promise<T>;
+
+ namespace promiseAny {} // Hack
+
+ export = promiseAny;
+}
diff --git a/src/remote/activitypub/request.ts b/src/remote/activitypub/request.ts
index 0ac64fc387..7e487f76ec 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';