blocksuite icon indicating copy to clipboard operation
blocksuite copied to clipboard

feat: create zod union

Open F4lkr4m opened this issue 1 year ago • 1 comments

Add util function for creating zod union from arrays

example: packages/blocks/src/_common/consts: image

The example shows that when creating a zod scheme, there are repetitions of values from the array. Such use leads to an unguaranteed schema change when changing the values of this array. This can be avoided using createZodUnion utility

+simplification of the code +ensuring an up-to-date scheme

image

F4lkr4m avatar Apr 23 '24 09:04 F4lkr4m

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2024 10:17am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview May 1, 2024 10:17am

vercel[bot] avatar Apr 23 '24 09:04 vercel[bot]