It would be nice to have a browser that supports TS like Node, Deno and Bun... but these only support as something to be converted (lost) on the fly, not as something that can enable important optimizations at runtime. LibJS could do better!
I think Ladybird could enable TS features when found <script type="typescript">
, that also implies type="module"
, or when receive the HTTP header content-type: text/typescript
. Other browsers will not run this code and devs can write a failover code.
Why support TS, not just transpile to JS? As an engine can be more performant manipulating numbers in a Float64Array
than in a generic Array
, some runtime benefit can be gained by let arr: number = []
When a function is called with incompatible arguments, the engine must not allow the fate to decide application result... In this case the execution must to stop and an exception should be thrown. With this approach other optimizations can be achieved, by example: (a:number, b:number)=> a + b
, where the +
operator will always be an arithmetic operator (no string concatenation will be possible) and no elaborate conversion should be expected.
That can bring some of the WebAssembly performance to common web apps, with direct DOM interaction.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too