Knowledge

Reusable knowledge generalized from TIL, organized by category.

Search starts automatically 350ms after you stop typing.

91 documents

Updated 2026-08-23frontendInferred

TypeScript Variance — Covariance and Contravariance

The rules that decide whether Dog[] and (x: Dog) => void inherit the Dog-is-an-Animal relationship, and in which direction — plus why method shorthand syntax leaves a hole even with strictFunctionTypes on

Updated 2026-08-23testingInferred

Type-Level Testing — The Evidence the Compiler Leaves Behind

How to verify compilation instead of execution so that 'what wrong code does this type actually block' is pinned down in code, plus the @ts-expect-error and mutation checks that tell you whether the test is still alive

Updated 2026-08-23frontendInferred

Generic Context Factory

Working around the fact that a const declaration can't take type parameters — creating the context inside a generic function and letting the components capture it by closure, plus the trap where calling it during render silently remounts everything

Updated 2026-08-14testingInferred

Test oracles and where correctness comes from

The problem of deciding whether a result is right or wrong, and why tests whose expected values were reverse-engineered from the implementation verify nothing

Updated 2026-08-09browserInferred

Message-based RPC in browser extensions

How to safely connect extension execution contexts that cannot share memory with message APIs, runtime validation, handler routing, response envelopes, and change notifications

Updated 2026-08-07operating-systemInferred

Symbolic links and the direct-run guard

Why a path-comparison main guard silently turns false behind a symlinked path such as an npm global bin, leaving a CLI that exits 0 with no output — and how to diagnose and fix it

Updated 2026-08-07networkInferred

Rewrite proxies and upstream redirect loops

A rewrite is a proxy, not a redirect, so it passes upstream 3xx responses straight through — why pointing one at an origin that canonicalizes creates an infinite loop, and how to fix it

Updated 2026-08-07browserInferred

IME composition and the commit boundary

Why blur or Enter can commit a half-composed Korean character, and how to fix it with composition state rather than assumptions about event order

Updated 2026-07-31frontendVerified

Syntax Transpilation vs Runtime Polyfill

Supporting old browsers is two different jobs — transpiling new syntax into old syntax, and polyfilling missing APIs with code. A transpiler only rewrites syntax; it does not create runtime functions

Updated 2026-07-31frontendVerified

Hydration Failure and Dead Event Handlers

When several interactions on one screen stop working at once, it is usually not separate bugs but a single root cause: the client JS never ran, so hydration failed wholesale

Updated 2026-07-31frontendVerified

Feature-Detected Differential Polyfill Loading

Instead of shipping polyfills to every browser, actually detect whether a feature is missing and load them only on the browsers that lack it — making the cost on modern browsers nearly zero