10000 Remove unnecessary type · djg6015/github-script@002432b · GitHub
[go: up one dir, main page]

Skip to content

Commit 002432b

Browse files
committed
Remove unnecessary type
1 parent 0421925 commit 002432b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/async-function.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
type AsyncFunction<A, R> = (args: A) => Promise<R>
2-
31
export async function callAsyncFunction<A = {}, R = unknown>(
42
args: A,
53
source: string
64
): Promise<R> {
75
const argsKeys = Object.keys(args).join(',')
86

9-
const wrappedFunction: AsyncFunction<A, R> = eval(`async({${argsKeys}}) => {
7+
const wrappedFunction: (args: A) => Promise<R> = eval(`async({${argsKeys}}) => {
108
${source}
119
}`)
1210

0 commit comments

Comments
 (0)
0