Post

💡 Use "using" for Vitest/Jest mocks/spys It's really nice to simplify You don't need manual mockReset / global afterEach cleanups anymore

Rob Palmer@robpalmer.bsky.social

ECMAScript excitement 😉 Congrats to @chronicles.org on meeting the conditions for Explicit Resource Management to be Stage 4 at @tc39.es today 🎉 It introduces `using` declarations and the Symbol.dispose protocol to deterministically and ergonomically release resources 👍 github.com/tc39/proposa...

Yes, it’s my favourite use case so far. The one thing I do miss still, is the ability to use it without declaring a variable. But there’s already another proposal to solve that.