🔥 Here are 4 more ways you can use JavaScript's new Promise.withResolvers() method.
Use it today. It's in every browser and can be polyfilled in 9 lines.
Визуальный генератор разметки на CSS Flexbox или CSS Grid. Можно выбрать из готовых шаблонов и адаптировать под себя. Даёт подсказки по свойствам, генерирует HTML и CSS.
Экономит время на старте вёрстки страницы, если у вас нет дизайн-системы.
https://t.co/UcI9fn69IZ
Daily reminder that generic functions are awesome.
Here, the parameter of input gets inferred from the type of our Zod schema 🤯
Implementation below ⬇️
🔥 TypeScript Tip 🔥
You can use 'as const' on a template literal to force TypeScript to infer it.
Without the as const, it defaults to string. With it, it goes DEEP.
great read on why qwik + astro is such a game changer
“it's the best of both worlds — lighter than React and less verbose than Vanilla JavaScript”
https://t.co/egsgOSBsup
I just deleted over 80+ JSX elements and turned them all into a single svg file using this:
https://t.co/dHJpXmH4Ju
It works amazing and it's very easy to follow!
Jacob did amazing work on this, it's wonderfully simple and type-safe!
Is there any situation where "incremental": true SHOULDN'T be used in a tsconfig.json?
It spits out a .tsbuildinfo file which can be used to warm up the cache for later runs, making future checks faster.
Did you know that you can generate an overview of your Git repo—complete with stats and ASCII art—with this nice little CLI tool written in Rust? https://t.co/ivL5JW1Zqd 🦀
Problem: You need to deep clone a JavaScript object.
Solution: structuredClone.
It clones nearly everything including dates, array, blobs, Error, and much more.
And it's supported in all major browsers. 🔥
#javascript
When writing application-level TypeScript, you should be using inference as much as possible.
But remember - using type helpers like Omit, Pick, Partial is just another form of inference.
You're inferring one type from the shape of another.