Add async prefix
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user