Show HN: Zero-codegen TypeScript type inference from Protobuf messages

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SurveyJS - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor
Add the SurveyJS white-label form builder to your JavaScript app (React/Angular/Vue3). Build complex JSON forms without coding. Fully customizable, works with any backend, perfect for data-heavy apps. Learn more.
surveyjs.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. protobuf-ts-types

    🛫 Zero-codegen, no-compile TypeScript `type` inference from protobuf `message`s

  2. SurveyJS

    JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor. Add the SurveyJS white-label form builder to your JavaScript app (React/Angular/Vue3). Build complex JSON forms without coding. Fully customizable, works with any backend, perfect for data-heavy apps. Learn more.

    SurveyJS logo
  3. TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    This requires the whole `.proto` declaration inline in source a string constant. I'm not holding my breath on "Import non-js content"[1] getting approved, so that means you still have to use another build dependency, or manually keep the .proto files synchronized across multiple sources truth. In that light, it's not clear when this would be a benefit over straight-forward code gen. Cool POC hack though.

    [1]: https://github.com/microsoft/TypeScript/issues/42219

  4. porffor

    A from-scratch experimental AOT JS engine, written in JS

    I think you're conflating cause and effect in several cases. TypeScript can't be thought of, and would never exist, independently from JavaScript like you're trying to do.

    TypeScript wasn't created separate from JavaScript and then chose JavaScript as a backend. TypeScript only exists to perform build-time type checking of JavaScript. There wouldn't be a TypeScript that compiled to something else, because other languages already have their own type systems.

    Runtime type-checking isn't part of TypeScript because 1) It isn't part of JavaScript, and TypeScript doesn't add runtime features anymore. 2) It'd be very expensive for simple types, 3) Complex types would be prohibitively expense as you have to both reify the types and perform deep structural checking.

    WASM also is natively supported, and with newer extensions like reference types and GC, we're getting closer to the point where a DOM API could be defined. It'll still be a long while, but that's the long-term direction it's heading in. But even then, you would only see a TypeScript-to-WASM compiler[1] because there's already so much TypeScript out there, not because TypeScript is a particularly good language for that environment. A more static language would be a lot better for a WASM target.

    [1]: Porfor is already such a compiler for JS and TS, but it does not do runtime type-checking: https://porffor.dev/

  5. assemblyscript

    A TypeScript-like language for WebAssembly.

    and have that just work without any JS "glue code". Maybe someday. I know they're working on the DOM APIs, but as you said, it's been slow going. Feels like priorities are elsewhere. Even CSS is moving forward with new features faster than WASM is (nesting and view transitions are awesome though).

    (Btw when I said "separate runtime type checking" I didn't mean language-level; I was referring to the validation libraries that are required today since TS types obviously no longer exist after build. If it were a real static language, then of course you wouldn't need to do that because you can't store a bool in a string in the first place.)

    [0]: https://www.assemblyscript.org/ (Porffor looks neat too. Wonder if it could be useful in plugin architectures? E.g. plugins can written in JS, and the program only needs a WASM interpreter. I'll bookmark it. Thanks.)

  6. ts-simple-type

    Relationship type checker functions for Typescript types.

    I have an old public version here: https://github.com/justjake/ts-simple-type/blob/main/src/com...

  7. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Announcing TypeScript 5.0

    3 projects | /r/programming | 16 Mar 2023
  • An Ode to TypeScript Enums

    9 projects | news.ycombinator.com | 2 Mar 2025
  • Extensible WASM Applications with Go

    9 projects | news.ycombinator.com | 13 Feb 2025
  • Building React Components Using Unions in TypeScript

    15 projects | dev.to | 1 Oct 2023
  • Type inference of local variable based on later operations

    3 projects | /r/ProgrammingLanguages | 10 Jun 2023

Did you know that TypeScript is
the 1st most popular programming language
based on number of references?