Skip to main content

2 posts tagged with "Typescript"

View All Tags

· 3 min read
Sivabharathy

TypeScript is a powerful tool for enhancing JavaScript with strong typing. But like any tool, it can be misused. A common anti-pattern in TypeScript is duplicating types instead of leveraging its utility types. This leads to bloated, harder-to-maintain code.

Let’s explore this with an example and how to improve it by "typing smartly."

· 8 min read
Sivabharathy

Learn about TypeScript generics, including their use in functions, classes, interfaces, and type constraints. This guide covers key concepts like type variance, conditional types, and how to create reusable, type-safe code for flexible applications. Explore advanced topics such as reflection, the infer keyword, and more.