ts-simple-type VS marshal.ts

Compare ts-simple-type vs marshal.ts and see what are their differences.

ts-simple-type

Relationship type checker functions for Typescript types. (by justjake)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
ts-simple-type marshal.ts
3 29
35 3,071
- 0.9%
0.0 9.6
about 1 year ago 5 days ago
TypeScript TypeScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.

ts-simple-type

Posts with mentions or reviews of ts-simple-type. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-12.
  • tRPC – Move Fast and Break Nothing. End-to-end typesafe APIs made easy
    30 projects | news.ycombinator.com | 12 Aug 2023
    We use an internal validator library that we infer request types from. It’s similar to Zod (but also predates it by a year).

    I’ve also spent some time on a Typescript type to X compiler. My first prototype is open source and targets Thrift, Proto3, Python, and JSON schema: https://github.com/justjake/ts-simple-type/tree/main/src/com...

    I’m not happy with the design decision in that codebase to try to “simplify” Typescript types before compiling, and probably won’t continue that implementation, but we have a few internal code generators that consume TS types and output test data builders and model clases we use in production.

  • Ezno
    11 projects | news.ycombinator.com | 23 Sep 2022
  • Ultra-minimal JSON schemas with TypeScript inference
    11 projects | news.ycombinator.com | 27 Jul 2022
    After some frustration with the TypeScript schema library ecosystem, I've decided that I'd prefer to declare my types using TypeScript's excellent type syntax, so I can take advantage of generics, mapped types, etc. Then, I'll take those TypeScript types and compile them to whatever alternative schema format I need.

    There are many libraries that claim to convert your Typescript types to other formats, such as ts-json-schema-generator, ts-to-zod, or typeconv/core-types-ts. These libraries work by interpreting the Typescript AST, essentially re-implementing a bare-bones type system from scratch. Most do not support advanced Typescript features like generic application, mapped types, or string literal types. So, what's the point? To avoid those limitations, I use Typescript's first-party ts.TypeChecker API to analyze types, and an existing library called ts-simple-type (which I've forked) to convert from ts.Type to a more usable intermediate format. Then, I recurse over the intermediate format and emit "AST nodes". It's pretty simple, but seems promising.

    So far, I have compilers from TypeScript type to Python 3 and Thrift. But I plan to add OpenAPI/JSONSchema, Protobuf (Proto3), Kotlin, Swift, and maybe Zod and Avro. Each target language is around ~300 LoC so they're pretty easy to put together.

    Repo: https://github.com/justjake/ts-simple-type

    Compiler input and output: https://github.com/justjake/ts-simple-type/blob/jake--compil...

    Thrift compiler: https://github.com/justjake/ts-simple-type/blob/jake--compil...

    Python compiler: https://github.com/justjake/ts-simple-type/blob/jake--compil...

marshal.ts

Posts with mentions or reviews of marshal.ts. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-15.
  • Deepkit Enterprise TypeScript Framework
    1 project | news.ycombinator.com | 9 Dec 2023
  • We use TypeScript not based on preference, but because we want to make money
    3 projects | news.ycombinator.com | 15 Sep 2023
    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?
    3 projects | /r/typescript | 8 Jul 2023
  • TypeScript please give us types
    10 projects | news.ycombinator.com | 7 Jul 2023
    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
    3 projects | /r/typescript | 27 Jun 2023
    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
    1 project | news.ycombinator.com | 31 May 2023
    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?
    3 projects | /r/node | 26 May 2023
    Take a look at restfuncs then. Or deepkit or telefunc.
  • Runtime TypeScript types change everything
    5 projects | /r/typescript | 13 May 2023
    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
    2 projects | /r/typescript | 18 Apr 2023
    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
    12 projects | news.ycombinator.com | 11 Oct 2022
    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?

When comparing ts-simple-type and marshal.ts you can also consider the following projects:

fern-java - Generate Java models, clients, and server interfaces from your API definition.

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.

telefunc - Remote Functions. Instead of API.

Quarkus - Quarkus: Supersonic Subatomic Java.

ts-to-zod - Generate zod schemas from typescript types/interfaces

new-error - Production-grade error creation and serialization library designed for Typescript

stytch-t3-example - An example app demonstrating how to use Stytch within the T3 stack

polka - A micro web server so fast, it'll make you dance! :dancers:

vellum-client-python - Python SDK for Vellum API

FizzBuzz Enterprise Edition - FizzBuzz Enterprise Edition is a no-nonsense implementation of FizzBuzz made by serious businessmen for serious business purposes.

vellum-client-generator - Vellum’s Fern API which is used to generate SDKs.

Koa - Expressive middleware for node.js using ES2017 async functions