Explore Playgrounds
Public code snippets shared by the community. Open any snippet in its playground, fork it, and make it your own.
Zod-style Tiny Validator
TypeScript
Build small runtime validators with full type inference.
14
0
5/20/2026
0
Type-safe Event Emitter
TypeScript
Generic events map — autocompletes both event names and payloads.
18
0
5/20/2026
0
DeepReadonly Utility
TypeScript
Recursive Readonly — make whole objects immutable to the compiler.
14
0
5/20/2026
0
Branded Types
TypeScript
Distinguish UserId from string at compile time — zero runtime cost.
14
0
5/20/2026
0
Discriminated Unions
TypeScript
Exhaustive switches the compiler enforces for you.
14
0
5/20/2026
0
Result Type (Rust-style)
TypeScript
Explicit Ok/Err return values — no exceptions for expected failures.
18
0
5/20/2026
0
Showing 1 – 6 of 6
/
1