flâneur

Visual Effect - Interactive Effect Playground

effect.kitlangton.com · 765 words · saved by 2 readers

Interactive examples of TypeScript's beautiful Effect library

CONSTRUCTORS Effect.succeed Create an effect that always succeeds with a given value value const value = Effect.succeed(42) Effect.fail Create an effect that represents a recoverable error error const error = Effect.fail("Kaboom!") Effect.die Create an effect that terminates with an unrecoverable defect death const death = Effect.die(new Error("FATAL: System corrupted")) Effect.sync Create an effect from a synchronous side-effectful computation random const random = Effect.sync(() => Math.random()) Effect.promise Create an effect from an asynchronous computation guaranteed…

saved by

related reading