Skip to content

Commit

Permalink
chore(listr2mock): Move comments closer to referenced code (redwoodjs…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe authored Aug 23, 2024
1 parent 6618bd5 commit 29f4511
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/cli/src/__tests__/Listr2Mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ function isSupportedOptionsType(

return optionsArray.every(
(option) =>
typeof option !== 'function' &&
// message is the only required property in `BasePromptOptions` in Listr2
typeof option !== 'function' && 'message' in option,
'message' in option,
)
}

Expand Down Expand Up @@ -70,11 +71,11 @@ class Listr2TaskWrapper {
}

run(ctx: Ctx, task: Listr2TaskWrapper) {
// TODO: fix this by removing the type casts.
// The reason we have to do this is because of private fields in
// Listr.ListrTaskWrapper
return this.task.task(
ctx,
// TODO: fix this by removing the type casts.
// The reason we have to do this is because of private fields in
// Listr.ListrTaskWrapper
task as unknown as Listr.ListrTaskWrapper<
Ctx,
typeof Listr.ListrRenderer
Expand Down

0 comments on commit 29f4511

Please sign in to comment.