CommunityNews

CommunityNews

Type-Level Programming in TypeScript

The TypeScript type system is immensely powerful, and while the language itself is, of course, Turing complete, so is the type system itself. This allows us to implement types that are far more sophisticated than what is possible in most popular programming languages, as we can do computations on a type-level which is, essentially, what characterizes type-level programming.

In the following, I will demonstrate how we can utilize features of the TypeScript type system such as conditional types, indexed array types, and more to implement a type that computes a given Fibonacci number

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

Where Next?

Popular Frontend topics Top

First poster: PaigePalmer
Progressive Web Apps (PWAs) are starting to get some attention. For instance, Amazon is using it for game streaming service on iOS. PWAs ...
New
First poster: bot
The No-Framework Framework: JavaScript Without React Part I. How I improved my programming speed by replacing React with plain JavaScrip...
New
First poster: bot
Libsodium has been fully supporting WebAssembly as a target for quite a long time. This includes its built-in benchmark suite, that can r...
New
CommunityNews
As JavaScript developers, the sheer amount of stuff we’re expected to know is enormous, and it grows bigger every day. With so many diff...
New
First poster: dyowee
The key reason why you (and likely most developers) struggle with CSS, is that you underestimate it. Underestimating CSS leads to a stra...
New
First poster: bot
Backend languages in the browser have been a thing for a long time. Google Web Toolkit would compile Java applications into JavaScript, a...
New
First poster: bot
JavaScript is a great programming language, but thanks to the fact that its initial release was built in only ten days back in 1995, coup...
/js
New
First poster: bot
Here’s what I think: if you are building websites, you don’t need React (in most cases). I have been building websites for over nine yea...
New
AstonJ
I love videos like this and it follows the same theme as @jaeyson’s thread here - I reckon the @ElixirCasts crew should consider experime...
New
First poster: bot
Since the Humio web client is built in Elm, I’d like to share some of our learnings with Elm over the years. Specifically, working with U...
New

Other popular topics Top

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
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
Exadra37
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1143 25883 760
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
New