answer.ts
This file
Path
apps/web/src/client/answer.ts
27 lines · 613 bytes · TypeScript
Last changed by
Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248
History of this fileTake it
12345678910111213141516171819202122232425262728import type { AskId, CommitSha, LandedSha, ProjectName,} from "@repo/protocol/ids";
import { ContractsClient } from "../surfaces.ts";import { keys } from "./keys.ts";
export const verdictAtom = ( project: ProjectName, ask: AskId, head?: CommitSha) => ContractsClient.query( "verdict", head === undefined ? { ask, project } : { ask, head, project }, { reactivityKeys: keys.ask(project, ask) } );
export const landingAtom = (project: ProjectName, sha: LandedSha) => ContractsClient.query( "landing", { project, sha }, { reactivityKeys: keys.project(project) } );