Tag

Zod

2 stories

'Parse, don't validate' in a language that fights you: TypeScript's structural typing problem (cekrem.github.io)

An essay walks through making 'parse, don't validate' work in TypeScript, where structural typing means a validated Email is indistinguishable from any string. The fix is a branded type: a phantom symbol that makes Email incompatible with string at compile time and vanishes at runtime.

The thread's senior voices split on whether that's the real idea or a fake-out: one argued branding just labels a string as 'validated,' while another countered that all type guarantees are ultimately validation the compiler agrees to trust.

Not just a headline — the discussion unpacked

The top HN threads: facts from the discussions, both sides, insider voices. Email, Telegram, or RSS.

Zod's creator builds a Bun-like toolkit that keeps stock Node (github.com)

Nub is a Rust binary that wires the oxc transpiler into Node through module.registerHooks() and an --import preload, so TypeScript, JSX and .env load with no build step on the runtime everyone already ships.

An ArkType maintainer says he merged a whole monorepo onto it with zero issues. But a Node internals reader flags the --require hook choice, warning it could quietly break top-level await in ESM.