Seeking a Cleaner Way to Write an Async Filter with Effect.promise

Hello guys, I needed an async filter and I ended up with something like this:

Schema.filterEffect((s) =>
  Effect.promise(
    () => (async () => {})()
  )
);


However, I'm not sure about this:

Effect.promise(
  () => (async () => {})()
)


It just doesn't feel right to me, I'd like to know if there's a way to write it more cleanly.
Note: I haven't tried if it works but there's no syntax error.
Was this page helpful?