|18 days ago||2 days ago|
|MIT License||MIT License|
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
3 projects | /r/functionalprogramming | 4 Dec 2022
I don't really use ts-belt to be certain, but by looking at the source, it seems that it's using genType, which can generate TS types from ReScript values, and that makes interop work really well.
5 projects | news.ycombinator.com | 29 Sep 2022
They discuss this in their docs.
Looks like they also offer some form of TS interop:
From TypeScript to ReScript
12 projects | news.ycombinator.com | 12 Jan 2022
TS Belt - fast, modern, and practical utility library for FP in TypeScript
3 projects | dev.to | 6 Dec 2021
How I Switched from TypeScript to ReScript
5 projects | dev.to | 20 Jan 2021
To interoperate with TypeScript with proper type information you’ll use third-party genType. Add it as a devDependency and annotate the module export you want to generate with @genType (in previous versions you’d surround annotations with square brackets).
Where DRY Applies
3 projects | news.ycombinator.com | 3 Nov 2023
Author here: This specific example is a perfect case of the thing the post calls out! API boundaries are one of the most important places where we need to maintain invariants about our code base, one of the most important places that it is important not to have to worry about “keeping things in sync” as you say.
In the TypeScript world, there are a number of libraries that can handle creating types from deserialization logic: Zod , Superstruct , Typebox , etc. – and Typebox specifically does what you are looking to do with MyPy. I do not know the Python ecosystem at all anymore (it has been a decade!) but I would be surprised if nothing like that exists. If it does, there is a good chance it is associated with the functional programming enthusiast corner of the Python community, so you might look there!
5 projects | news.ycombinator.com | 25 Oct 2023
I made a crate for bridging types between Rust and Zod / Typescript
2 projects | /r/rust | 24 Oct 2023
This means if you want to actually have reliable type-checking in typescript, you need to use a runtime schema framework like zod to verify that data coming in from the outside world is what you think it is.
The Ultimate Tech Stack for Building a Full-Stack MVP and Iterating Quickly
13 projects | dev.to | 17 Oct 2023
Forms are a big part of full-stack projects. In our experience, Zod and React Hook Form work great together and provide all the functionality one might need to create forms. In this combo, Zod provides schema validation (types, min/max bounds, lengths, enums, etc.) while React Hook Form gives a flexible API to interact with the form. With these two libraries, one can nest components that interact with the same form, perform different complex validations, and update the data on the fly. They make working with forms seem too easy.
Working with forms in SvelteKit coming from React
3 projects | dev.to | 16 Oct 2023
For the examples, I'll be using zod for both React and Svelte, but won't be using libraries for the sake of showing the differences. You should be able to use any other validation libraries you want with no problem, but since I'm more familiar with zod, that's what I'm goin to be using. It's good to know that I'll only handle validations on the server-side, that's why it's useless for us to save some variables state in Svelte.
Using OpenAPI to Detect Breaking Changes in tRPC
7 projects | dev.to | 16 Oct 2023
The tRPC router contains basic validation using Zod.
3 great Typescript libraries to speed up your full stack development
3 projects | dev.to | 13 Oct 2023
Zod - schema validation for client and server
Desenvolvendo APIs fortemente tipadas de ponta a ponta com tRPC
3 projects | dev.to | 10 Oct 2023
Creating a hackathon winning AI based app in a weekend using Supabase, OpenAI, & Next.js
6 projects | dev.to | 10 Oct 2023
This is my main component for the thread creation UI. You can see some imports and predefined prompt for OpenAI. Your prompt should be concise but to-the-point for best results. I have a few states I'm using to handle input changes. Once someone selects all inputs and then clicks on the Generate button. the whole input gets validated against a Zod schema and then is fed to the API route we created in the previous step. The generated response is being split into separate tweets and is then shown in the UI as a thread.
Best practices for HarperDB projects using TypeScript
7 projects | dev.to | 9 Oct 2023
For this we will need to create a schema that we can compare and validate our object against, this is the perfect use case for Zod! Zod is a TypeScript-first schema validation library that allows us to create schemas and validate our objects against them. Let's install it by running npm install --save zod.
What are some alternatives?
class-validator - Decorator-based property validation for classes.
joi - The most powerful data validation library for JS [Moved to: https://github.com/sideway/joi]
Yup - Dead simple Object schema validation
typebox - Json Schema Type Builder with Static Type Resolution for TypeScript
ajv - The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
io-ts - Runtime type system for IO decoding/encoding
class-transformer - Decorator-based transformation, serialization, and deserialization between objects and classes.
runtypes - Runtime validation for static types
react-hook-form - 📋 React Hooks for form state management and validation (Web + React Native)
zod-to-json-schema - Converts Zod schemas to Json schemas