Skip to content
Myr

decide.ts

This file

Path

apps/web/src/client/decide.ts

21 lines · 664 bytes · TypeScript

Last changed by

Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 1–21why, one step back
1import type { Decide } from "@repo/protocol/contracts";
2import { Effect } from "effect";3import { Reactivity } from "effect/reactivity";45import { ContractsClient } from "../surfaces.ts";6import { keys } from "./keys.ts";78export const decideAtom = ContractsClient.runtime.fn<9 typeof Decide.payloadSchema.Type10>()(11 Effect.fnUntraced(function* (input) {12 const client = yield* ContractsClient;1314 return yield* client("decide", input).pipe(15 Reactivity.mutation([...keys.today(), ...keys.project(input.project)]),16 Effect.tapErrorTag(["DecisionClosed", "UnknownDecision"], () =>17 Reactivity.invalidate(keys.today())18 )19 );20 })21);