How TypeScript 4.9 satisfies

September 30, 2022 By Mark Otto Off

The Web Almanac 2022’s Take on the State of JavaScript in the Real World — What’s better: a survey, or real world usage data from 8 million sites? If you prefer the latter, this is for you. The Web Almanac is an annual ‘state of the web’ report into what technologies are being used online and amongst the over 20 chapters of insights is a JavaScript-specific chapter. Some highlights:

  • More JavaScript is going over the wire than ever before. 1.3MB for a page only puts you at the 90th percentile(!) About half of it goes unused too..
  • 77% of mobile pages have render-blocking scripts in <head>
  • Dynamic import is barely seen – about 0.3-0.4% of pages.
  • Web Workers are used on 12% of pages.
  • Of the 1,000 top sites, 17% use webpack, ~1.5% for Parcel.
  • Psst.. jQuery is still used all over the place..

Jeremy Wagner and the HTTP Archive

Announcing TypeScript 4.9 Beta — This is a very satisfying update that introduces the satisfies operator for when you want to validate a type of an expression matches some type but without changing the actual resulting type. The in operator also becomes more powerful when narrowing types with unlisted properties.

Daniel Rosenwasser (Microsoft)

📒 Articles & Tutorials

Use .NET From Any JavaScript App in .NET 7 — A showcase of the JavaScript to .NET interop by way of a port of the famous TodoMVC to .NET running via WebAssembly. Blazor is the most commonly associated framework with .NET and C# in the browser, but the support works independently of Blazor too.

Pavel Šavara (Microsoft)

🛠 Code & Tools

Preview.js: Fast Component Previews in Your IDE — This extension will automatically generate valid props in your components in the preview, has support for CSS-in-JS, and works offline. Available for VS Code and IntelliJ/WebStorm, and supports Solid and Vue components too.

Zenc Labs

Ezno: An Experimental JavaScript Compiler — The latest in a long line of JavaScript compilation experiments – and we’re all here for it. This post explains the philosophy and reasoning and why type checking is at the heart of it: “You can think of it as an extension to TSC, similar ideas but taken further.”

Ben X

⚡️ OTHER QUICK RELEASES:

Find JavaScript Jobs with Hired — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It’s free for job-seekers.
Hired

🤖  Well, okay..

You’ve got some semi-structured data written in Markdown and want to convert it to JSON. What do you do? ▶️ Get OpenAI’s GPT-3 machine learning model to do it of course..(!)

It continues to amaze me the things this new technology can pull off. Maybe I’ll see if it can help me with my crossword later 🙂

– Peter Cooper, your editor