-
You can still do optimisations based purely on Javascript semantics. This is similar to the first example you give with dead function elimination, and many minifiers do some amount of this already, but you can take it to some extremes. One example of this is the (no longer maintained) Prepack project from Facebook. The core idea is to evaluate as much Javascript as possible at compile time, with the expectation that the result will probably be smaller (albeit less human readable) than the initial code.
-
InfluxDB
Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
-
If you can guarantee that Typescript type hints will always be followed, you can turn it into more optimised code. Unfortunately, this means you've got to break Javascript semantics, so this means creating a new language, but people have done it. For example, AssemblyScript is a language that is designed as a strict subset of Typescript that compiles directly down to WebAssembly instead of Javascript, producing much more efficient code (most of the time). The tradeoff is that it has some slightly different semantics to Javascript, which means your existing codebase — and most of the libraries you use — will probably require some adaption before running correctly in AssemblyScript.
-
I think only Google Closure Compiler did some optimizations based on its JSDoc-style annotations (see docs). If I remember correctly, types mostly allowed renaming objects' properties across modules, but most other advanced optimizations (like dead code elimination or functions inlining) didn't rely on types. In my experience properties renaming resulted in subtle, hard to discover bugs and I'd say they didn't bring much benefit.