Загрузка видео...

Не удалось загрузить видео

На главную

Every time I post this, I get so many WTF's in the comments. It's the 'string & {}' trick. Still absolutely essential for getting 'loose autocomplete' in library code.

77,725 просмотров • 1 год назад •via X (Twitter)

Комментарии: 11

Фото профиля Matt Pocock
Matt Pocock1 год назад

My course is the bomb, if bombs were 30% off

Фото профиля SecBriefs | Making Cybersecurity Simple
SecBriefs | Making Cybersecurity Simple1 год назад

🧠Studying for #CompTIA #Security+ but struggling with #Cybersecurity terms?🔍 Cybersecurity Dictionary for Everyone covers everything you need to know and is available on Amazon!🔐 🚀Boost your Security+ prep with it today!💡

Фото профиля Panta
Panta1 год назад

Super cool! I was curious so I gave it a try - it seems to also work with a String constructor!

Фото профиля Renato Carneiro
Renato Carneiro1 год назад

type DontFuckMyAutoComplete<T extends string> = T | (string & {}); type Model = DontFuckMyAutoComplete <“gpt-4o” | “gemini”>;

Фото профиля Michael Feldstein
Michael Feldstein1 год назад

great explanation of why this works

Фото профиля Cory Simmons
Cory Simmons1 год назад

I'm not going to learn anything else about Typescript. I'm just going to have AI do it and hope it works. Tired of all this goofy stuff

Фото профиля Tom Duncalf
Tom Duncalf1 год назад

Haha that's wild. Had no idea this was possible. Nice explanation :)

Фото профиля Akaam Shamerany
Akaam Shamerany1 год назад

TIL

Фото профиля Ryan Rampersad
Ryan Rampersad1 год назад

For a second there, I thought that was a Rust syntax trick you were sharing

Фото профиля Light
Light1 год назад

Ok nice

Фото профиля shaqcn
shaqcn1 год назад

WTF

Похожие видео