4 ms·
Compiled to what, wasm?
by fngjdflmdflg 1y ago
Compiled to what, wasm?
- teaearlgraycold 1y agoI wasn't thinking about browser runtimes. But maybe one day browsers will have native TS support?
- fngjdflmdflg 1y agoFor non-browser runtimes, react native is actually working on an AOT TS/Flow engine. But they ship a bytecode binary rather than what I'm proposing, although what I'm proposing might also be infeasible.
- Cthulhu_ 1y ago> But maybe one day browsers will have native TS support? This may already be a thing; node has native TS support by just ignoring or stripping types from the code, TS feature that can't be easily stripped (iirc namespaces, enums) are deprecated and discouraged nowadays. TS is not actually that special in terms of running it. TS types are for type checking which isn't done at runtime, running TS is just running the JS parts of the code as-is.
- teaearlgraycold 1y agoWell we'd need browsers to natively support type stripping.