Skip to content
Myr

contract-examples.ts

This file

Path

packages/protocol/test/contract-examples.ts

18 lines · 453 bytes · TypeScript

Last changed by

Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f

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–18why, one step back
1import { Schema } from "effect";
23import wire from "./fixtures/contracts.json" with { type: "json" };45export const Example = Schema.Struct({6 payload: Schema.Json,7 success: Schema.Json,8});910export type Example = typeof Example.Type;1112const Fixture = Schema.Struct({13 examples: Schema.Record(Schema.String, Example),14});1516export const examples: ReadonlyMap<string, Example> = new Map(17 Object.entries(Schema.decodeSync(Fixture)(wire).examples)18);