Add async prefix

This commit is contained in:
Leonid Logvinov
2017-12-01 22:55:36 -06:00
parent eb667f653c
commit 042caa3363
2 changed files with 2 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ export function promisify<T>(
) => void,
target: any,
): (...callArgs: any[]) => Promise<T> {
const promisifiedFunction = (...callArgs: any[]): Promise<T> => {
const promisifiedFunction = async (...callArgs: any[]): Promise<T> => {
return new Promise<T>((resolve, reject) => {
const callback = (err: Error|null, data?: T) => {
_.isNull(err) ? resolve(data) : reject(err);

View File

@@ -5,7 +5,7 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"lint": "tslint --project . 'src/*.ts'",
"lint": "tslint --project . 'src/**/*.ts'",
"clean": "shx rm -rf lib",
"build": "tsc"
},