Skip to content
Code by Pawpu

Frontend

TypeScript / JavaScript

Language contracts, runtime behavior, and types that pay rent at system boundaries.

TypeScript · JavaScript · 4 published · 22 in the review queue. Written by Al Beltran.

  1. Interlocking dark geometric blocks forming a bridge, with a blue connecting pin
    Engineering

    TypeScript Won the Integration Layer

    The interesting TypeScript story is not frontend fashion. It is the language teams use to glue APIs, workers, and infrastructure code that used to be a pile of untyped scripts.

    #typescript#node.js#architecture#tooling

Review queue

Planned notes stay unpublished until they are written and reviewed. Titles are listed so the topic map is complete. They are not pages.

  1. unknown vs any: One Forces a Decision

    Why any disables the checker and unknown just postpones the cast until you know the shape.

    comparison · beginner · medium priority

  2. Discriminated Unions for States That Cannot Be Two Things

    Model idle / loading / error / success as a union so impossible props do not compile.

    educational · intermediate · medium priority

  3. Generics Without Turning the File Into a Puzzle

    One type parameter that captures a relationship. Not four that impress no one in review.

    educational · intermediate · medium priority

  4. The Event Loop for People Who Also Write Servers

    Microtasks, macrotasks, and why a tight CPU loop starves HTTP in Node the same way it starves paint in the browser.

    educational · intermediate · medium priority

  5. Closures in Production: Leaks, Stale Values, and Useful Privacy

    When a closure is the right module boundary, and when it holds a whole response in memory.

    educational · intermediate · medium priority

  6. Equality and Coercion: Write === and Still Know ==

    What interviewers want when they ask about ==, and why production code should not rely on it.

    educational · beginner · medium priority

  7. Narrow Types at the Boundary, Trust Them Inside

    Parse once. Do not sprinkle as Foo through a service that already decided the shape.

    architecture · intermediate · medium priority

  8. Utility Types That Earn Rent: Pick, Omit, and Record

    The three utilities that show up in real APIs, and the ones that usually mean you wanted a new type.

    educational · intermediate · medium priority

  9. Promises vs async/await: Same Machine, Different Readability

    When to Promise.all, when sequential await is the bug, and how errors surface in each style.

    comparison · intermediate · medium priority

  10. this Binding Without the Mythology

    Call site, bind, arrows, and the class methods that lose this in a callback.

    educational · intermediate · medium priority

  11. Runtime Validation at the Edge (Zod or Equivalent)

    TypeScript disappears at runtime. A schema at the HTTP or queue boundary is the real contract.

    architecture · intermediate · medium priority

  12. ESM vs CommonJS: The Interop Bugs You Will Hit

    default export traps, dual packages, and why "it works in the test file" is not a module strategy.

    troubleshooting · intermediate · medium priority

  13. Migrating a JavaScript Service to strict TypeScript

    File by file, boundary first. Do not flip strict on a 40k-line folder and call it a week.

    problem-solving · senior · medium priority

  14. Iterators and Generators When Streaming Is the Point

    When a generator is a real API, and when it is a party trick in a CRUD handler.

    educational · intermediate · medium priority

  15. When to Write a Declaration File (and When to Fork the Types)

    Ambient modules, untyped deps, and the cost of a local .d.ts that lies.

    educational · intermediate · medium priority

  16. JavaScript Memory Leaks in Long-Lived SPAs

    Listeners, closures over large trees, and detached DOM that never quite dies.

    troubleshooting · intermediate · medium priority

  17. Branded Types for IDs So You Stop Passing the Wrong UUID

    A light brand on UserId vs OrderId. Not a new type system religion.

    architecture · intermediate · medium priority

  18. Error Handling Patterns That Leave a Trace

    Operational vs programmer errors, cause chains, and what to return on an API.

    educational · intermediate · medium priority

  19. infer and Conditional Types: Read Them Before You Write Them

    Useful for libraries. Usually the wrong move in an application service.

    educational · senior · medium priority

  20. Debounce, Throttle, and requestAnimationFrame

    Which one belongs on search, which on scroll, and which on a canvas frame.

    problem-solving · intermediate · medium priority

  21. TypeScript Enums vs String Unions

    Why most application code should prefer a union, and when a const object is enough.

    comparison · intermediate · medium priority

  22. Prototypes and Classes: The Same Object Model

    What class syntax desugars to, and why you still need to know the prototype chain.

    educational · intermediate · medium priority