Create type definition for 'promise-any' (#4055)

This commit is contained in:
Acid Chicken (硫酸鶏) 2019-01-31 17:52:27 +09:00 committed by GitHub
parent 6439a6c63f
commit bbcdf1bb8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

7
src/@types/promise-any.d.ts vendored Normal file
View file

@ -0,0 +1,7 @@
declare module 'promise-any' {
function promiseAny<T>(iterable: Iterable<T | PromiseLike<T>>): Promise<T>;
namespace promiseAny {} // Hack
export = promiseAny;
}

View file

@ -4,7 +4,7 @@ import { URL } from 'url';
import * as debug from 'debug'; import * as debug from 'debug';
import * as crypto from 'crypto'; import * as crypto from 'crypto';
const { lookup } = require('lookup-dns-cache'); const { lookup } = require('lookup-dns-cache');
const promiseAny = require('promise-any'); import * as promiseAny from 'promise-any';
import config from '../../config'; import config from '../../config';
import { ILocalUser } from '../../models/user'; import { ILocalUser } from '../../models/user';