• LittleLily@shinobu.cloud
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    1 year ago

    Just fyi, while they don’t help with running TS in the browser, the Bun and Deno runtimes both natively run TS without any compilation.

    • severien@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      That’s not true, deno compiles TypeScript to JavaScript, it just does it transparently. The code still runs on v8.

      • brian
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        V8 also doesn’t run js, it does some byte code compilation stuff amongst other things, then interprets that. But that’s all a bit pedantic too, V8 runs js, deno runs ts.

        fwiw https://deno.com even has as one of their first bullet points that they have “native support for TypeScript and JSX”

        • severien@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Sure, but part of the claim was “without any compilation”. But bun/deno do compile TS into JS.