checked.ts
This file
Path
packages/sdk/src/checked.ts
8 lines · 238 bytes · TypeScript
Last changed by
Merge build/comments-packages-rest into mainoscabrielbefore adoption38cd503
History of this fileTake 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–8why, one step back1import { Schema } from "effect";23export const checked = <T, E>(schema: Schema.Codec<T, E>) => {4 const decode = Schema.decodeSync(schema);5 const encode = Schema.encodeSync(schema);67 return (input: E): E => encode(decode(input));8};