mirror of
https://github.com/actions/github-script.git
synced 2026-02-08 03:57:27 +00:00
Format wrappedFunction
This commit is contained in:
parent
002432b25e
commit
28d4b32cd5
1 changed files with 3 additions and 1 deletions
|
|
@ -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}
|
||||||
}`)
|
}`)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue