summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2019-01-31 17:52:27 +0900
committerGitHub <noreply@github.com>2019-01-31 17:52:27 +0900
commitbbcdf1bb8a305bfd8d74150024c33cdaabe950fc (patch)
tree33a25ebad060d88432a7d053d2023edc109ef82e /src
parentCreate type definition for 'webfinger.js' (#4054) (diff)
downloadsharkey-bbcdf1bb8a305bfd8d74150024c33cdaabe950fc.tar.gz
sharkey-bbcdf1bb8a305bfd8d74150024c33cdaabe950fc.tar.bz2
sharkey-bbcdf1bb8a305bfd8d74150024c33cdaabe950fc.zip
Create type definition for 'promise-any' (#4055)
Diffstat (limited to 'src')
-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';