Загрузка видео...
Не удалось загрузить видео
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

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

🧠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!💡

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

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

great explanation of why this works

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

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

TIL

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

Ok nice

WTF
Похожие видео
Sensitive content
i wonder how many many people in the crowd realize they're lesbians every time she performs this
el ✴︎⋆.˚🚕
87,413 просмотров • 10 месяцев назад
