Inferring Promise Execution in Framework Integration

I'm currently working on a framework integration, and the goal i have in mind is to return either promise<R> or R from a function based on if the provided effect as the argument to that function has to be executed with runPromise.

So the question is, can we infer both at the type level and at runtime, if an effect has to be executed using runPromise?
Was this page helpful?