arktype
marshal.ts
arktype | marshal.ts | |
---|---|---|
41 | 29 | |
3,375 | 3,071 | |
2.7% | 0.9% | |
7.9 | 9.6 | |
5 days ago | 9 days ago | |
TypeScript | TypeScript | |
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.
arktype
-
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.
-
Solving balanced parentheses problem using Dart's type system
If you're interested in the possibilities of this kind of stuff in TypeScript, you should check out ArkType.
-
Safer Type Checking At Both Runtime and Compile Time
Have you tried ArkType?
marshal.ts
- Deepkit Enterprise TypeScript Framework
-
We use TypeScript not based on preference, but because we want to make money
zod or yup gets you quite a bit of the way there in practice - when you would reach for a Typescript type, making it in zod instead is more verbose but gives that runtime layer.
But for those who actually want full-stack non-stripped runtime type reflection based on Typescript syntax alone... https://deepkit.io/ - https://deepkit.io/blog/introducing-deepkit-framework - is a really promising and cool project.
It patches the typescript compiler (which pointedly considers runtime type information out of scope) with its own type compiler that emits a bespoke bytecode that is executed in a bespoke VM to communicate runtime type information to both server and client as needed. https://docs.deepkit.io/english/runtime-types.html
And from that baseline, there are very cool things you can do like an ORM entirely based on type annotations https://docs.deepkit.io/english/database.html or strongly-typed RPCs https://docs.deepkit.io/english/rpc.html .
It's very much in the alpha stage, but it's really well thought out - there's a tremendous degree of care the developer is taking towards code cleanliness and developer experience. I'm torn between wishing this project to have a fully funded team and take the world by storm, vs. "letting them cook" so to speak and seeing the developer experience unfold organically. Either way, it's a breath of fresh air into the Typescript ecosystem!
- Is there a TS backend development environment similar to what I have for the frontend?
-
TypeScript please give us types
Deepkit (listed in the article) is a fascinating project and really deserves to be more popular.
It also demonstrates that what is being asked for is actually practical.
https://deepkit.io/
-
Bebop introduces JSON-Over-Bebop for fast runtime type validation of raw JSON in Typescript; faster than Zod and other alternatives
Checkout deepkit One of the things it has is a really fast BSON parser, that is faster than the JSON one to my understanding. Interesting work with TS types too
-
Show HN: Magma – Multiplayer AI for Artists
Hello HN community! I’m one of the founders of Magma, a multiplayer art platform. You might recall our earlier post (https://news.ycombinator.com/item?id=30869131), and today we’re sharing a significant update with our artist-focused, multiplayer AI assistant, a first in the realm of collaborative creative tools. Hope you’ll like it!
See how it works in this YouTube video: https://www.youtube.com/watch?v=ZESJfjwxLjk. For in-depth understanding, here’s our documentation (https://help.magma.com/en/articles/6711598-beta-ai-assistant) and our AI manifesto (https://magma.com/aimanifesto) which is a guiding document for us.
We're inviting you to get hands-on with this new feature. Join any of these canvases (up to 50 live contributors each): https://magm.ai/qnss, https://magm.ai/ei74, https://magm.ai/38mr, https://magm.ai/z1ti, https://magm.ai/zdub, https://magm.ai/ed93, https://magm.ai/1l84, https://magm.ai/xvu5, https://magm.ai/gd9j, https://magm.ai/pu6e. All of these canvases have extra feature flags enabled but if you’d like to go beyond them, feel free to join our beta community https://magm.ai/magma-beta-artspace-invite
Our artist-first approach is rooted in our belief that human creativity should remain the heart of artistry. With our AI handling routine tasks, artists can focus on true creativity. Importantly, our AI preserves artists' copyright as it provides a clear distinction between human-generated and AI-generated content.
Beyond just art, Magma is a powerful tool for game dev and animation, offering powerful design & review tools for all stages of the creative process. Our Slack/GDrive-like workspaces (we call them Artspaces) expose API and even shell tools. One can even render any artwork in the terminal. :)
Technically speaking, our collaborative drawing engine is powered by Typescript, Node.JS, WebGL, with a hint of WebAssembly for hand-optimized performance that even Chromebooks can handle. The backend also leverages a high performance Typescript Deepkit Framework https://deepkit.io
Our AI assistant runs on a worker-based architecture akin to Gitlab CI workers, currently leveraging Stable Diffusion 2.1. Future developments will allow connecting your own AI worker, training custom models within Magma, and plugging in API keys from other AI backends.
Feedback, questions, thoughts? Let's discuss! Happy creating with a helping hand of AI!
P.S. A shout-out to the HN community, our last post here helped us connect with an amazing technical angel investor who has made significant contributions. Looking forward to more such productive connections!
-
Why nodejs engineers prefer express over nestjs? although nestjs forces good practice and proper architecture and it seems to be a right choice for complex and enterprise applications like asp.net and Spring. What are the limitations of nestjs compared to express?
Take a look at restfuncs then. Or deepkit or telefunc.
-
Runtime TypeScript types change everything
Both work out of the box very well with Deepkit. You can either construct your own types in runtime or mix TS types with runtime information. See for example https://github.com/deepkit/deepkit-framework/blob/master/packages/framework/src/crud.ts where this is done
-
IS there a way to generate Swagger model schemas from interfaces
Yes, you can directly use the interfaces and types as is with Deepkit (https://deepkit.io) and the library deepkit-openapi. You get also full route documentation if you use the deepkit/http router where you can use interfaces and type aliases plus validation thpes for route parameters (query parameters, body, etc). It still in alpha, but approaches soon beta.
-
Hegel – An advanced static type checker for JavaScript
https://deepkit.io/ may be of interest to you! It deeply patches the TS type compiler to make all types visible at runtime, enabling a lot of annotation-style workflows and dependency injection possible completely within the type annotation system: https://docs.deepkit.io/english/runtime-types.html
Previous discussion: https://news.ycombinator.com/item?id=31663298 - it's downright mindblowing that all this seems to be the work of primarily a single developer.
For a less intrusive solution, https://github.com/jquense/yup is a great library to reach for whenever you're defining the shape of a network-transmitted object and don't want to introduce compilation stages.
What are some alternatives?
zod - TypeScript-first schema validation with static type inference
ts-jackson - A typescript library to deserialize and serialize json into classes. You can use different path pattern to resolve deeply nested structures. Every path pattern provided by lodash/get|set object is supported. Check out src/examples as a reference.
proposal-decorators - Decorators for ES6 classes
Quarkus - Quarkus: Supersonic Subatomic Java.
trpc - 🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.
new-error - Production-grade error creation and serialization library designed for Typescript
monorepo
polka - A micro web server so fast, it'll make you dance! :dancers:
type-level-regexp - 🔤🔍 Type-level RegExp, parse and match string in TypeScript type system.
FizzBuzz Enterprise Edition - FizzBuzz Enterprise Edition is a no-nonsense implementation of FizzBuzz made by serious businessmen for serious business purposes.
typescript-runtime-type-benchmarks - 📊 Benchmark Comparison of Packages with Runtime Validation and TypeScript Support
Koa - Expressive middleware for node.js using ES2017 async functions