arktype
reflect-metadata
arktype | reflect-metadata | |
---|---|---|
43 | 4 | |
3,895 | 3,205 | |
1.5% | - | |
9.3 | 7.2 | |
3 days ago | 7 months ago | |
TypeScript | TypeScript | |
MIT License | Apache License 2.0 |
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.
arktype
-
Type-Safe Env Vars in Remix - A modern approach with ArkType
Aside from updating Remix (from 1.7 to 2.9) and switching from Zod to ArkType, I’ve introduced a makeTypedEnvironment helper to streamline handling environment variables in both server and client environments. Additionally, I’ve optimized the codebase by removing the typedPick method and refining imports to ensure server code doesn’t leak into the client bundle.
-
Using Arktype in Place of Zod - How to Adapt Parsers
Arktype has been on my radar for a while now, it offers similar validation capabilities but with some unique features that caught my eye, like the way it lets you define validators using the same syntax you use to define types.
-
Library for benchmarking TS types
I primarily rely on that approach to benchmark ArkType's types.
- Introducing @arktype/attest: A new approach to type-level testing and benchmarks
-
TypeScript please give us types
I was one of the most outspoken supporters of this initiative until I started working on ArkType. That may sound oddly self-serving, and it would be naive to claim objectivity after having invested so much into my own solution to this problem. However, I don't think that's the primary reason I changed my mind.
Since it's not explicitly listed there, I feel I should shout out David Blass and his incredibly cool ArkType project: https://github.com/arktypeio/arktype
He sometimes (used to?) streams himself working on twitch and it's a really comfy place to hang out: https://www.twitch.tv/arktypeio
-
Using ArkType for TypeScript runtime validation
ArkType is a runtime validation library that can infer TypeScript definitions one-to-one and reuse them as highly-optimized validators for your data.
-
preferred way to type guard api response body?
Could also try ArkType if you haven't seen it.
-
Valid runtime typing with Dilav
How would you say the functional chaining style overall compares to a parsed syntax like ArkType?
-
Can someone recommend a library for data parsing similar to Zod, but with better support for input transformations/preprocessing?
I'm working on a library called ArkType maybe of interest to you.
reflect-metadata
-
Dynamic NestJS Listeners: Discover the Power of Lazy Loading
We could use the reflect-metadata library to store the metadata and then scan it manually to replace the placeholders with actual values, but there is a better way.
- TypeScript please give us types
-
Using modern decorators in TypeScript
Second, TypeScript 5.0 cannot emit decorator metadata. Subsequently, it doesn’t integrate with the Reflect API and won’t work with the reflect-metadata npm package.
-
Deconstructing an Object Relationship Mapper (ORM) in Typescript
Database columns will be mapped to domain object properties using decorators. This will include relationships and enum types. reflect-metadata stores metadata about the classes and properties. Most of the work is a simple map for each class, renaming db column properties to domain model properties and vice versa. Reflect.defineProperty holds a list of field metadata on the target class. This is where more database ORM logic could live in the future such as column type, length, etc. A base domain model entity will use this metadata to map the models appropriately.
What are some alternatives?
zod - TypeScript-first schema validation with static type inference
protobuf-ts - Protobuf and RPC for TypeScript
proposal-decorators - Decorators for ES6 classes
sequelize-typescript-decorators - Sequelize (SQL ORM for Node) Typescript Decorator that simplifies declarations of Sequelize models...
type-level-regexp - 🔤🔍 Type-level RegExp, parse and match string in TypeScript type system.
di-compiler - A Custom Transformer for Typescript that enables compile-time Dependency Injection
typescript-needs-types - TypeScript please give us types.
ferocity - Write Java expression trees, statements, methods and classes with a LISP-like internal DSL
trpc - 🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.
schemats - Generate typescript interface definitions from SQL database schema
monorepo
InversifyJS - A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.