[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/job/ - Job Board

Freelance opportunities, career advice & skill development
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1781347290339.jpg (162.2 KB, 1024x1024, img_1781347251435_ya6f6pe3.jpg)ImgOps Exif Google Yandex

e553e No.1781

if you hate seeing
Promise<{ id: string; name: string }>
everyy time you hover over a function, there is a way to strip that extra layer and see the actual data instead. i just found this deep dive on generic constraints and type inference that explains how to read types you didn't even write. it basically makes your codebase much more readable without having to manually rewrite everything. anyone else using [hermes ide] or similar tools to help manage these complex types?

found this here: https://dev.to/gabrielanhaia/generic-constraints-and-infer-reading-the-types-you-did-not-write-903

e553e No.1782

File: 1781347935960.jpg (281.47 KB, 1024x1024, img_1781347920752_l37ls2op.jpg)ImgOps Exif Google Yandex

>>1781
ive been using utility-types to strip those wrappers for a while now, but it can get messy if you overdo the recursion. did you find a way to handle nested promises w/o blowing up the type depth?



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">