1. 26
  1.  

  2. 3

    This looks like a fully realized dependent types system for a typescript-alike? That’s amazing. I’m digging in more;

    I personally think the digression into framework stuff at the end was a distraction from the really awesome type-level PLT stuff that’s presented earlier.

    I’d be really interested in seeing dynamic types generated from data schema files; basically, can we get nicely auto-completable types from json schema, or grpc definitions, etc? I think there’s some potentially really cool low-hanging fruit in dependent types for integration tooling like that.

    1. 2

      You are looking for something like F#/.NET type providers.

      1. 2

        The post doesn’t seem to mention being able to instrument the dependent type system other than what you get in TypeScript, but maybe that aspect is still in the works.

        I also doubt that the type system is the right place for implementing tooling like this, it would be better suited for something like a compiler plugin or a custom loader or something like F#‘s type providers, as rs86 mentioned in the sibling comment. Besides, the vanilla TypeScript compiler already has enough dependent typing to implement something like that already if you’re crazy enough (and I say this as somebody who’s implemented a type-level parser of express route parameters using template literals.)

      2. 2

        The idea of using a compiler to convert declarative UI changes a la React to granular direct node changes is essentially the best of both worlds: high level code and efficient implementation. React has clearly redefined the standard for implementing UIs, and this approach removes pretty much all the cons. It sounds almost too good to be true!

        1. 2

          I couldn’t see any mention of what it compiles to. LLVM? WASM? Or is it “just” a very advanced type checker at this point?

          1. 1

            JavaScript is the compile target. It accepts JS, TS, and JSX as source. I’m not sure if it transforms JS source. If not, it is indeed basically a type checker in that configuration.