← CodeClarityLab Home
Browse by Category
+ added · updated 7d
✕ Clear A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Diagram: Type Guards & Narrowing Type Guards & Narrowing 2.0
Type guards are expressions that narrow a union type to a more specific type at runtime — telling TypeScript exactly which branch of a union you're in.
4w ago typescript intermediate
TypeScript Function Overloads
TypeScript function overloads allow a single function to accept different argument shapes and return different types based on which overload signature matches — providing precise type checking that union types alone cannot express.
2mo ago typescript intermediate
Template Literal Types 4.1
TypeScript template literal types combine string literals with type interpolation — type EventName = `on${Capitalize<string>}` — enabling precise string-pattern type constraints.
2mo ago typescript advanced
TypeScript Declaration Files (.d.ts) 2.0
Type-only files describing JavaScript code shapes — DefinitelyTyped (@types/* packages) provides community-maintained declarations for popular JS libraries.
2mo ago typescript advanced
TypeScript Decorators 4.0
Metadata annotations on classes, methods, and properties — used in NestJS, Angular, TypeORM, and class-validator to attach behaviour declaratively.
2mo ago typescript advanced
TypeScript Enums vs Const Enums vs Union Types 2.0
Three ways to define a set of named constants in TypeScript — regular enums emit JavaScript, const enums are inlined at compile time, and union types are the idiomatic zero-cost alternative.
2mo ago typescript intermediate
TypeScript Modules & Namespaces 2.0
ES modules (import/export) are the modern standard — namespaces are legacy for global scripts and ambient declarations only.
2mo ago typescript intermediate
TypeScript vs PHP Type System 4.0
TypeScript uses structural typing (shape compatibility); PHP uses nominal typing (explicit implements). TypeScript infers types; PHP requires annotations. Both support generics (PHP via PHPDoc).
2mo ago typescript intermediate
tsconfig.json 4.0
The TypeScript compiler configuration file — controlling which files are compiled, what JavaScript version is targeted, strictness settings, and module resolution.
2mo ago typescript intermediate
Diagram: TypeScript Generics TypeScript Generics 2.0
Type parameters that allow functions, classes, and interfaces to work with any type while preserving type information — the TypeScript equivalent of PHP templates or Java generics.
2mo ago typescript advanced
Diagram: TypeScript Interfaces vs Type Aliases TypeScript Interfaces vs Type Aliases 2.0
Both define object shapes, but interfaces are open (mergeable via declaration merging) while type aliases are closed — types are more flexible for unions and computed types.
2mo ago typescript intermediate
TypeScript Strict Mode 2.3
A tsconfig flag that enables the strictest type-checking options — strictNullChecks, noImplicitAny, and others — catching the most common TypeScript pitfalls.
2mo ago typescript intermediate
TypeScript Type System 2.0
TypeScript adds static types to JavaScript — catching type errors at compile time rather than runtime, while remaining a superset that compiles to plain JavaScript.
2mo ago typescript intermediate
Diagram: TypeScript Utility Types TypeScript Utility Types 2.1
Built-in generic types that transform existing types — Partial, Required, Pick, Omit, Record, Readonly, ReturnType — eliminating the need to manually duplicate type definitions.
2mo ago typescript intermediate
✓ schema.org compliant