Repository navigation
v0.57.1
Patch Changes
-
#503
857e43eThanks @mattiamanzati! - Add codefix torunEffectInsideEffectdiagnostic that automatically transformsEffect.run*calls to useRuntime.run*when inside nested Effect contexts. The codefix will extract or reuse an existing Effect runtime and replace the direct Effect run call with the appropriate Runtime method.Example:
// Before Effect.gen(function* () { websocket.onmessage = (event) => { Effect.runPromise(check); }; }); // After applying codefix Effect.gen(function* () { const effectRuntime = yield* Effect.runtime<never>(); websocket.onmessage = (event) => { Runtime.runPromise(effectRuntime, check); }; });