Recursive types in TypeScript

preview_player
Показать описание
Defining a recursive type using type aliases in TypeScript and allows for infinitely nested arrays of numbers.

Рекомендации по теме
Комментарии
Автор

Amazing how typescript solves a problem that shouldn’t even exist 😂

rogue.ganker
Автор

What are the practical uses of this example ?

MrDragos
Автор

Is it not the same as

type NestedNumbers = number | number [ ]

What's different?

thedelanyo
Автор

Even C++ makes more sens than this sh-

DANIEL
Автор

why tf you want to nest numbers in numbers

escobarn
Автор

Jeez, i didnt know this was even possible in ts.

boy-zc
Автор

This is amazing. I love how it simplifies things.

hamdibeep
Автор

This just does not look right. val:nestednumbers should be a number. Not an array.

discontinuity
Автор

i thought of buying their course but then i opened their website on mobile browser and its broken broken to its core and they are frontend masters :P

isfandyar
Автор

Hahahahah so many years and of evolution and the field and this is where we are now. What a goddamn joke.

vacc
Автор

Jesus Christ typing something should not require this many hoops

mossfoobar
Автор

I have no idea who this guy is or what he’s talking about. No clue. HOWEVER, I would listen to anything he has to say. Mfer out here Attenboroughing his way thru some numbers and I’m here for it. Could someone kindly direct me to episode one? 🤌🤌

kipsonofsip