Skip to content

Commit

Permalink
Allow type params on makeArrowFn() (#2281)
Browse files Browse the repository at this point in the history
Needed for #2280
  • Loading branch information
RobinTail authored Jan 3, 2025
1 parent 4144294 commit 646bac8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/integration-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ export const makeTypeParams = (
export const makeArrowFn = (
params: ts.Identifier[],
body: ts.ConciseBody,
isAsync?: boolean,
{
isAsync,
typeParams,
}: { isAsync?: boolean; typeParams?: Parameters<typeof makeTypeParams>[0] },
) =>
f.createArrowFunction(
isAsync ? asyncModifier : undefined,
undefined,
typeParams && makeTypeParams(typeParams),
params.map((key) => makeParam(key)),
undefined,
undefined,
Expand Down
2 changes: 1 addition & 1 deletion src/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ export class Integration {
parserStatement,
returnStatement,
]),
true,
{ isAsync: true },
),
{
expose: true,
Expand Down

0 comments on commit 646bac8

Please sign in to comment.