Solving Advent of Code with only TypeScript types
Advent of Code 2022 Day 1, solved entirely in TypeScript's type system. The input goes into a type alias and the answer appears in a hover tooltip.
Frontend engineering, TypeScript, and whatever else I'm working through.
Advent of Code 2022 Day 1, solved entirely in TypeScript's type system. The input goes into a type alias and the answer appears in a hover tooltip.
Node's util.format() accepts any arguments silently. Build a version that validates format specifiers and argument types at compile time.
Build a virtual scroller in Vue from scratch. Fixed heights first, then variable heights and the edge cases that come with them.
ESLint's no-restricted-syntax bans syntax patterns using ESQuery selectors. How the selectors work, with examples ready to copy into your config.
Test what a component does, not how it works. Catching edge cases, preventing regressions, and writing tests that survive refactors.
on medium.com
How JumpCloud split a monolithic Vue app into micro-frontends: what worked, what didn't, and what we'd do differently.
on medium.com
lodash's get() is typed as returning any. Build a version that infers the return type from the path string, with support for arrays, unions, and default values.