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

New
First poster: bot
Stork Turns One: Building a search tool for static sites with Rust and WebAssembly • jameslittle.me. Stork, my web search side project, ...
New
First poster: bot
Ashley Williams Discusses the Future of WebAssembly at the WebAssembly Summit . Williams commented on the results of a Twitter poll sh...
New
First poster: bot
You can write fast, modern, responsive web applications by generating your HTML on the server, and delivering that (with a little help) d...
New
First poster: bot
The Tower of Hanoi is a classic mathematical puzzle that is often used as an introduction to recursion. We can express a solution to this...
New
First poster: bot
This is a guide for starting a TypeScript project in 2021 with modern tooling. TypeScript 4 Optionally esbuild to bundle for browsers (...
New
First poster: bot
At NoRedInk we have one of the largest Elm apps in the world. It serves millions of teachers and students, and our frontend code is almos...
New
First poster: bot
User-preference based media features, container queries, and media queries for new screen types, such as foldable screens, will enable us...
New
First poster: AstonJ
;; This is an animated & interactive guide to ;; building a game in ClojureScript, because ;; I find the design patterns very intere...
New
First poster: bot
CSS Fingerprinting is a technique of tracking and gathering information on site visitors. This method exploits the nature of CSS to track...
New

Other popular topics Top

AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
AstonJ
This looks like a stunning keycap set :orange_heart: A LEGENDARY KEYBOARD LIVES ON When you bought an Apple Macintosh computer in the e...
New
Margaret
Hello content creators! Happy new year. What tech topics do you think will be the focus of 2021? My vote for one topic is ethics in tech...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
PragmaticBookshelf
Author Spotlight: Tammy Coron @Paradox927 Gaming, and writing games in particular, is about passion, vision, experience, and immersio...
New
New