Format wrappedFunction

This commit is contained in:
Jonathan Clem 2020-07-17 11:49:05 -04:00
parent 002432b25e
commit 28d4b32cd5
No known key found for this signature in database
GPG key ID: B3662C4A8F843179

View file

@ -4,7 +4,9 @@ export async function callAsyncFunction<A = {}, R = unknown>(
): Promise<R> { ): Promise<R> {
const argsKeys = Object.keys(args).join(',') const argsKeys = Object.keys(args).join(',')
const wrappedFunction: (args: A) => Promise<R> = eval(`async({${argsKeys}}) => { const wrappedFunction: (
args: A
) => Promise<R> = eval(`async({${argsKeys}}) => {
${source} ${source}
}`) }`)