Takina · · 4 min read TypeScript Abstract Classes, Explained
Abstract classes in TypeScript define shared implementation plus methods subclasses must fill in. How they differ from interfaces and when to reach for them.
Topic
91 posts tagged “JavaScript”.
Takina · · 4 min read Abstract classes in TypeScript define shared implementation plus methods subclasses must fill in. How they differ from interfaces and when to reach for them.
Takina · · 3 min read React Suspense lets components pause rendering while they wait on async data, showing a fallback UI instead of manual loading-state juggling.
Takina · · 4 min read A lockfile records the exact dependency versions your package manager resolved, so every install — from your laptop to CI — reproduces the same tree.
Takina · · 3 min read never represents values that can't exist — it marks unreachable code, exhaustive switches, and functions that always throw or loop forever.
Takina · · 4 min read TypeScript's readonly keyword blocks reassignment at compile time for properties, arrays, and tuples — with no runtime enforcement at all.
Takina · · 4 min read The Intl API formats dates, numbers, and currency using a user's locale without a library. How Intl.DateTimeFormat and Intl.NumberFormat work.
Takina · · 4 min read requestIdleCallback runs low-priority JavaScript when the browser is idle, without blocking rendering, input, or the main thread.
Takina · · 5 min read Turbopack is a Rust-based bundler built for incremental speed; Webpack is the mature, plugin-heavy standard. How they differ and when to pick each.
Takina · · 5 min read Promise.all() fails fast, allSettled() waits for every result, and race() returns whichever promise finishes first — how to choose correctly.
Takina · · 4 min read JavaScript's dynamic import() loads a module on demand and returns a promise, letting you split bundles and defer code until it's actually needed.
Takina · · 4 min read The spread operator (...) expands an iterable into individual elements; the rest operator collects elements back into an array. Same syntax, opposite jobs.
Takina · · 4 min read TypeScript's as const assertion locks a value to its literal, readonly type instead of widening it. How it works and when to reach for it.
Takina · · 4 min read The ResizeObserver API lets JavaScript watch an element's box size and react without polling or resize-event hacks. How it works and when to use it.
Takina · · 5 min read A JavaScript memory leak happens when a reference outlives its usefulness and the garbage collector can't reclaim it. Common causes and how to find them.
Takina · · 4 min read localStorage, sessionStorage, and cookies all store data in the browser, but differ in lifetime, size limits, and whether the server can see them.
Takina · · 4 min read Import maps let browsers resolve bare module specifiers like "react" to real URLs, enabling native ES module imports without a bundler.
Takina · · 5 min read The Push API lets a web app send notifications through a service worker, even when the site isn't open in a browser tab. Here's the full flow.
Takina · · 5 min read JavaScript destructuring unpacks values from arrays and objects into variables in one expression. How it works, with the rest and spread operators.
Takina · · 4 min read How JavaScript determines what this refers to: default, implicit, explicit, and new binding, plus why arrow functions behave differently.
The Lycoris Team · · 4 min read A monad is a wrapper type with rules for chaining operations that might fail, be async, or carry extra context — like Promise or Optional, generalized.
Takina · · 5 min read Type guards are functions and checks that narrow a TypeScript union to a specific type at runtime. How typeof, instanceof, in, and custom guards work.
Takina · · 4 min read TypeScript function overloads let one function name accept multiple call signatures with different types. How overload signatures work and when to use them.
Takina · · 4 min read Tagged template literals let a function intercept a template string's parts before interpolation — the mechanism behind safe SQL, styled-components, and i18n.
Takina · · 5 min read IndexedDB is a browser API for storing large amounts of structured data client-side, with indexes, transactions, and no size limit like localStorage.
Takina · · 4 min read Event delegation attaches one listener to a parent instead of one per child, using event bubbling to catch clicks from elements added after page load.
Takina · · 4 min read The Intersection Observer API tells you when an element enters or leaves the viewport, without scroll-event polling. How it works and where to use it.
Takina · · 4 min read structuredClone() is a built-in JavaScript function for deep-copying values, including cycles and typed arrays, without the workarounds JSON tricks require.
Takina · · 4 min read tsconfig.json controls how TypeScript checks and compiles your code. Here are the options that actually change behavior, and the ones you can leave alone.
Takina · · 4 min read Template literal types let TypeScript build string types from other types, like JavaScript template strings. How they work, with practical patterns.
Takina · · 4 min read The Fetch API is JavaScript's built-in interface for making HTTP requests. How it works, its promise-based flow, and where it trips people up.
Takina · · 4 min read TypeScript's interface and type both describe object shapes, but they diverge on declaration merging, unions, and extension. When to reach for each.
Takina · · 4 min read requestAnimationFrame schedules a callback right before the browser repaints, syncing JavaScript animation to the display's refresh rate. How it works.
Takina · · 4 min read Solid.js uses fine-grained signals and no virtual DOM; React re-renders components and diffs. How the two reactivity models differ in practice.
Takina · · 5 min read SSE streams one-way updates over plain HTTP; WebSockets open a full-duplex channel. How they differ and which fits your real-time feature.
Takina · · 4 min read Mapped types transform one type into another by iterating over its keys — the mechanism behind Partial, Readonly, Record, and Pick under the hood.
Takina · · 4 min read TypeScript enums group named constants under one type. How numeric, string, and const enums compile, and when a union type is the better choice.
Takina · · 4 min read A JavaScript Symbol is a guaranteed-unique primitive used for collision-free object keys. How Symbols work, well-known Symbols, and when to use them.
Takina · · 4 min read A discriminated union tags each variant of a type with a shared literal field, letting TypeScript narrow the type automatically inside a switch or if check.
Takina · · 4 min read var, let, and const differ in scope, hoisting behavior, and reassignment rules. Here's what each one actually does and when to reach for it.
Takina · · 4 min read ESLint catches bugs and enforces code patterns; Prettier only reformats how code looks. Why most JavaScript projects run both, not one or the other.
Takina · · 4 min read Optional chaining (?.) short-circuits on null or undefined instead of throwing; nullish coalescing (??) supplies a default only for null or undefined.
Takina · · 4 min read Prototypal inheritance means JavaScript objects inherit properties directly from other objects via a prototype chain, not from classes. How it works.
Takina · · 4 min read Web workers run scripts off the main thread for parallel computation. Service workers intercept network requests for offline and caching. How they differ.
Takina · · 4 min read map, filter, and reduce transform arrays without loops or mutation. How each one works, when to reach for it, and where they trip people up.
Takina · · 4 min read TypeScript's unknown forces a type check before use; any opts out of type checking entirely. When to reach for each in real code.
Takina · · 4 min read A source map is a file that maps minified, bundled, or transpiled code back to its original source, so debuggers and stack traces stay readable.
Takina · · 4 min read Conditional types let TypeScript pick a type based on another type, using T extends U ? X : Y — the foundation of most advanced type utilities.
Takina · · 3 min read Currying transforms a multi-argument function into a chain of single-argument functions. How currying and partial application work in JavaScript.
Takina · · 4 min read Vue uses a template syntax with a reactive proxy system; React uses JSX with a virtual DOM. How the two frameworks differ and when to pick each.
Takina · · 4 min read Node.js streams process data in chunks instead of loading it all into memory. How readable, writable, and transform streams work, and when to reach for them.
Takina · · 5 min read A WeakMap holds object keys without blocking garbage collection, unlike a regular Map. How WeakMap and WeakRef work and when to reach for them.
Takina · · 4 min read JavaScript's Map and Set are built-in collections with cleaner semantics than plain objects and arrays. Here's how each works and when to reach for one.
Takina · · 4 min read The Temporal API is JavaScript's built-in replacement for Date — immutable, timezone-aware objects for dates, times, and durations.
Takina · · 4 min read TypeScript's satisfies operator checks a value against a type without widening or erasing its inferred literal type. Here's when to reach for it.
Takina · · 4 min read TypeScript decorators attach reusable behavior to classes and members with an @ syntax. How class, method, and field decorators work, with real examples.
Takina · · 4 min read Shadow DOM attaches an isolated DOM tree to an element so a component's styles and markup can't leak in or out. Here's how it actually works.
Takina · · 4 min read npm, pnpm, and Yarn all install the same packages but differ in speed, disk usage, and monorepo support. Here's how to pick the right one.
Takina · · 4 min read AbortController lets JavaScript cancel an in-flight fetch or async task on demand, preventing stale responses from overwriting newer state.
Takina · · 5 min read ESM and CommonJS are JavaScript's two module systems — how import/export differs from require/module.exports, and when each one is used.
Chisato · · 3 min read Cross-site scripting (XSS) injects malicious scripts into pages other users view. How stored, reflected, and DOM-based XSS work, and how to prevent them.
Takina · · 4 min read Optimistic UI updates the interface immediately, before the server confirms a change, then rolls back if the request fails — for apps that feel instant.
Takina · · 4 min read Web Components are browser-native APIs for building reusable, encapsulated custom elements that work in any framework, or none at all.
Takina · · 4 min read TypeScript utility types like Partial, Pick, Omit, and Record transform existing types instead of redeclaring them. How the common ones work, with examples.
Takina · · 4 min read A monorepo holds multiple projects in one repository with shared tooling and atomic commits. How it compares to splitting projects across separate repos.
Takina · · 4 min read Generators are functions that pause and resume with the yield keyword, producing values lazily on demand instead of computing them all at once.
The Lycoris Team · · 4 min read Memoization caches a function's return value by its input, skipping recomputation on repeat calls. How it works and when it actually helps.
Takina · · 4 min read TypeScript generics let functions and types work with any type while preserving the specific type used at each call site, avoiding both duplication and any.
Takina · · 4 min read Async/await is syntactic sugar over Promises, not a different mechanism. How each looks in practice, and when to still reach for raw Promises.
Takina · · 4 min read The virtual DOM is an in-memory copy of the UI tree that frameworks diff against the previous version to batch and minimize real DOM updates.
Chisato · · 4 min read A Content Security Policy is an HTTP header that restricts what scripts and resources a page can load, blocking most XSS attacks by default.
Takina · · 4 min read A JavaScript Proxy wraps an object and intercepts operations like get and set through traps. How traps work, with practical examples and Reflect.
Takina · · 4 min read A web worker runs JavaScript on a background thread, freeing the main thread to keep the UI responsive. How workers communicate and when to use one.
Takina · · 5 min read Svelte compiles away at build time; React ships a runtime and virtual DOM. Bundle size, reactivity model, and ecosystem tradeoffs compared.
Takina · · 5 min read Microsoft shipped TypeScript 7.0 with a Go-native compiler that's roughly 10x faster than 6.0. What changed, what breaks, and how to upgrade.
Takina · · 4 min read Tree shaking removes unused exports from a JavaScript bundle at build time, shrinking file size by relying on ES module static structure.
Takina · · 5 min read A JavaScript closure is a function that remembers the variables from where it was defined. How closures work, why they matter, and the classic loop gotcha.
Takina · · 5 min read Debounce and throttle both tame rapid-fire events, but differently — debounce waits for a pause, throttle enforces a steady rate. When to use each.
Takina · · 3 min read htmx lets you build dynamic, interactive pages with HTML attributes — no SPA, no build step. Learn the core ideas and ship a working live-search example in minutes.
Takina · · 4 min read WebRTC lets browsers stream audio, video, and data directly between peers — no plugins. How getUserMedia, RTCPeerConnection, and ICE/STUN/TURN fit together.
Takina · · 5 min read Static sites don't need a search server. Learn how Pagefind indexes your HTML at build time and adds fast, client-side full-text search for free.
Takina · · 4 min read A WebSocket is a protocol for full-duplex, persistent communication over a single TCP connection. Learn how it works, when to use it, and what the alternatives are.
Takina · · 4 min read CORS lets a server opt in to cross-origin browser requests, relaxing the same-origin policy in a controlled way. Why it exists and how to fix CORS errors.
Takina · · 4 min read JavaScript is single-threaded, yet pages stay responsive. A clear tour of the call stack, task queue, and microtasks — with examples you can run.
Takina · · 5 min read Signals offer fine-grained reactivity with automatic dependency tracking — and nearly every major framework has adopted them. Here's why the model won.
Takina · · 4 min read The View Transitions API brings smooth, app-like transitions to the web without a heavy SPA framework. Here's how it works and how to use it today.
Takina · · 5 min read An honest comparison of Bun and Node.js in 2026 — speed, ecosystem, built-in tooling, and when each runtime actually wins.
Takina · · 3 min read JavaScript is the programming language that makes web pages interactive. Learn how it works alongside HTML and CSS, and why it runs nearly everywhere.
Takina · · 5 min read React Server Components render exclusively on the server and stream a serialized result — no client JS shipped for that component. Here's what that actually means.
Takina · · 4 min read The DOM is the live in-memory tree browsers build from your HTML, which JavaScript reads and manipulates. Learn how it works and why it matters.
Takina · · 3 min read TypeScript adds a safety net to JavaScript without slowing you down. Here's how to set it up, the handful of concepts that matter, and how to adopt it gradually.
Takina · · 4 min read Server-Sent Events stream real-time updates over a single HTTP connection. How SSE works, when to use it, and how it compares to WebSockets.