ECMAScript excitement 😉
TC39 has advanced the Record & Tuple proposal to Stage 2!
This brings immutable datastructures to JavaScript.
Congrats to my colleagues
@TechAtBloomberg
@r_ricard
@rickbutton
@NicoloRibaudo
who are championing the proposal.
ECMAScript excitement 😉
Congrats to
@smooshMap
on advancing Iterator Helpers to Stage 3 at
@TC39
today 🎉
Both sync & async iterators gain these methods:
🔸 map
🔸 filter
🔸 take
🔸 drop
🔸 flatMap
🔸 reduce
🔸 toArray
🔸 forEach
🔸 some
🔸 every
🔸 find
ECMAScript excitement 😉
ES2022 is approved by Ecma International 🎉
🔶 Class Fields
🔶
#field
in obj checks
🔶 Class Static Blocks
🔶 .at() for arrays & strings
🔶 Error Cause
🔶 Object.hasOwn()
🔶 RegExp Match Indices (/d)
🔶 Top Level Await
ECMAScript excitement 😉
Congrats to
@acutmore
on advancing TC39 proposal "Change Array by Copy" to Stage 3 🎉
These new array methods return a fresh array, leaving the original unmodified.
🔹 .with()
🔹 .toReversed()
🔹 .toSorted()
🔹 .toSpliced()
Source Maps have caused too many unnecessarily frustrating debugging situations.
I'm super pleased we're now investing in hardening the spec and the ecosystem tools to make JS debugging a first-class experience.
TC39 has formed a new Task Group to standardize Source Maps.
Source Maps are a file format used for debugging and post-hoc analysis of JavaScript and other languages.
The convenors of TC39-TG4 are
@jkup
and
@littledan
.
ECMAScript excitement 😉
Congrats to
@bakkoting
on advancing Set Methods to Stage 4 this week
@TC39
🎉
Set.prototype gains these methods:
🔶 intersection
🔶 union
🔶 difference
🔶 symmetricDifference
🔶 isSubsetOf
🔶 isSupersetOf
🔶 isDisjointFrom
ECMAScript excitement 😉
Congrats to
@acutmore
@TechAtBloomberg
on advancing "Change Array by Copy" to Stage 4
@TC39
🎉
These new array methods return a fresh array leaving the original unmodified.
🔹 toReversed()
🔹 toSorted()
🔹 toSpliced()
🔹 with()
Prettier will be 5x faster thanks to
@fabiospampinato
🔥
For cached usage the win is 22x so far 😮
Zero Rust. This is top-tier JS performance work, described in detail in the blog post. Learn about efficient globbing, minimizing FS access, work-skipping, caching.
This is gold.
As a direct result of the bounty,
@fabiospampinato
has been rewriting the prettier CLI to be orders of magnitude faster. Please try it out and check this awesome performance deep dive:
ECMAScript excitement 😉
Congrats to
@NicoloRibaudo
on advancing Optional Chaining for assignments to Stage 1
@TC39
today 🎉
Today Optional Chaining works on the Right-Hand Side of assignment.
value = obj?.prop
This proposal allows it on the left 👍
obj?.prop = value 🆕
bun is a new JavaScript runtime 🎉
↔️ An alternative to existing runtimes like Node, Deno, etc
🔋 Batteries Included - the toolchain has compilation, bundling, testing, npm fetching
🍎 Uses JSC engine (not V8)
⚡ Written in Zig (not Rust/C++)
🔥 Super fast
By
@jarredsumner
ECMAScript excitement 😉
Congrats to my coworker
@peetklecha
@TechAtBloomberg
on advancing the Promise.withResolvers() proposal to Stage 2
@TC39
today 🎉
It creates a promise with exposed functions to resolve or reject it. Also known as a "Deferred" 👍
TypeScript source code now uses ES modules 🎉
🔹 npm package is 46% smaller
🔹 Build times reduced by 10-25% 😲
The next likely step is to ship native ESM for even more wins 👍
e.g. making the CJS entrypoint a thin wrapper around a native ESM entrypoint will save 7 MB alone 🔥
Want to hear about our refactoring adventures?
We put together a nice short write-up (just 6,000 words) about our journey in modernizing the TypeScript codebase, and our migration to modules!
Typescript 4.5 is on track to support the native ES Module features introduced in Node 12 thanks to Wes Wigham 🎉
🔥 *.mjs & *.cjs files are importable
🔥 "type": "module" in package.json
🔥 "exports" in package.json
🔥 native import() in CJS files
ECMAScript excitement 😉
Congrats to my coworker
@peetklecha
@TechAtBloomberg
for advancing Promise.withResolvers to Stage 4
@TC39
today 🎉
const { promise, resolve, reject } =
Promise.withResolvers();
Also known as a "Deferred"
ECMAScript excitement 😉
Congrats to
@bakkoting
on advancing the Set Methods proposal to Stage 3 at
@TC39
today 🎉
Set.prototype gains these methods:
🟡intersection
🟡union
🟡difference
🟡symmetricDifference
🟡isSubsetOf
🟡isSupersetOf
🟡isDisjointFrom
ECMAScript excitement 😉
ES2023 was approved by Ecma International at the 125th General Assembly in Geneva 🎉
Featuring...
🔶 Array findFromLast()
🔶 Change Array by Copy
🔶 Hashbang Grammar
🔶 Symbols as WeakMap keys
ECMAScript excitement 😉
Congrats to
@pzuraq
on advancing TC39 proposal Decorators to Stage 3 🎉
This is conditional advancement based on separating out metadata into a follow-on proposal.
TypeScript excitement 😉
Congrats to
@TitianCernicova
@TechAtBloomberg
on landing --isolatedDeclarations in upstream TypeScript 🎉
It's the start of a journey to faster type-checking at scale 🔥
An epic collab between folk in TS, Bloomberg & Google 👍
📢 LLRT (Low Latency Runtime) is a new JS runtime from Amazon ✨
⚡ Designed for fast Serverless startup time
🦀 Written in Rust
💨 Embeds the QuickJS engine written in C
💡 Lightweight (~3MB)
🧪 Experimental!
TypeScript 5.5 is now available! 🎉✨
Now with
✅ Inferred Type Predicates
✅ RegEx syntax checks
✅ The JSDoc @import Tag
✅ ${configDir} for easier tsconfig inheritance
✅ --isolatedDeclarations
✅ Lots of new optimizations
And more! Try it today!
ECMAScript excitement 😉
Congrats to
@_shu
on shipping
@TC39
Stage 3 Promise.withResolvers in upstream
@v8js
heading for Chromium 119 🎉
const { promise, resolve, reject } =
Promise.withResolvers();
Also known as a "Deferred" 👍
ECMAScript excitement 😉
New proposal Records & Tuples achieved Stage 1 at TC39! This brings immutable datastructures to JS.
Congrats to champions
@r_ricard
and
@rickbutton
Achievement Unlocked! Signals advance to Stage 1 in TC39.
Big thanks to
@JatinRamanathan
,
@littledan
, and
@wycats
for presenting today.
Lots more work to do during Stage 1, but we're now officially under consideration.
Typescript 4.5 is on track to support explicit type-only import specifiers thanks to
@atcb
🎉
📘 import { a, type b } from "p"
➡️
📙 import { a } from "p"
This use of `type` conveys more information to the reader and will simplify tooling.
ECMAScript excitement 😉
This week
@TC39
advanced these proposals 🎉
4️⃣ RegExp: Duplicate Named Cap Groups
4️⃣ Set Methods
3️⃣ eval for Trusted Types
3️⃣ eval-injected global var is redeclarable
2️⃣.7️⃣ Math.sumPrecise
2️⃣.7️⃣ Promise.try
1️⃣ Error.isError
1️⃣ Signals
1️⃣ Strict `using`
ECMAScript excitement 😉
Import Assertions will (pending editorial reviews) re-advance to Stage 3 under the new name "Import Attributes" 🎉
The `assert` keyword is now renamed to `with`
import obj from "mod" with { "type": "json" }
`assert` will be deprecated ⚠
ECMAScript excitement 😉
Congrats to
@evanwallace
on shipping support for
@TC39
Stage 3 Decorators in esbuild v0.21 🎉
Evan's diligent approach led to bugs being reported in Babel, TypeScript, SWC, plus clarification in the forthcoming ES spec text 👍
@TheBrousse
@varjmes
@pujux_
@zyxwvutswal
@yagiznizipli
@guykdm
Yagiz is a kind person who has donated extreme amounts of his free time to improving Node performance without payment, because he wants to lift up the community.
I'm impressed how reasonable his responses are given the wild assertions being made here.
ECMAScript excitement 😉
Congrats to
@ljharb
for advancing Array Grouping to Stage 4
@TC39
today 🎉
🔶 Object.groupBy()
🔶 Map.groupBy()
These are static functions that operate on arrays.
Announcing TypeScript 5.4! 📢
Now with:
✅ Smarter control-flow analysis in closures
✅ The `NoInfer` utility type
✅ Broader support for bundlers and runtimes
✅ Quick fixes for missing parameters
✅ Improved auto-imports
and more! Try it today!
TypeScript 5.5 RC is now out to try! We're looking for feedback on inferred type predicates, JSDoc imports, regex checking, ${configDir}, isolatedDeclarations, build optimizations, and more!
JavaScript engines are much like buses: you wait years for one, then two shiny new ones show up at once!
🔥 QuickJS by Fabrice Bellard
🔥 Hermes by Facebook
ECMAScript excitement 😉
Congrats to Rezvan Mahdavi Hezaveh on shipping
@TC39
Stage 3 Set Methods in
@v8js
heading for Chrome 122 🎉
🔶 Adds intersection(), union(), etc
Thanks to
@_shu
, Liviu Rau, Michael Achenbach & Adam Klein for the reviews 👍
ECMAScript excitement 😉
TC39 Stage 0 proposal BigDecimal for arbitrary-precision decimal numbers has been implemented in the QuickJS engine made by Fabrice Bellard.
0.1d + 0.2d === 0.3d // true!
Profiling production code in
@ChromeDevTools
now shows you original function names in Chrome 109 🎉
This uses sourcemaps to decode the minified function name.
Thanks to Andres Olivares for implementing this 👍
ECMAScript excitement 😉
TC39 Stage 2 proposal Record & Tuple brings immutable data structures to JavaScript that can be compared by value.
#{ a:1 } === #{ a:1 } // true 🔥
@r_ricard
from
@TechAtBloomberg
will reveal more at
@thejsnation
in Amsterdam in June.
ECMAScript excitement 😉
Congrats to
@giltayar
& my fellow champions
@drosenwasser
@romulocintra
on advancing TC39 proposal "Type Annotations" to Stage 1 🎉
This proposal was formerly known as "Types as Comments"
Hopefully this will make using typed JavaScript even easier 🎈
TypeScript 4.9 Beta is out 🎉
🔷 New `satisfies` operator to check compatibility
🔷 Enhanced narrowing of `in`
🔷 Stricter NaN checks
🔶 File-Watching is more efficient - reduced polling
🔶 No more speculative import-specifier-elimination in JS files
TypeScript 4.9 Beta is now available! Try out our improved 'in' operator narrowing, the new 'satisfies' operator, stricter 'NaN' checks, and more-efficient file-watching defaults!
This is big.
@guybedford
has managed to get Node to synthesise named exports from classic CommonJS modules 🎉
import { prop } from "cjs-module"
Many users have requested this for years.
If you are interested in low-level JS performance optimization techniques that exploit monomorphism & JIT,
@TitianCernicova
just dropped an experimental win of ~20% in the TypeScript checker 🔥
This kind of win does not get discovered everyday.
Announcing TypeScript 5.5 Beta! 📣
Now with type predicate inference, more type narrowing, an @import tag for JSDoc, the --isolatedDeclarations flag, performance & reliability improvements, and much more!
ECMAScript excitement 😉
Congrats to
@ljharb
on advancing the proposal for RegExp.escape to Stage 2
@TC39
today 🎉
It lets you escape arbitrary strings so they can be used in Regular Expressions.
RegExp.escape("(*.*)"); // "\(\*\.\*\)"
It may be non-obvious but the WebAssembly Garbage Collection proposal together with StringRef is key to enabling efficient sharing of structured data between WebAssembly & JavaScript ⚡
In time, the immense value of this work to the web platform will become apparent 🔥
Last week
@MylesBorins
successfully pushed Top-Level Await to Stage 3 at TC39 🚀
I'd like to say thank you for the input from the JS tooling community on this proposal.
TLA is a widely demanded feature that allows you to await promises from outside of functions.
(1/n)
Import Maps have now been implemented in all major browsers & engines 🔥
🔸 Chromium 89
🔸 Firefox 108
🔸 Safari 16.4 Beta
This lets browsers understand code that contains:
import _ from "lodash"
📜 This article by Yoshi explains what they are & the problem they solve.
Late last year, we implemented the Import Maps specification in Firefox. Yoshi (the engineer working on it) wrote an in-depth introduction to it, along with a deep dive that you can expect next week!
Read the blog post here:
ECMAScript excitement 😉
Congrats to
@ljharb
on advancing Error.isError to Stage 1 today
@TC39
🎉
Error.isError() allows you to test if a value is an Error instance. It works even if the Error originates from another Realm, similar to Array.isArray 👍
Typescript 5.0 is released 🎉
So many new features, including...
🔷 ES Decorators
🔷 --moduleResolution bundler matches semantics used by Vite et al
🔷 --allowImportingTsExtensions allows referencing *.ts files 👍
🔷 --allowArbitraryExtensions means app.css gets app.d.css.ts
Deno contains a single version of TypeScript.
TypeScript checking gets better over time, meaning source code fixes are needed to work with new versions.
Is the expectation that all Deno packages should be fixed up when Deno bumps its TypeScript version?
ECMAScript excitement 😉
Congrats to Justin Ridgewell
@vercel
&
@legendecas
on advancing the "Async Context" proposal to Stage 1 at
@TC39
today 🎉
AsyncContext lets you propagate state throughout a potentially async callstack.
It is similar to Node's AsyncLocalStorage 👍
ECMAScript excitement 😉
Congrats to champions
@littledan
@apaprocki
on advancing the TC39 proposal for Decimal numbers to Stage 1.
0.1m + 0.2m === 0.3m // true!
ECMAScript excitement 😉
Congrats to
@caio_nepo
on advancing all three Class Fields proposals to Stage 4 at TC39 🎉
Thanks to champion
@littledan
and the many **many** contributors who came together to make this happen. It has been an epic joint effort over several years.
📜 The Future of TypeScript with
@drosenwasser
🔹 Delivered in 2023: Decorators, `using`, IDE delights, TypeChat
🔹 Priority for 2024: Speed
🔹 Biggest change coming: Isolated Declarations for parallel builds
🔹 Prepare for: TS5.5 deprecations
🔹 Most demanded: No build step 👍
Promise.withResolvers() has hit Stage 4, is in Chrome+FF, and is easy to polyfill.
This is really handy for situations where you don't want to pass work into a Promise, but instead pass around the resolve/reject methods.
Super handy for callback and stream based APIs
ECMAScript excitement 😉
Congrats to
@ljharb
on advancing Array Grouping to Stage 3
@TC39
today 🎉
🔶 Object.groupBy()
🔶 Map.groupBy()
These are static functions that operate on arrays. The previous method-variant was found to be web-incompatible.
tsimp lets Node run TypeScript files directly 👍
💯 Uses the genuine tsc compiler
⚡ Blazing fast due to caching
✅ Includes type-checking
🆕 Works with Node 20.6 --import
Here's the conclusion of this thread, a TypeScript --import module loader with the full power of TSC's type checking, and (warm cache) performance as good as or better than "blazing fast" ts compilers written in Rust and Golang (which don't typecheck).
@mattpocockuk
I always preferred using DTS files to express type-only modules as it felt like it better conveyed intent.
However
@atcb
helpfully explained TypeScript doesn't truly support this usage pattern and so the guidance today is to use TS files.
TypeScript 5.4 Beta is available to try! This release has lots of type narrowing improvements, the 'NoInfer' type helper, groupBy, better options for bundlers, and more!
⚡️ Do you enjoy making JavaScript / C++ systems go fast?
I'm looking for a Performance Engineer to help make the
@TheTerminal
even faster 🔥
Tech stack spans
@nodejs
, Chromium,
@SpiderMonkeyJS
,
@electronjs
with upstream contributions encouraged & supported by the
@business
Node excitement 😉
Congrats to
@JoyeeCheung
at
@igalia
on landing **experimental** support for require(ESM) in Node 🎉
The intent is to allow more CommonJS packages to migrate to ESM without breaking compatibility. This should help eliminate the [ERR_REQUIRE_ESM] error 👍
Happy birthday to us! 🎂 What better way to celebrate 9 years of being public than a beta release?
Try out TypeScript 4.5 beta! Now bringing great new features including better support for ES modules in Node.js.
Safari 17.4 beta is out ! So much in it, including:
- @scope
- align-content on blocks
- vertical form controls
- <hr> inside <select>
- <input type="checkbox" switch>
- VP8/VP9 & WebM on iOS & iPadOS
- Vorbis audio codec on iOS
- Fullscreen API on iOS