Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Here's two TypeScript tips rolled into one: 1. TypeScript magic is everywhere, even in Node's built-in types 2. I bet you didn't know this was legal TS: error: [message: string]

80,986 Aufrufe • vor 1 Jahr •via X (Twitter)

10 Kommentare

Profilbild von Matt Pocock
Matt Pocockvor 1 Jahr

My course is 30% off right now!

Profilbild von vaibhav - oss/acc
vaibhav - oss/accvor 1 Jahr

wait this was so easy!!. 2yrs ago i use to copy over this to every project

Profilbild von Corey Ward
Corey Wardvor 1 Jahr

I did not know that you could name the items in a tuple type. Gonna go fix some that I have that are less than clear right now!

Profilbild von Matt Pocock
Matt Pocockvor 1 Jahr

Great for things like: type Position = [x: number, y: number, z?: number]

Profilbild von Nathan🔶Tarbert
Nathan🔶Tarbertvor 1 Jahr

That error type trick is defs something I would've never guessed, Matt's got all the good stuff lol

Profilbild von Artem Zakharchenko
Artem Zakharchenkovor 1 Jahr

This has to be new! Nice to see this. Alas, no strongly-typed events for EventTarget in lib.dom. That's why I built Rettime ( That and also a bunch of other reasons.

Profilbild von Twilight
Twilightvor 1 Jahr

How strange, I just discovered this yesterday accidentally 😂😂

Profilbild von Raman Paulau
Raman Paulauvor 1 Jahr

Vue uses this exact pattern for component defineEmits.

Profilbild von millcake
millcakevor 1 Jahr

Bruh... U trying to sell ur course talking about basic things Rly?

Profilbild von DJ Molehill
DJ Molehillvor 1 Jahr

TypeScript out here making tuples feel like dark arts. 🧙‍♂️🌀

Ähnliche Videos