TypeScript: Guides and Practical Know-how | Page 3 | mironsoft Blog
TypeScript
-
Mar 14, 2026
Integrating external data sources into React was a minefield of race conditions and inconsistent renders before React 18. useSyncExternalStore is the official solution: a hook that correctly connects external stores to the React rendering cycle and prevents tearing even in Concurrent Mode.
-
Mar 12, 2026
Using any in TypeScript buys short-term speed and gives up type safety for good. Writing a separate function for every type solves that, but produces duplication and maintenance overhead instead. Generics resolve this dilemma: a single function, interface, or class stays reusable for any type while keeping the compiler's full type checking intact.
-
Mar 11, 2026
Technical debt from any usage does not disappear through a one-time cleanup day, it quietly keeps growing as long as no system stands behind it. CI budgets, mandatory tickets for exceptions, clear ownership and regular reporting turn any related technical debt into a measurable, governable topic instead of a lingering bad conscience for the team.
-
Mar 3, 2026
If you wait for the server to respond before the UI moves, you are giving away perceived speed. useOptimistic solves this problem right at the core of React: the UI state jumps forward immediately, gets adopted on success, and rolls back cleanly on failure, without manual state management.
-
Mar 1, 2026
Rewriting an entire grown JavaScript React project to TypeScript sounds like weeks of standstill. Whoever introduces TypeScript gradually enables allowJs, migrates file by file, and eventually reaches strict mode without ever interrupting feature work.
-
Feb 24, 2026
Type safety rarely fails because of the type system itself, but because it stays an individual preference of a few developers instead of becoming a shared standard across the team. With CI gates, clear review conventions and visible metrics, type safety turns into a practice that holds even when nobody is watching.
-
Feb 24, 2026
Scattering any unchecked through your code disables type checking exactly where it matters most. This article shows the practical path to a type-safe codebase: enabling noImplicitAny deliberately, tightening ESLint rules step by step, using unknown and generics as replacements, and making progress measurable with type-coverage, all without blocking ongoing development.
-
Feb 23, 2026
Anyone building a factory function, a mixin, or a small dependency injection container quickly runs into a problem: the type new (...) => T only accepts concrete, instantiable classes. Abstract base classes fall through the cracks, even though they are exactly what you often need when processing subclasses generically. That is precisely what the abstract construct signature, introduced in TypeScript 4.2, was built for.
-
Feb 21, 2026
Without a structured versioning process, internal TypeScript packages end up either with a single global version number for the whole monorepo, or with hand written changelogs nobody keeps consistent. Changesets solves both problems with a declarative, review friendly workflow.
-
Feb 21, 2026
A TypeScript transformer plugs directly into the compiler pass, before any JavaScript is emitted, and rewrites the abstract syntax tree programmatically. That enables things neither a linter nor a plain build script can do, such as automatically stripping debug code or injecting metadata based on actual type information.