CommunityNews

CommunityNews

Misusing TypeScript Assertion Functions for Fun and Profit

Misusing TypeScript Assertion Functions for Fun and Profit — Sympolymathesy, by Chris Krycho.
TypeScript’s assertions functions (asserts) can be mis-used to good effect when modeling unfortunate mutation-driven APIs. But “misuse” is the right word.

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

Where Next?

Popular Frontend topics Top

First poster: bot
At Hasura, we wanted to introduce a statically typed frontend language for quite some time now. We discussed which one we should choose a...
New
First poster: bot
10 bad TypeScript habits to break this year. TypeScript and JavaScript have steadily evolved over the last years, and some of the habits...
New
First poster: bot
Extend existing APIs This project is useful in any environment where Lua code is accepted, with the powerful option of simply declaring a...
New
First poster: bot
I had an “oh, duh, of course” moment a few weeks ago that I wanted to share: is WebAssembly the next Kubernetes?
New
First poster: bot
How Prime Video updates its app for more than 8,000 device types. The switch to WebAssembly increases stability, speed.
New
First poster: bot
Enarx 0.6.0: Fushimi Castle. This release is a developer-only, preview release. It is not production ready. We hope that you will experi...
New
First poster: bot
Why React Re-Renders. In React, we don’t update the DOM directly, we tell React what we want the DOM to look like, and React tackles the...
New
First poster: bot
All branches will diverge from the stem: from Elm to Derw. Forgive the fancy title, but I felt it fit this month’s Derw improvements wel...
New
First poster: bot
SVGs as Elm Code. Moving SVGs out of the file system and into regular Elm code can make icons easier to manage, especially if you find y...
New
First poster: bot
GitHub - adamshaylor/cooking-with-typescript: A collection of patterns for TypeScript 4.8. A collection of patterns for TypeScript 4.8. ...
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
AstonJ
I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl: The Ser...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New
New