-
Does/will this correctly handle `| undefined` vs `?`, i.e. correct behavior under `exactOptionalPropertyTypes`?
Zod doesn't (yet[0]) and it's been a pain point for me.
[0] https://github.com/colinhacks/zod/issues/635
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
Does anyone have a nice combination of tooling for typed handlers + client generation.
Thinking maybe Zod + Zod open API.
Really looking to replicate similar spec first workflow similar to protobuf services.
https://typespec.io/ also looks promising but seems early.
-
-
It seems I'm not the first person to make this observation: https://github.com/fabian-hiller/valibot/issues/687
I honestly don't want my validation library to "tell a story" at the expense of documentation clarity. It's absolutely fine that this project uses it, I don't want to impose my view on them - I guess it's just not the validation library for me.
-
typescript-runtime-type-benchmarks
đź“Š Benchmark Comparison of Packages with Runtime Validation and TypeScript Support
Something cool that I can't remember if it was posted on HN at one point or I stumbled across when looking for alternatives to yup but this repo has been compiling a bunch of different benchmarks for runtime validation of ts validation libraries. Obviously to some degree the performance is arbitrary when you're reaching millions of operations per second but on the flipside their benchmarks are against rather data. Would be interested to see comparison of either more nested data or otherwise complex. Maybe something to look at in my spare time.
https://moltar.github.io/typescript-runtime-type-benchmarks/
-
I really like the Decoders library for this. Similar in function to Zod, but a more Elm inspired approach - https://decoders.cc/
-
I'd recommend TypeBox[1] as an alternative, which has a runtime “compiler” for generating optimized JS functions from the type objects. It also produces a JSON schema, which can be useful for generating API docs and API clients if needed.
It also has a companion library[2] for generating TypeBox validators from TypeScript definitions, which I'm currently using in an RPC library I'm working on.
[1]: https://github.com/sinclairzx81/typebox
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
It is. And only getting better SLOWLY by each iteration. The thing i love about Haxe that once you use it, your installed version is not legacy in a month (unlike npm/typescipt ecosystem). Haxe is fully working, and does not need a lot of "new" features.
More news about Haxe can be found here: https://haxe.io/ (the old blog is not updated AFAIK)
-
-
When there’s feature parity, what’s the next differentiator for you? For me, performance.
Though I admit another important aspect is community adoption. If your 3rd-party dependency uses zod internally, well now you’re bundling in both, and the added network latency probably negates any performance improvement you were getting. That’s why I wish libraries would use something more generic that allows you to dependency-inject what you’re already using, like https://github.com/decs/typeschema
-
Why not write your code in F# and compile it to TypeScript using Fable [1]?
This way you can use native language features for discriminated unions, functional pipelines, and exhaustive pattern matching to model your domain instead of shoe-horning such functionality into a non-ML language!
Model your domain in F#, consume it in Python or C# backends and TypeScript frontends. The downside is needing to know all of these languages and run times but I think I'd rather know F# and the quirks with interacting with TypeScript than a library like Effect!
[1] https://fable.io
-
Coming from a ReasonML / OCaml codebase (frontend react), I'm seeing a lot to love with the pattern matching and sum types. Zod is already one of my favorites (coming from https://github.com/glennsl/bs-json).
Is 'retry / observability / error handling" something that comes from Effect?
-
You just gave me a flashback to scalaz https://github.com/scalaz/scalaz
-
ajv
The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
I'm not 100% sure, they most likely scraped the author emails of all NPM packages that (transitively) depend on ajv. Here's the GitHub issue from back then: https://github.com/ajv-validator/ajv/issues/1202
-
dittofeed
Open-source customer engagement. Automate transactional and marketing messages across email, SMS, mobile push, WhatsApp, Slack, and more 📨
Likewise we use typebox for everything in our project (open source customer.io alternative).
https://github.com/dittofeed/dittofeed/blob/main/packages/is...
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Related posts
-
Show HN: Universal adapter for TypeScript schema validation
-
Show HN: TypeSchema – Universal adapter for TypeScript schema validation
-
🛵 TypeSchema – unified interface for schema validations (zod, yup...)
-
We're building Bridge-Mongo: a fully typed MongoDB ORM, built on top of Mongoose.
-
Better Backend DX: JSON Schema + TypeScript + Swagger = ✨ Vol. 2