Pinned Loading
-
Replacing TypeScript enum (zod)
Replacing TypeScript enum (zod) 1// This example shows how to use enum like types (defined in Colors.ts)
2// It also shows a pattern for creating data objects that can be validated at run time and deserialized / serialized easily.
3// Note: If tree shaking is needed, the static methods can be easily pulled out into exported functions.
45import * as Colors from './Colors.js';
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.