---
title: "TypeScript 4.0, going deep into proxies, and I sunk your battleship"
publication: "JavaScript Weekly"
issue: 502
published_at: "2020-08-21"
canonical_url: "https://javascriptweekly.com/issues/502"
---

Plus more JavaScript links, tutorials, and projects.       

#502 — August 21, 2020 

[Unsubscribe](https://javascriptweekly.com/leave/*|UID|*)|[Read on the Web](https://javascriptweekly.com/issues/502)   

JavaScript Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/ukrozquaad0fzctbthfk.jpg)](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/)  

[TypeScript 4.0 Released](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/) — The latest major version of TypeScript, the increasingly popular superset of JavaScript that adds optional static typing, is here. No major breaking changes, but a laundry list of tweaks and smaller new features, including: 

- variadic tuple types
- editor and editor integration improvements
- labeled tuple elements
- short circuiting assignment operators (e.g. `a ||= b`)
- the [new TypeScript web site!](https://www.typescriptlang.org/) 

Daniel Rosenwasser and the TypeScript Team   

[Metaprogramming with Proxies](https://exploringjs.com/deep-js/ch_proxies.html) — Dr. Axel, the author of [Deep JavaScript](https://exploringjs.com/deep-js/), keeps releasing extra chapters of his book for free online, and this one goes as deep into the topic of object proxies as you could ever hope. Do you _need_ to know all of this? No. Am I glad the knowledge exists if I ever need to know? Yes! 

Dr. Axel Rauschmayer   [![\](https://copm.s3.amazonaws.com/6e0e64bf.jpg)](https://frontendmasters.com/courses/svelte/?utm_source=cooperpress&utm_medium=email&utm_campaign=svelte) 

[The Definitive Introduction to Svelte with Rich Harris](https://frontendmasters.com/courses/svelte/?utm_source=cooperpress&utm_medium=email&utm_campaign=svelte) — Learn how the Svelte framework works, write svelte components, and take a tour through the entire Svelte API in this detailed video course. 

Frontend Masters sponsor   

[npm v7 Now in Beta](https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major) — Isaac is back bearing good news: there’s a new major beta version of `npm`. Run `npm i -g npm@next-7` to try it now, but he notes it’s “a big one” and there are rough edges and breaking changes ahead. Trouble-free improvements are promised for most users, but this post digs into the changes. 

Isaac Z. Schlueter   

[ts-migrate: A Tool for Migrating to TypeScript at Scale](https://medium.com/airbnb-engineering/ts-migrate-a-tool-for-migrating-to-typescript-at-scale-cd23bfeb5cc) — Learn about how Airbnb used codemods to accelerate migration from JavaScript to TypeScript and how their new `ts-migrate` tooling ([GitHub repo](https://github.com/airbnb/ts-migrate)) can help with the process. 

Sergii Rudenko     

**⚡️ Quick bytes:** 

- Want to do some fun coding this weekend? The [latest Js13kGames competition](https://js13kgames.com/) began last week and runs till September 13.
- Fancy having an Angular theme for your Slack? The Angular Twitter account [has you covered.](https://twitter.com/angular/status/1296492203863412736)
- The final release of Vue 3.0 remains tantalizingly close with the [sixth release candidate](https://github.com/vuejs/vue-next/releases/tag/v3.0.0-rc.6) just being released.
- If you're using AngularJS (yes, the original one) [its LTS (Long Term Support) period was extended](https://blog.angular.io/angularjs-lts-extended-in-response-to-covid-19-321b037212f5) to December 31, 2021 due to COVID-19.
- A neat JS 'sketch' of [how mark and sweep garbage collection works.](https://twitter.com/mgechev/status/1296333674795892738)   

💻 Jobs  

[React JS Developer (Remote)](https://www.komoot.com/jobs/reactjs-developer) — 13 million people and counting plan outdoor hiking and cycling routes with our apps. If you are smart and talented React Dev, join us to inspire more people to explore more of the great outdoors. 

Komoot   

[JavaScript Developer at X-Team (Remote)](https://x-team.com/remote-javascript-developer-jobs/?utm_source=cooperpress&utm_medium=email-ad&utm_campaign=js) — Join the most energizing community for developers and work on projects for Riot Games, FOX, Sony, Coinbase, and more. 

X-Team   

[Get Tech Interviews This Week](https://www.vettery.com/tech?utm_source=newsletter&utm_medium=cooper-javascriptweekly&utm_term=tech&utm_content=grouped&utm_campaign=ad-77584) — Create a profile on Vettery to connect with hiring managers at startups and Fortune 500 companies. It's free for job-seekers. 

Vettery  

📚 Tutorials, Opinions and Stories 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/m3tfeq0enrfgqueuert5.jpg)](https://www.youtube.com/watch?v=U64vIhh0TyM)  

▶[Let's Build a Multiplayer Battleship Game](https://www.youtube.com/watch?v=U64vIhh0TyM) — A three part screencast series (by three different developers) that really digs deep into building a complete multiplayer game on both the front and back end. You’d need to commit some hours to getting through all of this, but it’s a neat collaboration and might inspire you to take part in[Js13kGames!](https://js13kgames.com/) 

Ania Kubów, Jesse Hall, and Kyle Cook   

[Build a Confirmation Modal in React with State Machines](https://daveceddia.com/react-confirmation-modal-state-machine/) — React confirmation modals can be tricky, with `useEffect` and keeping track of shown/hidden, loading/not, and errors. State machines make it somewhat easier. 

Dave Ceddia   

[Stream Chat API & JavaScript SDK for Custom Chat Apps](https://getstream.io/chat/?utm_campaign=2020_08_21_javascriptweekly&utm_medium=promoted_newsletter&utm_source=javascriptweeklypromoted) — Build real-time chat in less time. Rapidly ship in-app messaging with our highly reliable chat infrastructure. 

Stream sponsor   

[Modern Ways of End-to-End Testing with Cypress](https://mattermost.com/blog/modern-ways-of-end-to-end-testing-with-cypress-js/) — v5.0 of [the popular testing system](https://www.cypress.io/) has just come out but this post gently demonstrates what end-to-end testing _is_, how it relates to other forms of testing, and how to write your first Cypress powered tests for a web app. 

Zubair Ahmed   

[Understanding Destructuring, Rest Parameters, and Spread Syntax](https://www.taniarascia.com/understanding-destructuring-rest-spread/) — Tania’s tutorial on [understanding generators](https://www.taniarascia.com/understanding-generators-in-javascript/) was _super_ popular with you, so you might like this similarly deep but accessible dive into other handy features ES6/ES2015 brought us. 

Tania Rascia   

▶[An Overview of Higher Order Functions in JavaScript](https://www.youtube.com/watch?v=uwupKYlCId4) — A 10 minute screencast covering one aspect of functional programming in JavaScript. 

Brodey Newman   

[An In-Depth Explanation of `Promise.all` and Comparison With `Promise.allSettled`](https://dev.to/mpodlasin/an-in-depth-explanation-of-promise-all-and-comparison-with-promise-allsettled-2olo) — Covers both in a very gentle way – aimed at beginners. 

Mateusz Podlasin   

[Decreasing Bundle Sizes with ES Modules in Angular 10](https://www.grapecity.com/blogs/decreasing-bundle-sizes-with-es-modules-in-angular-10?utm_source=CooperPress&utm_medium=Dynamic&utm_campaign=JSWeekly_Q3_placement_08/2020) 

Wijmo, by GrapeCity, Inc. sponsor   

▶[React 17’s Best New Feature: Gradual Upgrades](https://www.youtube.com/watch?v=ImRnLVuVUno) — [React 17 boasts](https://reactjs.org/blog/2020/08/10/react-v17-rc.html) ‘no new features’, but this isn’t _entirely_ true – what’s new is just more subtle and will still benefit you. 

Harry Wolff   

[Six Angular Security Best Practices](https://snyk.io/blog/angular-security-best-practices/) 

Liran Tal and Natalia Venditto  

🔧 Code & Tools  

[Cypress 5.0: Fast and Reliable Testing for Anything That Runs in a Browser](https://github.com/cypress-io/cypress) — [v5.0](https://github.com/cypress-io/cypress/releases/tag/v5.0.0) adds support for test retries and requires Node 10+. There’s also [a migration guide](https://docs.cypress.io/guides/references/migration-guide.html#Migrating-to-Cypress-5-0) if you’re coming from an earlier version. 

Cypress.io   

[Embla: An Extensible Low Level Carousel for the Web](https://davidcetinkaya.github.io/embla-carousel/) — We first came across this over a year ago, but this bare-bones carousel option is still seeing updates and remains a decent dependency-free option. [Demos here](https://davidcetinkaya.github.io/embla-carousel/examples). 

David Cetinkaya   

[A Much Faster Way to Debug Code Than with Breakpoints or `console.log`](https://wallabyjs.com/?utm_source=cooperpress&utm_campaign=javascript&utm_content=javascript) — Wallaby catches errors in your tests and code and displays them right in your editor as you type, making your development feedback loop more productive. 

Wallaby.js sponsor   

[BootBot: A Facebook Messenger Bot Framework](https://github.com/Charca/bootbot) — Want to create bots that work on Facebook Messenger? BootBot gives you a modular foundation, the ability to subscribe to message events, helpers to send all supported message types, etc. See [some sample code](https://github.com/Charca/bootbot#getting-started) to see how easy it is. 

Maxi Ferreira   

[Elder.js: A Svelte-Focused Framework and Static Site Generator](https://github.com/elderjs/elderjs) — An opinionated static site generator and web framework for Svelte built with SEO in mind. 

Elder.js   

[ImmortalDB: A Resilient Key-Value Store for the Browser](https://github.com/gruns/ImmortalDB) — Data is redundantly stored in numerous places like in cookies, IndexedDB, LocalStorage, and SessionStorage, and self heals as needed. [v1.1](https://github.com/gruns/ImmortalDB/releases/tag/v1.1.0) just came out. 

Ansgar Grunseid        

Published by [Cooperpress](https://cooperpress.com/) and edited by [Peter Cooper](https://twitter.com/peterc) 

'JavaScript' is a trademark of Oracle Corporation in the US
We are not endorsed by or affiliated with Oracle. 

[Change your email address](https://javascriptweekly.com/edit_subscription/*|UID|*) or [stop getting this newsletter](https://javascriptweekly.com/leave/*|UID|*). 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
