Minor Changes
-
a764f17: Add
onExitFailureToOnErrorstyle suggestion: it reports anEffect.onExitcallback that only acts on failure (Exit.isFailure,Exit.isSuccess,exit._tagchecks, in a conditional,iforswitch, withEffect.voidon the other side) and recommendsEffect.onError, which expresses the same intent more directly.program.pipe( Effect.onExit((exit) => Exit.isFailure(exit) ? Effect.logError("failed", { cause: exit.cause }) : Effect.void ) ) // can be written as program.pipe(Effect.onError((cause) => Effect.logError("failed", { cause })))
Patch Changes
-
ec499f2: Move fix-only work out of rule analysis into the quick fixes, so it runs only when the editor asks for code actions instead of on every check. This covers 27 rules, among them
yieldInCallArgument,failCauseToConstructor,suspendFailToFailSync,catchTagToCatchReason,mapMapErrorToMapBothandunnecessaryEffectGen. Their diagnostics are unchanged.Three rules now report explicitly typed calls that they used to skip, because those calls can still be rewritten by hand. They get no quick fix:
provideLayerSucceedToProvideService:Effect.provide(Layer.succeed<I, S>(Service, implementation))(rewrite:Effect.provideService<I, S>(Service, implementation)), and the same forLayer.effect<…>provideMergeAllToArray:Effect.provide<…>(Layer.mergeAll(...))andEffect.provide(Layer.mergeAll<…>(...))timeoutCatchTagToTimeoutOrElse: explicit type arguments on theEffect.timeoutstep
// now reported, without a quick fix program.pipe(Effect.provide(Layer.succeed<Service, { readonly value: number }>(Service, implementation)))
-
7aacb7d: Update the TypeScript next tag to
typescript@next, which shipstypescript-gocommitb7917e5e4c278f132ed19f777d968b6b1180fc24, update the TypeScript beta tag totypescript@beta, and update the TypeScript latest tag totypescript@latest.