TypeScript: Guides and Practical Know-how | Page 5 | mironsoft Blog
TypeScript
-
Jan 17, 2026
Static types usually end at the network boundary: the client does not know what the server returns unless it relies on manually maintained interfaces or generated client code. tRPC closes this gap by importing router types directly from the server, with no REST conventions, no GraphQL schema and no separate code generation step at all.
-
Jan 16, 2026
TypeScript types only exist at compile time and do nothing to protect form data from messy user input, which always arrives at runtime as unknown strings. This article shows how schema validation libraries like Zod and Valibot derive both runtime checks and TypeScript types from a single source, applied hands on to checkout forms, native FormData handling, typed API layers, and clear field errors in the user interface.
-
Jan 13, 2026
Handing out a raw DOM node through a ref is an invitation for uncontrolled external access. useImperativeHandle defines precisely which methods are available through the ref, a controlled API instead of an open DOM interface.
-
Jan 12, 2026
Interface and type alias look interchangeable at first glance, but declaration merging, union types and the capabilities of the TypeScript compiler create real practical differences. This article walks through concrete examples showing when each option is technically required, which team convention holds up in large codebases, and where performance and maintainability genuinely diverge.
-
Jan 8, 2026
The infer keyword is the key to many TypeScript utility types and lets you extract partial types such as the resolved value of a Promise or the parameters of a function directly from an existing type without duplicating them by hand. Understanding how infer works inside conditional types lets you build your own utility types, avoid duplication, and keep derived types automatically in sync with their source.
-
Jan 6, 2026
When you apply a conditional type to a union type, the condition is by default applied to every member of the union individually, not to the union as a whole. This behavior is called distribution and is the quiet foundation of utility types like Exclude and Extract. Without knowing the naked type parameter rule, you will stumble on unexpected results as soon as a custom utility type deliberately needs to prevent distribution.
-
Jan 3, 2026
Exceptions in TypeScript are invisible to the compiler: a function that throws looks exactly the same in its signature as one that never fails. The Result type pattern makes failure paths explicit by returning success and failure as a typed value that the caller must actively handle.
-
Dec 29, 2025
The paths option in tsconfig.json makes imports like @/components readable and stable, but it only solves type checking, not module resolution at runtime. This article shows how to carry aliases correctly all the way into Vite, Webpack, Node, and test runners, so no module-not-found error shows up after the build.
-
Dec 26, 2025
A TypeScript monorepo without build orchestration rebuilds every package on every commit, even when only one line changed in a single package. Nx and Turborepo solve this problem with task graphs, caching and affected detection, but with different philosophies and different feature scope.
-
Dec 25, 2025
A design system without living documentation is outdated after six months. Storybook 8 combines Component-Driven Development, automatically generated docs and visual regression testing into a workflow that teams actually stick with, from the first button component to a production-ready library.