← Back to TypeScript

TypeScript Glossary

Key terms from the TypeScript course, linked to the lesson that introduces each one.

2,001 terms.

#

`alwaysStrict`
Emits `"use strict"` in JavaScript output and parses files in strict mode
Lesson 1180What strict Mode DoesLesson 1189Enabling strict Incrementally
`noImplicitAny`
Prevents variables from implicitly having the `any` type
Lesson 1180What strict Mode DoesLesson 1189Enabling strict Incrementally
`noImplicitThis`
Flags errors when `this` has an implicit `any` type
Lesson 1180What strict Mode DoesLesson 1189Enabling strict Incrementally
`strictFunctionTypes`
Ensures function parameter types are checked correctly (contravariance)
Lesson 1180What strict Mode DoesLesson 1189Enabling strict Incrementally
`strictNullChecks`
Makes `null` and `undefined` distinct types that must be explicitly handled
Lesson 1180What strict Mode DoesLesson 1189Enabling strict Incrementally
`strictPropertyInitialization`
Requires class properties to be initialized in the constructor
Lesson 1180What strict Mode DoesLesson 1189Enabling strict Incrementally
`V`
Stands for "Value", often paired with `K` in key-value scenarios
Lesson 528Type Parameter Naming ConventionsLesson 548Type Parameter Naming Conventions
`void`
means "no useful return value" — the function completes, just with nothing meaningful
Lesson 944The Bottom Type ConceptLesson 946never vs void Distinction

A

Abstract classes
can provide both contracts (abstract methods) *and* shared implementation (concrete methods).
Lesson 1052Abstract Classes vs Interfaces
Abstract members
are contracts — methods and properties marked with the `abstract` keyword that your subclass *must* implement.
Lesson 1053Extending Abstract Classes
Accepts
a primitive value (like `string` or `number`)
Lesson 1365Combining Validation with Types
Accessor/utility functions
that work with the opaque type
Lesson 1355Opaque Type Pattern
Accuracy
Generated types perfectly match the specification.
Lesson 1514Use Code Generation for Complex Patterns
Accurate return types
(notice how the return type `T[K]` reflects the actual property type)
Lesson 634Using keyof in Generic Constraints
Acknowledge the limitation
(recursive depth, unknown shape)
Lesson 1513Document Limitations with Comments
Add `any` type annotations
to parameters, properties, and return types that would otherwise trigger `noImplicitAny` errors
Lesson 1645The @ts-ignore and any Strategy
Add intermediate type variables
to break down multi-step checks
Lesson 650Error Messages from Failed Conditional Constraints
Add type assertions
where the library interfaces with your code
Lesson 884any in Third-Party Libraries
Add type guards inside
the function body to route logic correctly
Lesson 1409Implementation Signature Compatibility
Adds `@ts-ignore` comments
to suppress errors it can't resolve
Lesson 1643What ts-migrate Does
Adds type annotations
where it can infer them
Lesson 1643What ts-migrate Does
Adds type suppressions
where errors would occur
Lesson 1644Running ts-migrate on a Project
Advanced generic constraints
with multiple interdependent type parameters often fail or require workarounds.
Lesson 1640JSDoc Limitations vs Native TypeScript
Advantages
You get real types instead of suppression comments, and your code becomes genuinely type-safe rather than just compile-safe.
Lesson 1647Alternative Tools: TypeStat
After exhaustive runtime validation
, type assertions become a legitimate tool to inform the compiler about what your runtime logic has already proven.
Lesson 1006After Exhaustive Runtime ValidationLesson 1015When Assertions Are Actually Acceptable
After manual checks
You've validated a value exists, but TypeScript's control flow analysis didn't catch it
Lesson 985Non-Null Assertions with !
After refactoring to unknown
Lesson 907Refactoring any to unknown
After strictNullChecks
`null` and `undefined` become their own separate types.
Lesson 1182strictNullChecks Fundamentals
Algorithmic improvements
to type inference and constraint solving
Lesson 1790Performance and Scalability Focus
All public API types
interfaces, type aliases, classes you intend users to import
Lesson 1251Verifying Library Type Exports
Alternative
Use string literal unions or plain objects with `as const`, which are already valid JavaScript patterns.
Lesson 1772Features Explicitly Out of Scope
Alternative approaches
for simpler scenarios
Lesson 1696The Documentation Burden
Alternatives considered
"Tried unknown but requires too many guards for prototype"
Lesson 875Documenting Known Type Gaps
Ambiguity for tools
Build tools can't reliably determine what's safe to remove
Lesson 1102Why Type-Only Imports Exist
Ambiguous callback scenarios
Lesson 175When Context Isn't Enough
Ancient TypeScript project
→ You might see `classic`, but migrate away
Lesson 1112The moduleResolution Compiler Option
Angular 2 (2016)
was the first blockbuster.
Lesson 20Community Adoption Milestones
Any combination
of literal strings and type placeholders
Lesson 819Basic Template Literal Syntax
Any import or export
→ Module mode → Scoped declarations
Lesson 1158The global Scope in .d.ts Files
Any workarounds attempted
that didn't work
Lesson 900Documenting Why You Suppress
API boundaries
(highest risk): Functions returning `any` that spread through your codebase
Lesson 1678Auditing Codebases for any Usage
API consumers
Public APIs serving JavaScript, Python, or mobile clients need REST or GraphQL with documentation.
Lesson 1589When to Choose Each Approach
API Contract → Frontend
Your frontend components consume the exact same types through generated clients or shared type packages
Lesson 1310The End-to-End Type Safety Vision
API contracts are fixed
When integrating with external APIs, defining types first ensures you handle all required fields
Lesson 1326Type-First vs Code-First Trade-offs
API response data
Keys might vary based on runtime conditions
Lesson 310What Index Signatures Solve
API response handlers
– external data
Lesson 892Migrating from any to unknown
API Responses
Remove backend-only fields before sending data to clients:
Lesson 678Omit<T, K>: Excluding PropertiesLesson 936unknown for External Data Entry Points
API routes
(`"/api/${string}"`)
Lesson 822Prefix and Suffix Patterns
Applications with many files
(React, Vue, or complex Node apps) benefit from **bundlers** like Webpack, Vite, or Parcel.
Lesson 75Choosing the Right Execution Method for Your Use Case
Apply the appropriate fix
add `type` keyword, convert enums, or restructure exports
Lesson 1262Debugging Bundler Type Issues
Arity
refers to the number of parameters a function accepts.
Lesson 274Overloading by Arity
ArkType
is the newest contender, focused on runtime performance:
Lesson 1295Alternatives: Yup, io-ts, ArkType
Array methods
must return arrays of the same element type
Lesson 1663When Generics Are Better: Type Preservation Needed
Array mutation methods
No `push`, `pop`, `shift`, `unshift`, `splice`, etc.
Lesson 122Readonly Tuples
Array parameters
require the caller to construct the array explicitly:
Lesson 267Rest Parameters vs Array Parameters
Arrow functions in callbacks
already benefit from contextual typing and inference—adding return types here often clutters the code.
Lesson 249Return Type Annotations Best Practices
Ask yourself
*Can a mid-level developer on my team understand this type in under 30 seconds?
Lesson 1690The Readability Trade-offLesson 1698Finding the Right Abstraction Level
Assert to Record<string, unknown>
so you can access properties
Lesson 927Validating Object Shape with Type Predicates
Assertions Without Justification Comments
Lesson 1016Code Review Red Flags with Assertions
Assignability relationships
Whether type A is assignable to type B
Lesson 1704The Type Cache and Memoization
At compile-time
as a union type for parameters or variables.
Lesson 482Extracting Union Members as Values
At runtime
as values in an array for looping, validation, etc.
Lesson 482Extracting Union Members as Values
Authentication state
Include `user: User | null` to represent logged-in vs anonymous requests.
Lesson 1545Context Typing for Procedures
Auto-generated types
from APIs with hundreds of endpoints
Lesson 1721Type Checking Large Union Types
Autocomplete matters
Users should see exactly what's allowed
Lesson 1662When Unions Are Better: Known Fixed Options
Autocomplete stops working
or becomes extremely slow
Lesson 1752Restart Language Service When Stuck
Autocomplete suggestions
as you type
Lesson 1747Why IDE Performance Matters
Autocomplete takes >3 seconds
to appear
Lesson 865Practical Limits of Path Type Complexity
Autocomplete works
Your editor suggests only valid keys
Lesson 317Index Signatures and Record Utility
Automated migration tools
change the game for all-at-once conversions.
Lesson 1620When All-at-Once Actually Works
Automatic typing
TypeScript infers the `input` parameter's type from the schema using `z.
Lesson 1542Input Validation with Zod Schemas
Automatic validation
before your handler runs
Lesson 1535Zod Validators with Hono Middleware
Automatically rebuilds
only the affected projects when changes are detected
Lesson 1230Watch Mode with Project References
Avoid `@ts-ignore`
in almost all cases.
Lesson 895@ts-ignore vs @ts-expect-error
Avoid `const enums` entirely
in projects using Babel/esbuild
Lesson 504const enums and isolatedModules
Avoid circular dependencies
during gradual conversion
Lesson 1595Type-Only Imports for Existing JS
Avoid circular type dependencies
When two files import types from each other, TypeScript must resolve them together, which is expensive.
Lesson 1745Minimize File-Level Type Dependencies
Avoid confusion
Prevents accidentally trying to use a type as if it were a value, especially when re-exporting from barrel files.
Lesson 1096Type-only export syntax with export type
Avoid perfectionism
A "good enough" migration that ships beats a perfect one that stalls at 60%
Lesson 1619Tracking Progress and Setting Migration Goals
Avoiding circular dependencies
Type-only imports don't create runtime module dependencies
Lesson 1109Type-Only Import Best Practices
Avoiding name collisions
between different parts of a large API
Lesson 1143Namespaces in Declarations

B

Babel
, **esbuild**, and **swc** compile TypeScript files *one at a time* without seeing the whole project—they just strip types away quickly.
Lesson 1253What isolatedModules DoesLesson 1258When to Enable isolatedModules
Backend developers
can implement endpoints knowing exactly what shape must be returned
Lesson 1332Collaborating Through Type Definitions
Backticks
(`` ` ``) to define the template
Lesson 819Basic Template Literal Syntax
Backward compatibility matters
Adding defaults doesn't break existing code
Lesson 570When to Use Defaults vs Required Parameters
Base behavior
from a class hierarchy (shared implementation)
Lesson 1055Combining implements and extends
Before strictNullChecks
`null` and `undefined` are assignable to *every* type.
Lesson 1182strictNullChecks Fundamentals
Before the check
TypeScript knows the value is `string | number`
Lesson 189What Is Type Narrowing?
Benefit
Write generic, reusable functions once.
Lesson 1502Libraries That Use HKT Simulation: fp-ts
Best Common Type
algorithm to figure out array types and conditional expressions.
Lesson 174Best Common Type in ContextLesson 1702Constraint Solving and Unification
Best Common Type algorithm
kicks in.
Lesson 145Best Common Type Algorithm
Best for
Public APIs, library functions, data parsing, external input handling — anywhere safety matters more than convenience.
Lesson 909Return Types: When Each Makes SenseLesson 1599The Bottom-Up vs Top-Down Decision
Best practice
Only use prototype manipulation when absolutely necessary (polyfills, framework requirements).
Lesson 1629Prototype Manipulation and Monkey-Patching
Beta releases
are more stable previews, typically 2-4 weeks before a final release.
Lesson 1780Features in Active DevelopmentLesson 1785Community Feedback and Breaking Changes
Better
Create focused functions with specific types, or use a generic constrained to the types you actually need.
Lesson 1736Use Specific Types Instead of Unions When Possible
Better caching strategies
for incremental builds
Lesson 1790Performance and Scalability Focus
Better code review
Reviewers see type issues highlighted alongside code changes
Lesson 1270Reporting Type Errors in Pull Requests
Better for shared libraries
If multiple parts of your codebase use common helpers, typing them creates widespread benefit
Lesson 1599The Bottom-Up vs Top-Down Decision
Better for tight loops
If you're checking enum values thousands of times per second (like in game loops or data processing), eliminating those property lookups removes tiny but cumulative overhead.
Lesson 502Performance Benefits of const enums
Better inference
TypeScript naturally narrows unions through your implementation
Lesson 1408Union Signatures for Shared Logic
Better interoperability
When working with external APIs, JSON data, or JavaScript libraries, you're already dealing with plain strings.
Lesson 515Community Preference for Unions
Better library support
More built-in methods accepting BigInts
Lesson 1764Numeric Separators and BigInt Evolution
Binding
(connecting declarations to their uses)
Lesson 1726Reading the Diagnostics Output
Blazing fast startup
Bun's transpiler is written in highly optimized code (Zig language), making it significantly faster than alternatives
Lesson 71Running TypeScript in Bun
Boilerplate explosion
Every type constructor needs its own interface definition.
Lesson 1489TypeScript's Workaround: Interface Pattern
Boolean combinations
that create contradictions (`isLoading: boolean` + `data: User | null` + `error: Error | null`)
Lesson 1346Refactoring Toward Impossible States
Bottleneck hotspots
Specific type operations causing delays
Lesson 1730Using @typescript/analyze-trace CLI
Bottom-up
Start with utility files and shared modules that have few dependencies.
Lesson 1614The File-by-File Incremental Strategy
Bottom-up inference
starts with the literal values or expressions you write and infers types moving upward through your code.
Lesson 1700Type Inference Flow: Bottom-Up and Top-Down
Bottom-up migration
means starting with low-level utility functions and data structures that other parts of your code depend on.
Lesson 1599The Bottom-Up vs Top-Down Decision
boundary
where untrusted data enters your system (API responses, JSON parsing, user uploads).
Lesson 942When NOT to Use unknownLesson 1679Localized any with Strict Boundaries
Bounded flexibility
Only specific types allowed (union behavior)
Lesson 1666Generic Constraints vs Union Bounds
bracket notation
with a numeric literal to index into the tuple, just like accessing array positions.
Lesson 701Accessing Individual ParametersLesson 1206noPropertyAccessFromIndexSignature: Explicit Index Access
brand technique
solves this by adding a fake, unique property to each type using a **symbol** and an **intersection type**.
Lesson 1350Brand Technique with IntersectionLesson 1360What Opaque Types Are
branded type
is a type that carries a compile-time "tag" or "brand" to distinguish it from other structurally identical types.
Lesson 658Branded Type ConstraintsLesson 1345Empty Array Edge Cases
Branded/opaque types
cannot be properly created since they rely on unique symbols or complex intersections.
Lesson 1640JSDoc Limitations vs Native TypeScript
Branding
solves this by tagging primitive types with unique compile-time markers.
Lesson 1353Branding Primitive Types
Breaking at usage sites
Forces you to add type guards where the value is actually used
Lesson 1676Replacing any with unknown for Safe Migration
Breaking changes risk
Adding HKTs would likely require fundamental changes to how generics work, potentially breaking millions of lines of existing TypeScript code.
Lesson 1494The TC39 and TypeScript Roadmap on HKTs
Browser globals
you've added via script tags
Lesson 1172What Global Augmentation Means
Browser storage
– localStorage, sessionStorage, cookies
Lesson 936unknown for External Data Entry Points
Bug fixes and polish
scheduled for that version
Lesson 1778The Iteration Plan and GitHub Projects
Bugs slip through
Simple typos like `user.
Lesson 3The Cost of Dynamic Typing at Scale
Build logs become unreadable
, drowning actual issues
Lesson 1506Error Messages Become Unusable
Build mode
(`tsc --build`): Compile multiple related projects efficiently
Lesson 76Understanding Compilation Modes: Build vs Watch vs Project
Build pipelines
where type-checking and transpilation are separate steps
Lesson 1245What emitDeclarationOnly Does
Build scripts
Running utility scripts that don't need full type-checking
Lesson 67tsx: A Faster Alternative to ts-node
Build speed
– How quickly `tsc` can complete a full compilation
Lesson 1790Performance and Scalability Focus
Build time increases
type instantiation happens repeatedly
Lesson 1741Break Large Union Types into Smaller Chunks
Build times increase noticeably
after adding path types
Lesson 865Practical Limits of Path Type Complexity
Build tool optimization
Tools like bundlers and compilers can safely strip these exports without worrying about side effects, potentially improving tree-shaking.
Lesson 1096Type-only export syntax with export type
Builder classes
that track exact values passed in
Lesson 1421const Type Parameters in Classes
builder pattern
lets you construct complex objects step-by-step using a fluent chain of method calls.
Lesson 596Generic Builder PatternLesson 1075Typing Methods That Return this
Builder patterns
that tracked precise states
Lesson 1414What const Type Parameters Solve
Builders
that need method chaining with type accumulation
Lesson 1663When Generics Are Better: Type Preservation Needed
Building libraries
where a faster tool (like esbuild or swc) handles the actual JavaScript compilation, but you still need TypeScript's declaration files for type safety
Lesson 1245What emitDeclarationOnly Does
Builds only what's changed
using incremental compilation
Lesson 1224Building with --build Mode
Builds team confidence
with small, manageable wins
Lesson 1597The Strictness Dial Approach
Bun
takes this further with a TypeScript runtime built in Zig.
Lesson 1792Ecosystem Integration: Bundlers and Runtimes
Bundle size optimization
Helps bundlers tree-shake more effectively
Lesson 1109Type-Only Import Best Practices
Bundler efficiency
Clearly marks what's type-only, enabling better tree-shaking
Lesson 1104Mixed Imports: Types and Values
Business logic modules
Clear, readable functions that solve domain problems
Lesson 1515Separate Business Logic from Type Acrobatics
Business rules
(age ranges, string formats, relational constraints)
Lesson 1509Embrace Runtime Checks Over Type Gymnastics
Business rules or constraints
exist that types can't express
Lesson 1684JSDoc Comments for Public APIs

C

Cache fewer results
because `any` invalidates assumptions
Lesson 1723The any Pollution Performance Hit
Cache intermediate results
using type aliases.
Lesson 1448Performance Considerations with Complex infer
Calculate
results without storing anything
Lesson 1562tRPC query() Method Basics
call signature
lets you describe this pattern in TypeScript: an object that is both callable *and* has properties.
Lesson 241Call SignaturesLesson 347Interfaces for Function Types
Callable on component mount
without side effects
Lesson 1561What Distinguishes Queries from Mutations
Callback parameters
Event handlers or middleware receive `any` arguments
Lesson 884any in Third-Party Libraries
Can
have zero or more `number` elements after that
Lesson 121Rest Elements in Tuples
Can engineers refactor safely
(Do they get errors when breaking changes happen?
Lesson 1602When to Stop and Ship
Can you start small
TypeScript lets you rename `.
Lesson 30When to Choose TypeScript Over Alternatives
Cap property count
objects with 20+ properties per level kill performance
Lesson 865Practical Limits of Path Type Complexity
Capability contracts
from interfaces (what the class can do)
Lesson 1055Combining implements and extends
Capitalize
intrinsic to properly case the setter name
Lesson 844The Setters Pattern
Catches typos immediately
Type `myString.
Lesson 4Autocomplete and IntelliSense Benefits
Catching errors before deployment
Type errors become blockers that must be fixed before code reaches production.
Lesson 1263Why Type-Check in CI
Celebrate milestones
When you hit 25%, 50%, 75% converted—acknowledge it
Lesson 1619Tracking Progress and Setting Migration Goals
chain
of method calls that reads smoothly, like sentences in natural language.
Lesson 1067Method Chaining with thisLesson 1462Building Custom Extraction Utilities
Chain multiple remapped types
(a remapped type that consumes another remapped type)
Lesson 764Performance Considerations with as
Chain multiple variadic transformations
(reversing a flattened concatenation of extracted tuples)
Lesson 1395Performance Considerations with Complex Variadics
Chainable methods
(configuration, setup) return `this` to enable fluent interfaces
Lesson 1078Mixing Chainable and Non-Chainable Methods
Chained generic transformations
(mapping over mapped types over mapped types)
Lesson 1711Understanding Type Instantiation Depth
Changes are caught early
if you annotate a return type and then modify the function body, TypeScript immediately flags mismatches
Lesson 166Balancing Inference and Explicitness in Teams
Changes ripple unpredictably
through inference chains
Lesson 1480The Maintenance Burden of Clever Types
Changes surface immediately
if the API team modifies a type, the frontend sees compiler errors before any code runs
Lesson 1332Collaborating Through Type Definitions
Cheat sheets
for quick syntax reference
Lesson 39Community Resources and Learning
Check every possible path
the `any` value takes
Lesson 1723The any Pollution Performance Hit
Check it's an object
(not null, not primitive)
Lesson 927Validating Object Shape with Type Predicates
Check the tooling landscape
TypeScript has DefinitelyTyped, meaning almost every popular library has type definitions ready.
Lesson 30When to Choose TypeScript Over Alternatives
Check what's in it
(type narrowing with guards)
Lesson 131Using unknown Values Safely
Check which properties
each type requires
Lesson 438Reading Intersection Error Messages
Checking assignability
Is `A | B` assignable to `C`?
Lesson 1708Union and Intersection Expansion
Checks for `exports` first
if present, uses only those paths
Lesson 1116The exports Field for Modern Packages
Checks out your code
from the repository
Lesson 1265Setting Up GitHub Actions for TypeScript
Choose clarity
If explaining your type takes more than a sentence, consider simplifying it.
Lesson 1516Prioritize Developer Experience Over Perfect Types
Chop
Cut vegetables into small pieces" (method style) or "**Chopping instruction:** (how to cut vegetables)" (property style).
Lesson 292Function Properties in Object Types
Chopping instruction
(how to cut vegetables)" (property style).
Lesson 292Function Properties in Object Types
CI checks
that fail if the count of `.
Lesson 1601Team Coordination During Migration
CI runs `tsc --noEmit`
to type-check without emitting files
Lesson 1270Reporting Type Errors in Pull Requests
CI/CD pipelines
Your build tool (like Vite or Webpack) already handles compilation, so you just want TypeScript to validate types before deployment
Lesson 74Running Type Checks Without Emitting FilesLesson 1746Use Incremental Compilation and Build Modes
Circular dependency risks
Type-level imports might create cycles that break module loading
Lesson 1102Why Type-Only Imports Exist
Circular references
between procedures or router types can create impossible inference puzzles.
Lesson 1580Type Inference Limitations and Workarounds
Circular type references
that create recursive inference chains
Lesson 1717The Hidden Cost of Inference
Clarity
The `export` keyword at the start immediately signals "this type is public API.
Lesson 1091Exporting inline type definitionsLesson 1096Type-only export syntax with export type
Clarity matters more
Merged interfaces scatter definition across files, making them harder to understand
Lesson 369When to Leverage Declaration Merging
Class instance or constructor
→ `instanceof`
Lesson 220Choosing Between in, instanceof, and typeof
Class ownership
Static properties live on the class constructor function itself.
Lesson 1056Static Properties Basics
Cleaner semantics
The type system understands these are abstract markers, not real properties.
Lesson 1351Declaring Brand Symbols
Clear dependency graph
`references` explicitly document what depends on what
Lesson 1229Monorepo Patterns with References
Clearer boundaries
Only the public API (what's exported) is visible, enforced by declarations
Lesson 1227Cross-Project Imports
Clearer project boundaries
(enforced separation of concerns)
Lesson 1221What Are Composite Projects?
Client-side optimizations
React Query (used by tRPC's React client) caches queries but handles mutations differently
Lesson 1563tRPC mutation() Method Basics
Client-side types
The tRPC client automatically knows what shape of data to send, with full autocomplete.
Lesson 1542Input Validation with Zod Schemas
Code review guidelines
specific to TypeScript (not just general review)
Lesson 1601Team Coordination During Migration
Code review quality
Reviewers can focus on logic and architecture instead of catching type mistakes manually.
Lesson 1263Why Type-Check in CI
Code transformation tools
that analyze and modify TypeScript code
Lesson 1796Long-Term Vision: TypeScript as a Platform
Code-First
You write working JavaScript-style code first, adding minimal type annotations, then refactor and strengthen types as patterns emerge.
Lesson 1326Type-First vs Code-First Trade-offs
Coexistence
Both compiled to `dist/` together
Lesson 1592Setting Up a Dual-Mode Project
Cognitive load compounds
What made sense in isolation becomes a maintenance burden when multiplied across a large codebase
Lesson 1695Maintainability Over Time
Cognitive overload
Developers trying to understand *what* the code does must also parse *how* the types work
Lesson 1515Separate Business Logic from Type AcrobaticsLesson 1651The Readability Problem with Giant Union Types
Collisions
Your method might conflict with future standard additions
Lesson 1629Prototype Manipulation and Monkey-Patching
Comment threads
Comments can have reply comments (same type)
Lesson 356Recursive Type Aliases
Comment your conditional constraints
to explain intent
Lesson 650Error Messages from Failed Conditional Constraints
Common pattern
Many projects create a `types/` or `typings/` folder at the root and add it to `include`:
Lesson 1167Placement and Scope of Augmentation Files
Communicate intent clearly
to other developers (and your future self)
Lesson 1339Splitting Types by Context
Community Outreach
Major changes are announced in blog posts, Twitter threads, and Discord discussions well before release.
Lesson 1785Community Feedback and Breaking Changes
Community Scripts
Many teams build custom AST-based tools using the TypeScript Compiler API to handle project- specific patterns
Lesson 1648Alternative Tools: dts-gen and Others
Compatibility
Will it break existing code?
Lesson 1793The Role of Community Feedback
Compatibility is non-negotiable
TypeScript's success depends on staying aligned with JavaScript.
Lesson 1755TC39 and ECMAScript: The Foundation
Compatibility with JavaScript
types are erased at runtime
Lesson 1486Why TypeScript Lacks True HKTs
Compile-time errors
are like spelling and grammar mistakes you catch *before* submitting—your spell-checker flags them immediately.
Lesson 2Runtime Errors vs Compile-Time ErrorsLesson 466When to Use Literal TypesLesson 474as const for Configuration ObjectsLesson 1575Context Type Propagation
compile-time guarantee
the TypeScript compiler refuses to build your code until you handle all possibilities.
Lesson 423Compile-Time vs Runtime GuaranteesLesson 954What Is an Exhaustive Check?
Compile-time type
`Status` for parameters and variables.
Lesson 482Extracting Union Members as Values
Compile-time values
All enum members have constant values known at compile time
Lesson 506When to Use const enums
Compiler options
– ensuring settings haven't changed
Lesson 1225The .tsbuildinfo File
Compiler Performance
saw massive gains.
Lesson 18TypeScript 4.x: Refinement and Performance
Compiler Speed
The time it takes to run `tsc` from start to finish.
Lesson 1781Performance and Scalability Focus
Compiler-guided
TypeScript errors show you exactly where assumptions were made
Lesson 1676Replacing any with unknown for Safe Migration
Complex business logic
with nuanced type requirements will defeat automated tools.
Lesson 1649When Automation Helps vs Manual Migration
Complex conditional types
that branch repeatedly
Lesson 1717The Hidden Cost of Inference
Complex Domain Modeling
Systems with intricate business rules (financial calculations, state machines, workflow engines) benefit immensely.
Lesson 1333When Type-First Design Pays Off
Complex functions
benefit from annotations because they serve as documentation.
Lesson 249Return Type Annotations Best Practices
Complex inferred types
that take seconds to display
Lesson 1448Performance Considerations with Complex infer
Complex module resolution
Searching `node_modules` hierarchies is expensive
Lesson 1710Symbol Table Lookups and Resolution
Complex parsing logic
Template literals can't encode runtime behavior—use validators.
Lesson 828Limitations of Template Literals
Complex transformations
using conditionals and nested mapped types
Lesson 1738Cache Expensive Mapped Type Results
Complex type tooltips
that take seconds to display
Lesson 839Performance and Complexity Considerations
Complex union narrowing
Large unions being filtered through many conditions
Lesson 1709Control Flow Analysis Overhead
Complexity cost
Does it make the language harder to learn or maintain?
Lesson 1793The Role of Community Feedback
Complexity explosion
HKTs would introduce a level of abstraction that conflicts with TypeScript's goal of being accessible.
Lesson 1494The TC39 and TypeScript Roadmap on HKTs
Component prop unions
in large UI libraries
Lesson 1721Type Checking Large Union Types
Composite projects
with `composite: true` enable incremental builds and project references.
Lesson 1250Combining with Composite Projects
Compute initial values
from multiple sources
Lesson 1059Static Blocks for Initialization
Concatenate
the flattened first element with the flattened rest
Lesson 1383Flattening Nested Tuples
Concrete members
are ready-to-use — methods and properties that already have implementations.
Lesson 1053Extending Abstract Classes
Conditional `extends`
"Is T assignable to U?
Lesson 766The extends Keyword in Conditionals
Conditional chaining
means your methods selectively return `this` based on runtime logic, while TypeScript still tracks the type correctly.
Lesson 1079Conditional Chaining with this
Conditional check
`T extends object` asks "Is this type an object?
Lesson 812The DeepPartial PatternLesson 813The DeepReadonly Pattern
Conditional constraints
let you write `extends` clauses that check a condition and enforce different constraints based on the result.
Lesson 646Conditional Constraints for Function Signatures
Conditional modifier application
combines mapped types with conditional types to make dynamic decisions about whether to apply `?
Lesson 748Conditional Modifier Application
Conditional type resolutions
The outcome of `T extends U ?
Lesson 1704The Type Cache and Memoization
Config
Configuration objects for initializing systems
Lesson 1685Naming Conventions That Clarify
Configuration
set at creation time
Lesson 1023Readonly Properties
Configuration constants
(like `maxConnections` above)
Lesson 1056Static Properties Basics
Configuration containers
that need exact literal types
Lesson 1421const Type Parameters in Classes
Configuration merging
where defaults fill in all optional fields
Lesson 723Making All Properties Required
Configuration objects
Some settings have defaults, so users don't need to specify everything
Lesson 664The Partial<T> UtilityLesson 1414What const Type Parameters SolveLesson 1593Choosing Your First Files
Confusion Has Real Consequences
Lesson 1369When Opaque Types Add Value
Connect your form library
to use both the runtime validation and compile-time types
Lesson 1317Type Safety in Form Handling
Consider lazy loading
For admin panels or infrequent operations, load validation libraries only when needed rather than in your main bundle.
Lesson 1297Performance and Bundle Size Considerations
Consider runtime alternatives
For very large sets, plain JavaScript might be more appropriate
Lesson 839Performance and Complexity Considerations
Consider splitting
separate shallow path types from deep ones
Lesson 865Practical Limits of Path Type Complexity
Consistent error responses
when validation fails
Lesson 1535Zod Validators with Hono Middleware
const enums
inline their values at compile time to eliminate runtime overhead.
Lesson 513The const Enum Escape Hatch Trade-offsLesson 1255Const Enums Break Without Cross- File Context
Constants and enums
that appear in many modules
Lesson 1156Declaring Global Types and Interfaces
Constrained numbers
`PositiveInt`, `Percentage`, `NonZero`
Lesson 1353Branding Primitive Types
constraint
(only valid HTTP methods) and **precision** (the exact literal type is preserved).
Lesson 628Constraints with Union TypesLesson 1423When Not to Use const Type Parameters
Constraint `extends`
"T *must* be assignable to U" — enforces a requirement
Lesson 766The extends Keyword in Conditionals
Constraint solving
is the algorithmic process where TypeScript examines all the contexts where a type parameter appears, collects requirements (constraints), and finds a type that satisfies all of them simultaneously.
Lesson 1702Constraint Solving and UnificationLesson 1707Contextual Typing Performance
Constraints are visible
an annotated variable shows what you *intended* to allow, not just what TypeScript happened to infer from the first value
Lesson 166Balancing Inference and Explicitness in Teams
Construct the current path
using template literal types
Lesson 852Constructing Path Unions from Object Keys
Constructor functions
that validate and return the opaque type
Lesson 1355Opaque Type Pattern
Constructor signature
What parameters the class accepts when instantiated
Lesson 1141Declaring Classes
Consumer convenience
`useTheme()` returns `ThemeContextType`, not `ThemeContextType | undefined`
Lesson 1526Typing Context Providers with createContext
Context mutations in middleware
where the shape changes dramatically may confuse inference.
Lesson 1580Type Inference Limitations and Workarounds
context object
(`c`) that knows exactly what route you're on, what parameters exist, what your environment variables are, and what shape your request body has—all at compile time.
Lesson 1533Hono's Type-Safe Request ContextLesson 1545Context Typing for Procedures
Context propagation
from outer to inner expressions
Lesson 1707Contextual Typing Performance
Contextual hints
about why a type didn't match
Lesson 1791Better Error Messages and Developer Experience
Continuous Integration (CI)
is your automated build pipeline — the system that runs whenever code is pushed or a pull request is opened.
Lesson 1263Why Type-Check in CI
Contract-First Approaches
like JSON Schema or Protocol Buffers define types in a separate specification language, then generate TypeScript.
Lesson 1581The End-to-End Type Safety Landscape
Contravariant positions
(function parameters): TypeScript creates an **intersection** of all possible matches
Lesson 800Union Collapse with Multiple infer Sites
Control flow narrowing
Narrowing `string | number` with `typeof` requires expansion to determine what remains.
Lesson 1708Union and Intersection Expansion
Control flow safety
(`noFallthroughCasesInSwitch`, `noImplicitReturns`) catches logic errors but doesn't enforce property initialization.
Lesson 1220Combining Safety Flags for Maximum Protection
Convenience
No need to reinvent common patterns
Lesson 663What Are Utility Types?
Convention
It's the most common pattern in TypeScript codebases—most libraries export types this way.
Lesson 1091Exporting inline type definitions
Correct export statements
types appear with proper `export` keywords
Lesson 1251Verifying Library Type Exports
Correctness Fixes
When a type-checking bug allows unsafe code, fixing it breaks programs that relied on the bug.
Lesson 1785Community Feedback and Breaking Changes
Cost
Steep learning curve, verbose type annotations, and complex error messages.
Lesson 1502Libraries That Use HKT Simulation: fp-ts
Counters or caches
shared across all instances
Lesson 1056Static Properties Basics
Covariant positions
(return types, promise contents): TypeScript creates a **union** of all possible matches
Lesson 800Union Collapse with Multiple infer Sites
Create custom type declarations
that override or augment the library
Lesson 884any in Third-Party Libraries
Creates accountability
for maintaining type correctness
Lesson 1266Failing CI on Type Errors
Creates large intermediate types
(massive unions, distributed conditionals)
Lesson 1729Identifying Hot Types in Traces
Creates placeholder types
for functions and variables
Lesson 1644Running ts-migrate on a Project
Cross-reference instantiation counts
If a type is instantiated 10,000 times, look for places in tight loops or heavily-called functions where that type appears.
Lesson 1733Correlating Trace Data with Code
Cryptic when errors occur
Type errors in HKT-heavy code produce sprawling error messages that reference abstract type machinery rather than concrete business logic
Lesson 1503The Complexity Tax of HKT Simulation
CSS class names
(`"btn-${string}"`)
Lesson 822Prefix and Suffix Patterns
CSS imports
, **global type augmentations** all need regular imports to execute.
Lesson 1107Type-Only Imports with Side Effects

D

Data Pipelines
When data flows through multiple transformation stages, type-driven design ensures each stage's input/output contracts align, preventing runtime shape mismatches.
Lesson 1333When Type-First Design Pays Off
Data processing loops
that transform arrays with generic helpers
Lesson 1724Excessive Type Instantiation in Loops
Data shape mismatches
If your API expects `{id: number, name: string}` but receives `{userId: number, userName: string}`, TypeScript flags it
Lesson 8API Contract Enforcement
Data transformation
where output type depends on input type
Lesson 1663When Generics Are Better: Type Preservation Needed
Database column prefixes
(`"user_${string}"`)
Lesson 822Prefix and Suffix Patterns
Database connections
Pass your ORM client or connection pool so procedures can query data.
Lesson 1545Context Typing for Procedures
Database entities
after creation, when all fields must exist
Lesson 723Making All Properties Required
Database Schema → TypeScript
Generate types from SQL table definitions
Lesson 1514Use Code Generation for Complex Patterns
Debugging clarity
File names and paths match between source and output
Lesson 1232tsc Output: Per-File Transpilation
Debugging import errors
Why can't TypeScript find your module?
Lesson 1120Module Resolution Tracing with --traceResolution
Debugging requires expertise
in your own type system's internals rather than domain logic
Lesson 1506Error Messages Become Unusable
Declaration Files Are Required
Lesson 1222Enabling composite: true
Declaration maps
create a bridge back to the source.
Lesson 1249Declaration Maps for Source Navigation
Declare `this: void`
if the function shouldn't use `this` at all.
Lesson 1186noImplicitThis
Declaring global libraries
that attach to `window` or `global`
Lesson 1143Namespaces in Declarations
Decode
(validate and parse) external data at runtime
Lesson 1302io-ts and Codec-Based Inference
Decorator context object
is now the primary way to access metadata
Lesson 1784Decorator Standardization Progress
Decorator execution order
changed (top-to-bottom vs bottom-to-top in some contexts)
Lesson 1784Decorator Standardization Progress
Dedicated Slack/Teams channel
for migration questions
Lesson 1601Team Coordination During Migration
Deep call stacks
Recursive or deeply nested conditional types
Lesson 1754Measuring IDE Performance
Deep nesting
Multiple levels of `if`/`else` checking different type guards
Lesson 1709Control Flow Analysis OverheadLesson 1718Variadic Tuple Complexity
Deep nesting exists
Each scope level adds overhead
Lesson 1710Symbol Table Lookups and Resolution
Deep recursion errors
or "Type instantiation is excessively deep"
Lesson 1448Performance Considerations with Complex infer
Deep tuple spreads
in variadic generics
Lesson 1711Understanding Type Instantiation Depth
Deep type recursion
creates nested structures your IDE expands fully
Lesson 1484Recognizing When You've Gone Too FarLesson 1631Build Times Exploding
Deeply nested generics
where type parameters flow through many layers
Lesson 1717The Hidden Cost of InferenceLesson 1749Complex Types and Autocomplete Lag
Deeply nested routers
with many layers can exceed TypeScript's recursion limits.
Lesson 1580Type Inference Limitations and Workarounds
DeepPartial pattern
uses conditional types to detect object types and recursively apply the transformation:
Lesson 812The DeepPartial Pattern
Default behavior is acceptable
A catch-all `else` or `default` case handles all other variants identically
Lesson 426When Exhaustiveness Isn't Needed
Default to string enums
for most application code — clarity beats brevity.
Lesson 498When to Choose Numeric vs String Enums
default values
that kick in when a property is missing or `undefined`.
Lesson 309Default Values with Optional PropertiesLesson 1056Static Properties Basics
Defensive library APIs
that return deeply frozen data structures
Lesson 813The DeepReadonly Pattern
Deferred resolution
when type parameters are involved and not yet known
Lesson 776When Conditionals Resolve
Define a schema
that matches your API expectations (using Zod, Yup, etc.
Lesson 1317Type Safety in Form Handling
Define the schema
with Zod (runtime validation)
Lesson 1544Mutation Procedures with Input Types
Define the type
What shape should this function accept?
Lesson 1328Using Types to Drive Implementation
Define the types
that would make that usage possible
Lesson 1327Designing Public APIs with Types
Define your types
(interfaces, unions, generics)
Lesson 1322What Type-Driven Design Means
Defining your API once
in TypeScript functions
Lesson 1555No Code Generation Required
Definite assertion `!`
Property type is `string` — you promise it will be assigned, just not in a way TypeScript can verify
Lesson 1022Optional Properties in Classes
Delayed autocomplete
several-second pauses before suggestions appear
Lesson 1505IDE Performance Degradation
Delayed error highlighting
Red squiggles appearing seconds after you type
Lesson 1477Compile-Time Performance Impact
Demand
How many developers face this problem?
Lesson 1793The Role of Community Feedback
Deno (2020)
validated TypeScript's maturation.
Lesson 20Community Adoption Milestones
Deno or Bun
, which run TypeScript natively without configuration.
Lesson 75Choosing the Right Execution Method for Your Use Case
Dependencies
`node_modules` (usually excluded by default, but explicit is better).
Lesson 1751excludeFiles and IDE Performance
Dependency count
– Each package in `node_modules` (especially with type definitions) adds more types to resolve
Lesson 1750Project Size Impact on IDE Speed
Dependency graph
– which files import/depend on which other files
Lesson 1225The .tsbuildinfo File
Dependency injection
where properties are set by a container
Lesson 1021Definite Assignment Assertion (!)
Deprecate with comments
Add `@deprecated` JSDoc comments to the old types to guide developers:
Lesson 1660Incremental Refactoring Strategy
Deprecated API bridges
When supporting old code paths you're actively removing.
Lesson 896When @ts-expect-error Is Preferred
Deprecation is extremely rare
TypeScript almost never deprecates features.
Lesson 1794Backwards Compatibility Commitment
Deprecation Warnings
When possible, features are deprecated with compile-time warnings before removal.
Lesson 1785Community Feedback and Breaking Changes
Describe existing runtime code
without modifying it
Lesson 1138Basic Declaration File Structure
Describing global functions
Lesson 1129The declare Keyword
Describing global variables
Lesson 1129The declare Keyword
Design Meetings
Notes from weekly design meetings are published publicly, showing the reasoning behind decisions.
Lesson 1785Community Feedback and Breaking ChangesLesson 1793The Role of Community Feedback
Destructured values without context
The structure doesn't tell TypeScript what types are inside
Lesson 1200noImplicitAny: Banning Implicit any Types
Detailed Release Notes
Breaking changes get their own section with migration guidance.
Lesson 1785Community Feedback and Breaking Changes
Determines the dependency graph
which projects depend on which
Lesson 1224Building with --build Mode
Development halts
during migration—no new features, no bug fixes, just type errors.
Lesson 1613The All-at-Once Approach: Risks and Rewards
Development mode
where speed matters more than exhaustive checking
Lesson 59skipLibCheck: Faster Compilation
Development workflows
where you're iterating frequently
Lesson 1746Use Incremental Compilation and Build Modes
Different `moduleResolution` strategies
between environments
Lesson 1123Troubleshooting Common Resolution Errors
Difficult narrowing
When you need to narrow a giant union, your switch statements or if-else chains become massive.
Lesson 1651The Readability Problem with Giant Union TypesLesson 1653Discriminated Unions vs Flat String Unions
Difficult to debug
There's no straightforward way to "step through" type-level computation
Lesson 1503The Complexity Tax of HKT Simulation
Direct mismatches are caught
`UserId` can't directly become `ProductId`
Lesson 1357Flavoring vs Full Branding
Directly exposed
(naked): Apply the conditional to each union member separately
Lesson 779What Makes a Conditional Type Distributive
Disadvantages
More invasive changes, higher risk of incorrect inferences, requires more careful review, and runs slower than ts-migrate's quick-fix approach.
Lesson 1647Alternative Tools: TypeStat
discriminant
or **tag**) is a common property that exists on all union members, where each member has a different literal value for that property.
Lesson 399Narrowing with Discriminant PropertiesLesson 411Result Types with Discriminated UnionsLesson 613Result/Either Type for Error Handling
discriminated union
(also called a "tagged union") is a union of object types where each variant has a common property with a distinct literal value.
Lesson 404What Is a Discriminated Union?Lesson 406Basic Discriminated Union Example
Distribute conditionals
across tuple members
Lesson 1718Variadic Tuple Complexity
Distribution magic
When `T` is a union, this distributes over each member
Lesson 974Building NonNullable with never
Document with simple examples
, not type signatures
Lesson 1482Library Boundaries and Type Complexity
Document your extensions
future developers need to know these aren't standard library features
Lesson 365Augmenting Third-Party Interfaces
Documentation enforcement
Types serve as enforced contracts.
Lesson 1263Why Type-Check in CI
Documentation generators
that extract type information
Lesson 1796Long-Term Vision: TypeScript as a Platform
Documentation rots quickly
as type implementations evolve
Lesson 1480The Maintenance Burden of Clever Types
Documents intent
the name explains what the union represents
Lesson 353Aliasing Union Types
Doesn't show intermediate steps
you can't see which specific `infer` failed
Lesson 1476Debugging Complex Type Errors
Domain Concepts Are Non-Interchangeable
Lesson 1369When Opaque Types Add Value
Domain modeling is complex
Financial systems, medical records, or state machines benefit from explicit type modeling before implementation
Lesson 1326Type-First vs Code-First Trade-offs
Domain models
used everywhere (User, Product, Order)
Lesson 1156Declaring Global Types and Interfaces
Dozens of cascading errors
Revert the rename.
Lesson 1594The .js to .ts Rename Strategy
Dynamic property access
Code using `obj[dynamicKey]` patterns needs index signatures or refactoring
Lesson 1594The .js to .ts Rename Strategy
Dynamic typing
means types are checked *while* the program is running.
Lesson 1What is Static Typing?

E

Easier maintenance
Add a union member once, not across multiple overloads
Lesson 1408Union Signatures for Shared Logic
Easier refactoring
Change a value once, and the inferred type updates everywhere automatically
Lesson 155The Default Rule: Let TypeScript Infer
Ecosystem compatibility
Built-in support for JavaScript libraries through DefinitelyTyped
Lesson 23Flow: Facebook's Type Checker
Effect
, and **ts-results** have invested thousands of hours solving the edge cases, performance issues, and ergonomic problems you'll hit when building advanced patterns yourself.
Lesson 1510Use Libraries with Good Types Instead of Recreating Them
Eliminate optional properties
where they don't belong
Lesson 1339Splitting Types by Context
Emit
(generating JavaScript output)
Lesson 1726Reading the Diagnostics Output
Emit signatures
– checksums of generated output
Lesson 1225The .tsbuildinfo File
Empty array initialization
Lesson 602Inference Failure Cases
Empty collection edge cases
Instead of `items: T[]` that might be empty when it shouldn't be, use `{ status: 'empty' } | { status: 'populated'; items: [T, .
Lesson 1346Refactoring Toward Impossible States
Enable `isolatedModules`
in your `tsconfig.
Lesson 1262Debugging Bundler Type Issues
Encapsulate business logic
around property changes
Lesson 1041Getters and Setters with Different Access
Encapsulation
Package internals stay private; only documented paths work
Lesson 1116The exports Field for Modern Packages
Encode
(serialize) TypeScript values back to a wire format
Lesson 1302io-ts and Codec-Based Inference
Enforce specific arity
constraints at the type level
Lesson 1394Variadic Tuples vs Rest Parameters
Enforced boundaries
Can't accidentally import from `admin-app` into `customer-portal`
Lesson 1229Monorepo Patterns with References
enforces
that you can't accidentally use the imported name as a value.
Lesson 1103The import type SyntaxLesson 1323Types as Specifications
Enums
create actual JavaScript objects at runtime (in most cases), while **discriminated unions** are pure type-level constructs that compile away completely.
Lesson 414Discriminated Unions vs EnumsLesson 481Literal Unions vs Enums: Trade-offsLesson 1769Syntax That Would Be Standardized
Erasable
Can be completely removed without changing runtime behavior
Lesson 1769Syntax That Would Be Standardized
Error case
`{ success: false, error: ZodError }` — detailed error information
Lesson 1294Safe Parsing with .safeParse
Error code enums
represented as string literal unions
Lesson 1721Type Checking Large Union Types
Error detection
Typos and wrong method calls slip through
Lesson 179Implicit any from Untyped Parameters
Error localization
Pinpoint exactly which step breaks the chain
Lesson 1759Pipeline Operator and Type Flow
Error messages become incomprehensible
When a type fails to match, the compiler might generate a 200-line error message showing the entire recursive expansion.
Lesson 1475The Readability Cost of Complex Type-Level CodeLesson 1508Diminishing Returns on Type Safety
Error messages become unreadable
walls of text
Lesson 865Practical Limits of Path Type Complexity
Error squiggles
appearing instantly
Lesson 1747Why IDE Performance Matters
ES2015
(or ES6): Modern baseline (arrow functions, classes)
Lesson 52target: Choosing Your Output JavaScript Version
ES2020
Recent features (optional chaining, nullish coalescing)
Lesson 52target: Choosing Your Output JavaScript Version
ES2020+
Modern features like optional chaining
Lesson 78The --target Flag: Choosing Your JavaScript Version
ES6/ES2015
Classes, arrow functions, promises
Lesson 78The --target Flag: Choosing Your JavaScript Version
ESLint configuration
to warn about `.
Lesson 1601Team Coordination During Migration
ESM
(ECMAScript Modules, the standardized version).
Lesson 1121ESM vs CommonJS Resolution Differences
Event names
(`"on${string}"` or `"${string}Changed"`)
Lesson 822Prefix and Suffix Patterns
Event type systems
with many event shapes
Lesson 1721Type Checking Large Union Types
Everything else (internal implementation)
→ `private`
Lesson 1043When to Use Each Access Level
Exact string literals
for type safety (like configuration keys)
Lesson 1416const vs Normal Type Parameters
Example situation
You install a popular JavaScript utility library, but TypeScript treats all its exports as `any` because there's no type information available.
Lesson 1125When You Need Declaration Files
Exclude
removes types from `T` that are assignable to `U` (keeps what doesn't match)
Lesson 691Exclude vs Extract Mental ModelLesson 977never vs undefined in Conditionals
Execute
Run the generated JavaScript with `node yourfile.
Lesson 65Using tsc to Compile and Run
Execute Program
, **TypeScript Exercises**, and **type-challenges** on GitHub offer progressively harder problems.
Lesson 39Community Resources and Learning
Exhaustive checking
when switching on config values
Lesson 474as const for Configuration Objects
expand
these types immediately (computing all possibilities), or should it **defer** expansion (keeping the types lazy)?
Lesson 1708Union and Intersection ExpansionLesson 1749Complex Types and Autocomplete Lag
Expand each spread operation
into all possible combinations
Lesson 1718Variadic Tuple Complexity
Experimental decorators
(`experimentalDecorators: true`) — the original implementation most libraries still use
Lesson 1757Decorators: The Long Journey
explicit
, it's a conscious decision to abandon type safety for that specific value—useful in the narrow cases you've learned, but dangerous when overused.
Lesson 876any Disables All Type CheckingLesson 1080this Return Types vs Explicit Class NamesLesson 1259verbatimModuleSyntax as Stricter Alternative
Explicit `this` parameters
A fake first parameter that declares what `this` should be
Lesson 1089ThisType vs Explicit this Parameters
Explicit annotation
means writing out the TypeScript type first, then building a schema that matches it.
Lesson 1309When to Explicitly Annotate vs Purely Infer
Explicit return type
Better for documentation, shows intent clearly
Lesson 1523Typing Custom Hooks with Return Tuples
Explicitness prevents errors
You want callers to think carefully about the type
Lesson 570When to Use Defaults vs Required Parameters
Exponential intersection checks
combining unions multiplies complexity
Lesson 1741Break Large Union Types into Smaller Chunks
Export simple interface wrappers
instead of raw conditional types
Lesson 1482Library Boundaries and Type Complexity
Exporting the router type
(just the type, not runtime code)
Lesson 1555No Code Generation Required
Express: Manual Typing
You define everything yourself through generics.
Lesson 1540Framework Comparison: Where Types Come From
Expressiveness
Does it enable safer or clearer patterns?
Lesson 1793The Role of Community Feedback
extends
(is assignable to) `TypeToMatch` gets included in the result.
Lesson 695Extract for Type-Safe SubsetsLesson 768Conditional Types with Primitives
External data
(API responses, user input, configuration files)
Lesson 1509Embrace Runtime Checks Over Type Gymnastics
External library integration
Use `any` temporarily for untyped third-party code
Lesson 874Gradual Typing Philosophy
External library types
Missing `@types` packages you can install
Lesson 1678Auditing Codebases for any Usage
Extract complex conditionals
into separate type aliases
Lesson 650Error Messages from Failed Conditional Constraints
Extract intermediate types
Instead of chaining operations inline, break them into named type aliases you can inspect individually.
Lesson 1691Debugging Complex Generic Errors
Extract shared code
Move code both projects need into a third, lower-level project that both can reference
Lesson 1228Circular References Between Projects
Extract the first element
using index access
Lesson 1383Flattening Nested Tuples
Extracting intermediate types
instead of nesting everything inline
Lesson 764Performance Considerations with as
Extracts all property keys
using `keyof`
Lesson 1715Mapped Types Over Large Object Types

F

Factory patterns
`ConstructorParameters<typeof MyClass>` lets you build helpers without retyping constructor args
Lesson 707When These Utilities Save Repetition
Fail loudly
The `throw` ensures bad data never leaks through
Lesson 934Generic parseResponse Helper Function
Falls back gracefully
if no match, resolution fails (no default file crawling)
Lesson 1116The exports Field for Modern Packages
false positives
cases where TypeScript narrows the type based on your predicate, but the actual runtime value doesn't match.
Lesson 235Type Predicate and Assertion PitfallsLesson 1190The Cost of strict: False Positives
Fast development iteration
Running scripts repeatedly during development
Lesson 67tsx: A Faster Alternative to ts-node
Fast JavaScript transpilation
(bundlers' strength)
Lesson 1247Setting emitDeclarationOnly in tsconfig.json
Fast transpilation
(bundler): `vite build` or `esbuild src/index.
Lesson 1235Type-Checking vs Transpilation Separation
Faster builds
TypeScript doesn't need to re-parse and re-check all source files from referenced projects
Lesson 1227Cross-Project Imports
Faster development
You spend less time writing redundant type information
Lesson 155The Default Rule: Let TypeScript Infer
Faster editor feedback
Your IDE can parse and bind code instantly while deferring expensive type checks
Lesson 1699TypeScript's Two-Phase Compilation Model
Faster feedback loops
Change code, refresh browser.
Lesson 1768The Motivation: Types Without Transpilation
Faster incremental builds
(only changed projects rebuild)
Lesson 1221What Are Composite Projects?
Faster iteration
No need to clone locally and run type-checks to understand CI failures
Lesson 1270Reporting Type Errors in Pull Requests
Fastify
offers high-performance HTTP handling with first-class TypeScript support.
Lesson 33Backend TypeScript: Node.js and BeyondLesson 1540Framework Comparison: Where Types Come From
Fastify: Schema-Driven Approach
You define JSON schemas, and TypeScript types are derived from those schemas (or vice versa with type providers).
Lesson 1540Framework Comparison: Where Types Come From
Fewer contradictions
You can't accidentally write an annotation that conflicts with the actual value
Lesson 155The Default Rule: Let TypeScript Infer
Fewer escape hatches
TypeScript's `any` type essentially turns off type checking.
Lesson 27Hegel: A Stronger Type System for JavaScript
Fewer production failures
(users don't hit bugs)
Lesson 2Runtime Errors vs Compile-Time Errors
File parsing
– JSON, CSV, configuration files
Lesson 936unknown for External Data Entry Points
File switching becomes sluggish
as types recompute
Lesson 1747Why IDE Performance Matters
File systems
Folders contain files or more folders (same type)
Lesson 356Recursive Type Aliases
File timestamps
– when each source file was last compiled
Lesson 1225The .tsbuildinfo File
File-level bottlenecks
Specific files that dominate check time
Lesson 1754Measuring IDE Performance
Files processed
How many files TypeScript examined
Lesson 1731The --diagnostics Flag for Quick Summaries
Fill in the implementation
following the type contracts
Lesson 1322What Type-Driven Design Means
Final result type mismatch
with how you use it
Lesson 1081Type Safety Guarantees in Chained Calls
Find type errors gradually
without project-wide disruption
Lesson 1606The @ts-check Directive for File-Level Opt-In
first
in overload resolution order—TypeScript checks them from most-recently-declared to earliest.
Lesson 363Merging Function Overloads in InterfacesLesson 749Modifier Precedence and Ordering
First assertion
(`as unknown`): Any type can be asserted to `unknown` (the top type)
Lesson 995Overriding Incompatible Types
First assertion (`as unknown`)
You tell TypeScript "forget what this value is—treat it as completely unknown"
Lesson 994The unknown Middle Step
First pass
You might define a simple interface based on requirements:
Lesson 1329Refining Types Through Iteration
Fix
Check your import path matches the actual file location.
Lesson 1123Troubleshooting Common Resolution Errors
fixed-length
tuple, you must be explicit with a type annotation or use `as const`:
Lesson 151Tuple Inference vs Array InferenceLesson 1370Tuple Types vs Array Types
Flavoring
sits on the lighter end of the spectrum.
Lesson 1357Flavoring vs Full Branding
Fluent APIs
(chaining methods like `builder.
Lesson 612Builder Pattern with Fluent Generics
Follow the errors
Let compiler errors tell you what's missing
Lesson 1328Using Types to Drive Implementation
Following best practices
Most modern TypeScript projects prefer explicit imports over globals.
Lesson 1159export {} to Force Module Context
Follows subpath patterns
matches wildcards like `".
Lesson 1116The exports Field for Modern Packages
For code clarity
(making types obvious to readers)
Lesson 542Explicit Type Arguments
For gradual migration
, turn on flags one at a time:
Lesson 1193strict vs Individual Flags
For library compatibility
, some older packages may struggle with certain strict checks.
Lesson 1193strict vs Individual Flags
For Node.js projects
Use `"moduleResolution": "node16"` or `"nodenext"`
Lesson 1626Module Resolution Confusion
Forbid certain patterns entirely
(e.
Lesson 901Linting Suppression Comments
Form Handling
Exclude auto-generated fields when creating new records:
Lesson 678Omit<T, K>: Excluding Properties
Forward mapping
from name to value (like a normal object)
Lesson 489Reverse Mapping in Numeric Enums
Fragile coupling
Changes to business logic require navigating type-level complexity
Lesson 1515Separate Business Logic from Type Acrobatics
Framework extensions
Adding methods to jQuery objects or Express request objects
Lesson 1629Prototype Manipulation and Monkey-Patching
Framework lifecycle methods
(like React's `componentDidMount`)
Lesson 1021Definite Assignment Assertion (!)
Frequent re-exports
Each re-export chain requires additional resolution hops
Lesson 1710Symbol Table Lookups and Resolution
From Schema to Types
The tool analyzes your GraphQL schema file (or introspects a running GraphQL server) and generates TypeScript type definitions for every type, query, mutation, and subscription defined in your schema.
Lesson 1586GraphQL Code Generator Overview
Frontend developers
can build components using the agreed-upon data structures, even if the API isn't finished yet
Lesson 1332Collaborating Through Type Definitions
Full autocomplete
Your editor knows exactly what data to send and what you'll receive back
Lesson 1541tRPC Procedure BasicsLesson 1575Context Type Propagation
Full type safety
during development
Lesson 893Performance and Runtime Impact
Function boundaries
Passing narrowed types through many function calls
Lesson 1709Control Flow Analysis Overhead
Function introspection
(ReturnType, Parameters, ConstructorParameters, InstanceType, ThisParameterType, OmitThisParameter)
Lesson 716The Full Standard Library Reference
Function parameters without annotations
Lesson 127When any Appears by Default
Function parameters without types
TypeScript has no context to infer what arguments you'll pass
Lesson 1200noImplicitAny: Banning Implicit any Types
Function properties
(`propertyName: () => ReturnType`) describe properties that *happen* to hold functions.
Lesson 293Method Shorthand vs Function Properties
Function return types
A library returns `any`, so you don't know what you're getting
Lesson 884any in Third-Party Libraries
Function signatures
showing parameters and return types
Lesson 1138Basic Declaration File Structure
Function type expressions
let you define a function's shape once and reuse it everywhere through a type alias.
Lesson 240Function Type Expressions
Functor
abstraction is impossible to express directly in TypeScript because it requires abstracting over the container type itself (`Maybe`, `Array`, `Either`) rather than just the contained value.
Lesson 1488Languages That Have HKTsLesson 1498Encoding Functors with HKT Simulation
Future maintainers understand context
without archaeological code digging
Lesson 901Linting Suppression Comments
Future-proof code
You can use cutting-edge features knowing they'll become standard JavaScript
Lesson 22TypeScript's Relationship with TC39

G

Gather constraints
`T` must match the type of `"hello"`, `U` must match the type of `42`
Lesson 1702Constraint Solving and Unification
Generated code
If you have code generation steps, exclude the output folders.
Lesson 1751excludeFiles and IDE Performance
Generates a tsconfig.json
if one doesn't exist
Lesson 1644Running ts-migrate on a Project
Generic `<T>`
The function doesn't care what type you're validating—it adapts
Lesson 934Generic parseResponse Helper Function
Generic cache utilities
use type parameters to capture the exact signature of the function being cached—ensuring TypeScript knows what arguments are valid and what type the result will be.
Lesson 598Generic Cache and Memoization
generic classes
let you define type parameters that can be used throughout the class body—in constructor parameters, instance properties, and methods.
Lesson 552Generic Classes: Constructor and PropertiesLesson 562When to Use Generic Classes vs Functions
Generic conditional types
are dynamic: you write a single signature with a type that branches based on generic type parameters.
Lesson 277Overloads vs Conditional Types
Generic constraints
Poorly-typed generics that fall back to `any`
Lesson 884any in Third-Party LibrariesLesson 1503The Complexity Tax of HKT Simulation
Generic constraints without hints
When you use a generic function, TypeScript may not have enough information to infer the parameter types inside unless you provide explicit type arguments.
Lesson 188Contextual Typing Not Applied Everywhere
generic function
is a function that uses type parameters to work with different types while preserving full type information.
Lesson 537What Are Generic Functions?Lesson 538Your First Generic FunctionLesson 1520Typing useState with Generic Type Arguments
Generic functions
are best for stateless, single operations that transform or process data
Lesson 562When to Use Generic Classes vs Functions
Generic instantiations
The result of applying type arguments to generic types
Lesson 1704The Type Cache and Memoization
Generic overuse
makes code cryptic.
Lesson 1670The Readability Trade-off
Generic parameters
say "Tell me *exactly* what type you're passing, and I'll remember it throughout the function.
Lesson 1665Unions Widen, Generics Narrow
Generic preservation
Less type widening through transformation chains
Lesson 1759Pipeline Operator and Type Flow
Generic procedures
that depend on runtime values sometimes can't be fully inferred statically.
Lesson 1580Type Inference Limitations and Workarounds
Generic refinement
(each method narrows the type parameter)
Lesson 612Builder Pattern with Fluent Generics
Generic syntax
`Array<number>`, `function identity<T>(x: T)`
Lesson 1769Syntax That Would Be Standardized
Generic union parameters
use a single signature with a type parameter constrained to a union.
Lesson 1668Overloads vs Generic Union Parameters
Gets Ignored
The engine does absolutely nothing with the type information—no checking, no enforcement, no runtime behavior
Lesson 1770What Gets Ignored vs What Gets Parsed
Gets Parsed
The engine recognizes type annotation syntax and validates it's structurally correct
Lesson 1770What Gets Ignored vs What Gets Parsed
GitHub Discussions
on the TypeScript repo for feature discussions
Lesson 39Community Resources and Learning
GitHub Issues and Discussions
Developers report bugs, request features, and debate design decisions in the open.
Lesson 1785Community Feedback and Breaking Changes
Global browser APIs
added by a third-party library
Lesson 1150What declare Does: Ambient Declarations
Global variables
injected by your build tool
Lesson 1172What Global Augmentation Means
Good practice
Document *why* you added global types with comments explaining the necessity.
Lesson 1179Avoiding Global Pollution
gradual adoption
you can add types to your JavaScript code incrementally, file by file, function by function.
Lesson 11The Gradual Typing AdvantageLesson 1486Why TypeScript Lacks True HKTs
Gradual fixes
using JSDoc annotations where needed
Lesson 1612Combining allowJs, checkJs, and Incremental Migration
Gradual strictness
You can enable strict mode in typed files while allowing loose checking elsewhere
Lesson 1599The Bottom-Up vs Top-Down Decision
Gradual Typing Advantage
we learned means you *can* start with JavaScript and add TypeScript later when a project grows —but for truly tiny or temporary work, even that migration might never be worth it.
Lesson 12When Static Typing Isn't Worth It
GraphQL
You write schemas in SDL, then run `graphql-codegen` to generate TypeScript types
Lesson 1555No Code Generation Required
GraphQL → TypeScript
Generate types from GraphQL schema definitions and queries
Lesson 1514Use Code Generation for Complex Patterns
GraphQL Codegen
is the right choice when you've already committed to GraphQL.
Lesson 1589When to Choose Each Approach
GraphQL with Code Generation
uses `graphql-codegen` to generate TypeScript types from your GraphQL schema.
Lesson 1581The End-to-End Type Safety Landscape
GraphQL with codegen
Generate types from schema (requires GraphQL adoption, still a generation step)
Lesson 1551What tRPC Solves: The Type-Safety Gap
Green-field refactors
also qualify.
Lesson 1620When All-at-Once Actually Works
Greenfield codebases benefit most
because you're not fighting legacy patterns—just write safe code from day one.
Lesson 1193strict vs Individual Flags
Greenfield rewrites
where you're already touching every file make this natural.
Lesson 1613The All-at-Once Approach: Risks and Rewards
Grouping related utilities
that don't use ES modules
Lesson 1143Namespaces in Declarations
Guaranteed compatibility
TypeScript won't teach you syntax that contradicts real JavaScript
Lesson 22TypeScript's Relationship with TC39
Guaranteed correctness
If Hegel accepts your code, you have higher confidence it won't crash in those specific ways.
Lesson 27Hegel: A Stronger Type System for JavaScript
Guided by usage
You discover which types matter based on actual application flow
Lesson 1599The Bottom-Up vs Top-Down Decision

H

Handle errors
during static initialization
Lesson 1059Static Blocks for Initialization
Hard to read
Even experienced developers struggle to parse 5+ levels of conditional type nesting
Lesson 1503The Complexity Tax of HKT Simulation
Harder to maintain
Changes ripple through intricate type dependencies
Lesson 1483The Principle of Least Type Power
Harder to read
Others (and future-you) need to mentally parse complex type logic
Lesson 1483The Principle of Least Type Power
Heavily mapped types
produce verbose property transformations
Lesson 1484Recognizing When You've Gone Too Far
High CPU usage
your editor process consuming significant resources
Lesson 1505IDE Performance Degradation
High-frequency generic utilities
called throughout your codebase
Lesson 1739Use Type Parameters Instead of Lookups
High-frequency usage
in heavily-used utility functions
Lesson 1738Cache Expensive Mapped Type Results
High-priority features
the team commits to investigating or shipping
Lesson 1778The Iteration Plan and GitHub Projects
High-quality codebases
maintained by experienced teams should avoid automation.
Lesson 1649When Automation Helps vs Manual Migration
High-risk
Business logic assertions hiding real type errors
Lesson 1017Measuring Assertion Debt in Your Codebase
High-traffic functions
Utilities used everywhere
Lesson 1678Auditing Codebases for any Usage
High-value, low-effort flags
to enable early:
Lesson 1207Strictness Flags Trade-offs: Safety vs Flexibility
Higher-kinded type
Would take *type constructors* as parameters (`Container<Array>` where `Container` works with any single-argument type constructor)
Lesson 1485What Are Higher-Kinded Types?
Higher-kinded types
(HKTs) would let you abstract over *these type constructors themselves* as first-class values.
Lesson 1485What Are Higher-Kinded Types?
higher-order function
is a function that either takes a function as an argument or returns a function as its result.
Lesson 586Higher-Order FunctionsLesson 1485What Are Higher-Kinded Types?
Highly nested union distributions
through conditional types
Lesson 1711Understanding Type Instantiation Depth
HKT simulation
is TypeScript's workaround for expressing relationships between type constructors themselves— not just between concrete types.
Lesson 1495What HKT Simulation Means in TypeScript
Hoists declarations
to resolve ordering issues
Lesson 1644Running ts-migrate on a Project
Hono
High inference, excellent DX for simple cases, opinionated structure
Lesson 1540Framework Comparison: Where Types Come From
Hono: Path-Based Inference
The framework uses literal string types from your route definitions to infer parameter types automatically.
Lesson 1540Framework Comparison: Where Types Come From
Hot types
are the types that take the longest to instantiate or check.
Lesson 1729Identifying Hot Types in TracesLesson 1754Measuring IDE Performance
How strict
the type-checking should be
Lesson 49What is tsconfig.json
HTTP method mapping
Mutations typically use POST, queries use GET
Lesson 1563tRPC mutation() Method Basics

I

IDE autocomplete freezes
while resolving deeply nested conditionals
Lesson 1509Embrace Runtime Checks Over Type Gymnastics
IDE freezes
during refactoring operations
Lesson 1747Why IDE Performance Matters
IDE lag
autocomplete and hover tooltips slow down dramatically
Lesson 1741Break Large Union Types into Smaller Chunks
IDE performance degrades
due to complex type computations
Lesson 1689What 'Clever' Means in TypeScript
IDE performance suffers
from poorly optimized custom type-level code
Lesson 1510Use Libraries with Good Types Instead of Recreating Them
IDE Responsiveness
The Language Service that powers autocomplete, error squiggles, and quick fixes must remain snappy even in enormous workspaces.
Lesson 1781Performance and Scalability Focus
IDE tooltips become useless
, truncating or freezing
Lesson 1506Error Messages Become Unusable
Idempotency
means an operation can be performed multiple times with the same result.
Lesson 1566Idempotency and Query vs Mutation Choice
Identical runtime behavior
to `any`
Lesson 893Performance and Runtime Impact
Identity values
(IDs, keys, account numbers)
Lesson 1023Readonly Properties
IDEs and editors
(VS Code, WebStorm, Vim plugins) for autocomplete and error checking
Lesson 1796Long-Term Vision: TypeScript as a Platform
Immediate feedback
on type errors in JavaScript without changing file extensions
Lesson 1612Combining allowJs, checkJs, and Incremental Migration
Immediate resolution
when all types involved are concrete/known
Lesson 776When Conditionals Resolve
Immediate user impact
Entry points are where bugs hurt most
Lesson 1599The Bottom-Up vs Top-Down Decision
Immediate visibility
Developers see errors without leaving the PR page
Lesson 1270Reporting Type Errors in Pull Requests
Immediately after runtime validation
If you've just verified data with a type guard or validation function, an assertion can bridge the gap when TypeScript can't follow your logic:
Lesson 1282When Type Assertions Are Acceptable
Immutable
Once created, a symbol never changes
Lesson 90The symbol TypeLesson 672Combining Utility Types
Immutable configuration objects
that shouldn't change after initialization
Lesson 813The DeepReadonly Pattern
Immutable metadata
(creation timestamps, entity types)
Lesson 1023Readonly Properties
Implement
against the types you've already committed to
Lesson 1327Designing Public APIs with Types
Implement piece by piece
Fix one error at a time
Lesson 1328Using Types to Drive Implementation
Implementation signature mismatch
Lesson 1628Function Overload Conflicts
implicit `any`
, and it's dangerous because your code *looks* like it's typed but actually has zero type checking on those parameters.
Lesson 179Implicit any from Untyped ParametersLesson 883Implicit any from Missing Types
Implicit `any` everywhere
Functions without clear parameter patterns will trigger `noImplicitAny` errors
Lesson 1594The .js to .ts Rename Strategy
Importing classes you'll instantiate
Classes exist at runtime
Lesson 1109Type-Only Import Best Practices
Impossible refactoring
Changing a function signature meant manually hunting through thousands of files, hoping you found every usage
Lesson 14The Problem TypeScript Set Out to Solve
impossible states
combinations of values that make no sense in your domain but TypeScript happily accepts.
Lesson 1334The Impossible States ProblemLesson 1336Discriminated Unions for State
Improve
type inference to catch *more* bugs
Lesson 1779Design Goals: Stability vs Innovation
Improved type inference
TypeScript gets better at tracking `bigint` vs `number` distinctions
Lesson 1764Numeric Separators and BigInt Evolution
Improves readability
`Result` is clearer than `Success | Failure`
Lesson 353Aliasing Union Types
Improving autocomplete and IntelliSense
to make the developer experience smoother
Lesson 15TypeScript 0.8 Through 1.0
In declaration files (`.d.ts`)
Lesson 1129The declare Keyword
In development
, Vite uses **esbuild** — an extremely fast transpiler written in Go.
Lesson 1241Vite and Modern Bundler Workflows
In production
, Vite switches to **Rollup** for building your final bundle.
Lesson 1241Vite and Modern Bundler Workflows
In Remix
, loaders provide similar patterns where you type the data contract between routes and components.
Lesson 1318Type-Safe URL Parameters and Query Strings
incompatible types
, interfaces produce a **compile-time error**, while intersections attempt to merge them (often creating `never`):
Lesson 360Interface Extension vs Intersection TypesLesson 439Property Type Conflicts in Intersections
Inconsistent adoption
Team members might skip writing JSDoc comments
Lesson 26JSDoc Type Annotations in Plain JavaScript
Increased compilation time
(minutes instead of seconds)
Lesson 1715Mapped Types Over Large Object Types
Incremental builds
TypeScript only rebuilds changed projects and their dependents
Lesson 1229Monorepo Patterns with References
Incremental construction
Building an object step-by-step
Lesson 664The Partial<T> Utility
Incremental rebuild
(one file changed): 3 seconds
Lesson 1746Use Incremental Compilation and Build Modes
Incremental safety
Get type-checking benefits before committing to full TypeScript conversion
Lesson 1604checkJs: Type-Checking JavaScript Without ConversionLesson 1676Replacing any with unknown for Safe Migration
Index assignment
You can't do `point[0] = 10`
Lesson 122Readonly Tuples
Infer input types
from Zod schemas you defined server-side
Lesson 1569How tRPC Propagates Types Across the Network Boundary
Infer return types
from what your procedures return
Lesson 1569How tRPC Propagates Types Across the Network Boundary
Infer TypeScript types
from that schema
Lesson 1317Type Safety in Form Handling
Inference depth checks
to prevent infinite loops
Lesson 1707Contextual Typing Performance
Inference fails
The type parameter doesn't appear in function arguments
Lesson 570When to Use Defaults vs Required Parameters
Inheritance (`extends`)
The class receives all concrete implementations, properties, and methods from the parent class.
Lesson 1055Combining implements and extends
Initial assessment
Turn it on to see how many type errors exist in your JavaScript codebase
Lesson 1604checkJs: Type-Checking JavaScript Without Conversion
Initialization patterns
You initialize a value in a callback or method that TypeScript can't trace
Lesson 985Non-Null Assertions with !Lesson 1021Definite Assignment Assertion (!)
Initialize
The accumulator parameter defaults to an empty state
Lesson 1467Type-Level Accumulators
Inline annotations
(Approach 1) are more common and feel natural.
Lesson 237Arrow Function Type Annotations
inline comments
directly on the lines of code that contain type errors.
Lesson 1270Reporting Type Errors in Pull RequestsLesson 1696The Documentation Burden
Inner layer
(uses `T`): ensures the object has the right shape
Lesson 660Constraint Composition in Higher-Order Functions
Inserts `any` types
where it can't determine the correct type
Lesson 1643What ts-migrate Does
Inserts any casts
where types can be inferred but are problematic
Lesson 1644Running ts-migrate on a Project
Inside instance methods
Still use the class name (not `this`)
Lesson 1058Accessing Static Members
Inside static methods
Use the class name, or sometimes `this` (which refers to the constructor)
Lesson 1058Accessing Static Members
Inside the `else` block
TypeScript knows it must be `number`
Lesson 189What Is Type Narrowing?Lesson 191Using typeof to Guard Primitives
Installs dependencies
using `npm ci` (faster, more reliable than `npm install`)
Lesson 1265Setting Up GitHub Actions for TypeScript
Installs Node.js
(version 18 in this example)
Lesson 1265Setting Up GitHub Actions for TypeScript
Instant
An exact moment in universal time
Lesson 1761Temporal API and Date Type Safety
Instant error checking
with red squiggles
Lesson 36Editor Support and Language Services
Instantiates frequently
(used in many places)
Lesson 1729Identifying Hot Types in Traces
Instantiations
How many times generic types were instantiated
Lesson 1725Using --extendedDiagnostics for Build Metrics
Instead of asserting JSON
, validate with type predicates:
Lesson 1013Better Alternatives to Common Assertion Patterns
Instead of non-null assertions
, use optional chaining or guards:
Lesson 1013Better Alternatives to Common Assertion Patterns
Integration happens smoothly
because both sides already conform to the contract
Lesson 1332Collaborating Through Type Definitions
Intent is clear
Readers see exactly which keys matter
Lesson 317Index Signatures and Record Utility
Interface contract (`implements`)
The class must fulfill the type contract defined by the interface(s).
Lesson 1055Combining implements and extends
Interface declarations
`interface User { }`
Lesson 1769Syntax That Would Be Standardized
Interface registries
to map type identifiers to concrete types
Lesson 1503The Complexity Tax of HKT Simulation
Intermediate variables
If you extract a callback function into a variable before passing it, TypeScript loses context.
Lesson 188Contextual Typing Not Applied Everywhere
Internal function parameters
– lower priority
Lesson 892Migrating from any to unknown
Internal implementation details last
less impact on the rest of your codebase
Lesson 1621Dealing with Implicit any in Legacy Code
Internal microservices
that benefit from tRPC's zero-config inference
Lesson 1590Hybrid Strategies: Mixing Approaches
Internal module boundaries
(private functions)
Lesson 911Migration Strategy: any to unknown
Internal use only
The enum is used only within a single file or your own codebase, never exported from a library
Lesson 506When to Use const enums
Intersection Type Conflicts
Lesson 1631Build Times Exploding
Intersections (`&`)
make optional properties **more required**
Lesson 442Intersection vs Union for Optional Properties
Introduced as standalone option
The new flag appears first as its own `tsconfig.
Lesson 1194Future Additions to strict
Invariants Must Be Maintained
Lesson 1369When Opaque Types Add Value
Invert the dependency
Make one project clearly foundational, and move shared interfaces/types there
Lesson 1228Circular References Between Projects
Investigations
for experimental features (like those TC39 proposals you learned about)
Lesson 1778The Iteration Plan and GitHub Projects
io-ts
comes from the functional programming world and uses a different philosophy:
Lesson 1295Alternatives: Yup, io-ts, ArkTypeLesson 1302io-ts and Codec-Based Inference
Irrelevant errors
You don't need to fix type errors in code you didn't write
Lesson 84The --skipLibCheck Flag: Skipping node_modules Types
It reveals developer confusion
Maybe you didn't realize the function never returns
Lesson 969Unreachable Code After never
Iterates over each key
to apply the transformation
Lesson 1715Mapped Types Over Large Object Types
Iteration speed matters most
Hackathons, proofs-of-concept, or rapid feature validation
Lesson 1326Type-First vs Code-First Trade-offs

J

January, April, July, October
rough targets for releases
Lesson 1777Understanding TypeScript's Release Cadence
JavaScript alignment
TypeScript's guiding principle is to track JavaScript's evolution.
Lesson 1494The TC39 and TypeScript Roadmap on HKTs
JavaScript modules
that haven't been converted yet naturally produce `any` types when imported
Lesson 868Migration Boundaries in Large Codebases
Jest
, **Vitest**, and **Playwright** all support TypeScript out of the box or with minimal configuration.
Lesson 37Testing with TypeScript
JSDoc
is a commenting system that describes what types functions expect and return.
Lesson 26JSDoc Type Annotations in Plain JavaScript
JSON Files
(though `resolveJsonModule` is often better):
Lesson 1128Wildcard Module Declarations
JSON parsing results
– highest risk
Lesson 892Migrating from any to unknown
JSON Schema → TypeScript
Convert validation schemas into TypeScript interfaces
Lesson 1514Use Code Generation for Complex Patterns
Junior developers
may struggle with generics and union narrowing
Lesson 1690The Readability Trade-off

K

Keep files as JavaScript
while gaining type safety
Lesson 1606The @ts-check Directive for File-Level Opt-In
Keep it generic
pass type parameters from your subclass to the base class, or even add new ones
Lesson 558Extending Generic Classes
Keep JavaScript files executable
without a build step
Lesson 1595Type-Only Imports for Existing JS
Keep projects focused
Smaller projects mean faster individual checks
Lesson 1753Workspace Recommendations for Speed
Keep types separate
from implementation details
Lesson 1138Basic Declaration File Structure
Keeps your codebase compiling
throughout the migration
Lesson 1597The Strictness Dial Approach
Key insight
Use `// @ts-expect-error` comments strategically to mark known issues you'll fix later, preventing new violations while cataloging technical debt.
Lesson 1208Combining Strictness Options for Maximum Safety
key remapping
(the `as` clause you just learned) with **union iteration**.
Lesson 758Extracting Keys from Union TypesLesson 842Prefixing and Suffixing Object Keys
Key remapping with `as`
to rename the properties
Lesson 843The Getters Pattern
know
there's a type error and you're deliberately marking it as a known issue you plan to address.
Lesson 896When @ts-expect-error Is PreferredLesson 1578React Query Integration and Inferred Hooks
Know what procedures exist
(queries and mutations)
Lesson 1569How tRPC Propagates Types Across the Network Boundary
Know when to stop
If your type logic requires 10+ minutes to debug an error message, you've likely exceeded the practical complexity threshold.
Lesson 1691Debugging Complex Generic Errors
Known issues
with third-party types you can't fix
Lesson 894What Are Type Suppression Comments
Known regression testing
When you've identified a type issue but need to deploy a hotfix first.
Lesson 896When @ts-expect-error Is Preferred

L

Language service optimizations
for faster IDE interactions
Lesson 1790Performance and Scalability Focus
Large discriminated unions
with dozens of variants force the language service to check each member when providing suggestions.
Lesson 1749Complex Types and Autocomplete Lag
Large object types
with dozens of properties
Lesson 1738Cache Expensive Mapped Type Results
Large projects
with many dependencies (faster builds)
Lesson 59skipLibCheck: Faster Compilation
Large tuple unions
Spreading over unions of tuples with many elements
Lesson 1718Variadic Tuple Complexity
Large unions
Types that expand into hundreds of variants
Lesson 1754Measuring IDE Performance
Large-scale code generation
patterns with generic builders
Lesson 1724Excessive Type Instantiation in Loops
Larger bundles
Dead code gets included
Lesson 1102Why Type-Only Imports Exist
Leaf functions first
(utilities, helpers)
Lesson 911Migration Strategy: any to unknown
Lean on IDE hover
Hover over intermediate variables and type aliases to see what TypeScript inferred before the explosion happened.
Lesson 1691Debugging Complex Generic Errors
Lean on the compiler
After removing the old type, TypeScript will surface every location that needs updating—fix them one by one.
Lesson 1660Incremental Refactoring Strategy
Learning curve
Your team learns TypeScript patterns organically through real code, not all at once under deadline pressure.
Lesson 1591The Gradual Migration Philosophy
Learning curve management
New team members can use `any` as training wheels
Lesson 874Gradual Typing Philosophy
Learning Foundation
Understanding them deepens your grasp of generics and type manipulation
Lesson 663What Are Utility Types?
Legacy code migration
Maintaining compatibility with old code patterns
Lesson 1629Prototype Manipulation and Monkey-Patching
Legacy endpoints
with hand-written types
Lesson 1590Hybrid Strategies: Mixing Approaches
Legacy environments
might need AMD, UMD, or System formats
Lesson 1233Module Format Configuration with tsc
Legacy integration boundaries
When calling ancient APIs or interfacing with systems that predate your type definitions, `unknown` acknowledges reality better than pretending you have guarantees.
Lesson 1511Accept Some Dynamic Behavior with unknown
Legacy JavaScript modules
without type definitions
Lesson 1150What declare Does: Ambient Declarations
Legacy mode
Continue full transpilation for older environments (current behavior)
Lesson 1773Impact on the TypeScript Compiler
Legacy Node.js/CommonJS project
→ Use `node`
Lesson 1112The moduleResolution Compiler Option
Legacy projects
You might need `"moduleResolution": "node"` temporarily
Lesson 1626Module Resolution Confusion
Less ceremony
in smart constructors (the flavor doesn't need explicit assignment)
Lesson 1357Flavoring vs Full Branding
Less code
One signature instead of multiple overload declarations
Lesson 1408Union Signatures for Shared Logic
Less debugging time
(you find issues in seconds, not hours)
Lesson 2Runtime Errors vs Compile-Time Errors
Less upfront work
You only type what the application actively uses
Lesson 1599The Bottom-Up vs Top-Down Decision
Less visual noise
Your code looks closer to regular JavaScript
Lesson 155The Default Rule: Let TypeScript Infer
Leverage type inference
Let TypeScript infer return types and variable types when possible.
Lesson 1745Minimize File-Level Type Dependencies
Libraries and published packages
should *never* rely on automated migration for their public API types.
Lesson 1649When Automation Helps vs Manual Migration
Library boundaries
and exported functions deserve annotations.
Lesson 249Return Type Annotations Best Practices
Library code
where performance affects all consumers
Lesson 1739Use Type Parameters Instead of Lookups
Library Definition Updates
Changes to built-in type definitions (like DOM types) can break code that relied on incorrect shapes.
Lesson 1785Community Feedback and Breaking Changes
Limit recursion depth manually
Add a "depth counter" type parameter to stop after a fixed number of levels
Lesson 1714Recursive Type Aliases and Stack Depth
Limit union size
Keep string literal unions under ~20-30 members when using intrinsics
Lesson 839Performance and Complexity Considerations
Limitation
No type-checking happens during bundling — you must run `tsc --noEmit` separately.
Lesson 1237Bundler Loaders: ts-loader and babel-preset-typescript
Limitations
dts-gen can only see what gets executed.
Lesson 1648Alternative Tools: dts-gen and Others
Limited composition
Nesting these patterns quickly becomes unreadable and fragile.
Lesson 1489TypeScript's Workaround: Interface Pattern
Limited type features
Complex types (the advanced patterns we'll learn later) are awkward or impossible to express
Lesson 26JSDoc Type Annotations in Plain JavaScript
Limiting template literal complexity
in key transformations
Lesson 764Performance Considerations with as
Linked lists
Each node points to the next node (same type)
Lesson 356Recursive Type Aliases
Linters
like ESLint that understand TypeScript syntax
Lesson 1796Long-Term Vision: TypeScript as a Platform
List out each type
separated by `&`
Lesson 438Reading Intersection Error Messages
Literal unions
win when bundle size matters and you don't need runtime features.
Lesson 481Literal Unions vs Enums: Trade-offs
Literal values stay literal
`"admin"` stays `"admin"`, not `string`
Lesson 1417const with Object Parameters
Local installations
combined with **version managers**.
Lesson 47Managing Multiple TypeScript Versions
location
where the constraint is violated (usually a function call or type instantiation)
Lesson 630Error Messages When Constraints Are ViolatedLesson 1535Zod Validators with Hono Middleware
Long `tsc` build times
What used to take 2 seconds now takes 30
Lesson 1477Compile-Time Performance Impact
Long tsc compilation times
even with `--incremental`
Lesson 1448Performance Considerations with Complex infer
Look for the never
When you get cryptic errors assigning values, check if hovering over properties reveals `never` deep in the structure.
Lesson 448Deep Property Conflicts
Looks for type-specific entries
keys like `types` or `import` with TypeScript conditions
Lesson 1116The exports Field for Modern Packages
Lookup approach
Pass the entire person object and extract `person.
Lesson 1739Use Type Parameters Instead of Lookups
Lost context
Developers couldn't understand what data shapes functions expected without reading entire call chains
Lesson 14The Problem TypeScript Set Out to Solve
Lost relationships
Giant unions hide the relationships between values.
Lesson 1651The Readability Problem with Giant Union Types
Low-complexity, repetitive code
also migrates well with automation.
Lesson 1649When Automation Helps vs Manual Migration
Low-risk
DOM queries where element existence is guaranteed
Lesson 1017Measuring Assertion Debt in Your Codebase

M

Mad Libs contracts
"This value must be a string that says ___ followed by a dash, then ___.
Lesson 818What Are Template Literal Types?
Maintain internal consistency
by controlling all writes
Lesson 1041Getters and Setters with Different Access
MAJOR
Represents breaking changes (very rare in TypeScript)
Lesson 1777Understanding TypeScript's Release Cadence
Major version
(5): Breaking changes that might require code updates
Lesson 46TypeScript Version Compatibility
Make function signatures honest
about what they need
Lesson 1339Splitting Types by Context
Make it visible
Post weekly progress updates in team channels
Lesson 1619Tracking Progress and Setting Migration Goals
Make parameters optional
if some overloads don't require them
Lesson 1409Implementation Signature Compatibility
Make strictness opt-in initially
Begin with `strict: false` and gradually enable flags.
Lesson 1632Team Resistance and Adoption Friction
Makes all properties readonly
you can't reassign them
Lesson 471as const on Objects
Makes refactoring safer
change the union in one place
Lesson 353Aliasing Union Types
Making intentions clear
Signals to readers that this import won't affect runtime behavior
Lesson 1109Type-Only Import Best Practices
Manual type duplication
Copy-paste types between projects (maintenance nightmare)
Lesson 1551What tRPC Solves: The Type-Safety Gap
Many unions combined
Consider using plain `string` with runtime validation instead.
Lesson 828Limitations of Template Literals
Map over properties
make each property `readonly`
Lesson 802Building a Deep Readonly with infer
mapped type
is TypeScript's way of creating a new type by transforming each property in an existing type.
Lesson 717What Are Mapped Types?Lesson 853Recursive Path Types for Deep Objects
Mapped type transformations
Results of mapped type operations
Lesson 1704The Type Cache and Memoization
marker type
that doesn't affect the runtime shape of your object, but tells TypeScript what type `this` should have inside methods.
Lesson 1084Basic ThisType<T> SyntaxLesson 1088Limitations of ThisType
Matched by `include` patterns
The file must match your glob patterns (e.
Lesson 1167Placement and Scope of Augmentation Files
Maximum type narrowing
from input values
Lesson 1416const vs Normal Type Parameters
Measure impact
Does your complex type actually prevent bugs, or does it just satisfy perfectionism?
Lesson 1516Prioritize Developer Experience Over Perfect Types
Medium-risk
Third-party library types that could change
Lesson 1017Measuring Assertion Debt in Your Codebase
Memoization
is the pattern of caching a function's results so repeated calls with the same arguments return cached values instead of recomputing.
Lesson 598Generic Cache and MemoizationLesson 1704The Type Cache and Memoization
Memory exhaustion
(TypeScript crashes)
Lesson 1716String Template Literal Type Explosion
Memory pressure
(especially in CI environments)
Lesson 1715Mapped Types Over Large Object Types
Memory usage balloons
over time during a long coding session
Lesson 1752Restart Language Service When Stuck
Merge projects
If they're truly inseparable, combine them into a single project
Lesson 1228Circular References Between Projects
merges
all properties and uses the type from the rightmost spread for any duplicates:
Lesson 331Property Override Order and Type MergingLesson 362Merging Properties in Interfaces
Method doesn't exist
on the current type
Lesson 1081Type Safety Guarantees in Chained Calls
Method shorthand
(`methodName(): ReturnType`) is designed for traditional object methods.
Lesson 293Method Shorthand vs Function PropertiesLesson 343Method Signatures in Interfaces
Method signatures
match (parameters and return types)
Lesson 1044The implements Keyword
Method syntax
is cleaner and matches how you typically write object methods.
Lesson 292Function Properties in Object Types
Methods
Function signatures that return typed values
Lesson 1141Declaring Classes
Mid-level developers
understand constraints and mapped types
Lesson 1690The Readability Trade-off
Mid-migration boundaries
When converting a large codebase from JavaScript, marking areas you'll fix in the next sprint.
Lesson 896When @ts-expect-error Is Preferred
Middle ground
(type guards, assertions, specific types) is like trusted traveler programs: balanced security with reasonable convenience.
Lesson 906Type Safety Trade-offs
Middle layer
(`V extends T[K]`): ensures the value matches that property's type
Lesson 660Constraint Composition in Higher-Order Functions
Migration from JavaScript
Convert files one by one, using `any` for code you haven't typed yet
Lesson 874Gradual Typing Philosophy
Migration path
Converting JavaScript to TypeScript incrementally
Lesson 126Introduction to any: The Opt-Out Type
Migration wiki or doc
tracking which modules are done
Lesson 1601Team Coordination During Migration
Minimal compilation
Flow is primarily a checker, not a full compiler
Lesson 23Flow: Facebook's Type Checker
MINOR
New features, improvements, and non-breaking changes
Lesson 1777Understanding TypeScript's Release Cadence
Minor releases
(the quarterly updates) bring:
Lesson 1777Understanding TypeScript's Release Cadence
Minor version
(3): New features added without breaking existing code
Lesson 46TypeScript Version Compatibility
Missing `@types/` packages
Install `@types/library-name`
Lesson 1123Troubleshooting Common Resolution Errors
Missing `exports` field support
when using modern packages
Lesson 1123Troubleshooting Common Resolution Errors
Missing properties
Forgot to include a required field?
Lesson 8API Contract Enforcement
Mixed-type returns
Functions returning different types based on runtime conditions need union types or overloads
Lesson 1594The .js to .ts Rename Strategy
Mixing unrelated concerns
Users, orders, payments, and inventory are distinct domains.
Lesson 1658The Module Boundary Smell
Modern mode
Assume runtime handles type erasure (fast)
Lesson 1773Impact on the TypeScript Compiler
Modern resolution
Works seamlessly with bundlers and Node.
Lesson 1116The exports Field for Modern Packages
Modern workflows
can leverage **Deno or Bun**, which run TypeScript natively without configuration.
Lesson 75Choosing the Right Execution Method for Your Use Case
Modification is terrifying
changing one character breaks everything in mysterious ways
Lesson 1504Unmaintainable Type Gymnastics
module augmentation
combined with **declaration merging**—you can "reopen" a module and add new properties to its exported interfaces without modifying the original source.
Lesson 1165Adding Properties to Existing InterfacesLesson 1179Avoiding Global Pollution
Module files
Files with at least one import or export.
Lesson 1177Placement and Module Context
Module mode
Declarations must be explicitly imported to be used, just like regular TypeScript files.
Lesson 1158The global Scope in .d.ts Files
Module system preservation
Your `import`/`export` statements remain as-is
Lesson 1232tsc Output: Per-File Transpilation
Module-scoped augmentations
When using `declare module 'some-package'` to add types to a third-party library, add `export {}` to keep those augmentations modular.
Lesson 1159export {} to Force Module Context
modules
you can reopen a module namespace and add or extend types, even for code you imported from elsewhere.
Lesson 364Declaration Merging with ModulesLesson 1169Common Pitfalls in Module Augmentation
More than 2-3 unions
Probably too many combinations to be useful.
Lesson 828Limitations of Template Literals
More verbose code
wrapping and unwrapping values
Lesson 1359Tradeoffs and Ergonomics
Motivation
as teams see progress accumulate
Lesson 1600Tracking Migration Progress
Multi-boolean collapse
Three booleans (`isPending`, `isSaved`, `isFailed`) become one discriminated union with three cases.
Lesson 1346Refactoring Toward Impossible States
Multi-format support
Different files for ESM vs CommonJS without confusion
Lesson 1116The exports Field for Modern Packages
Multiple brands
let you stack these constraints using intersection types.
Lesson 1354Multiple Brands on One Type
Multiple Client Languages
Mobile apps in Swift or Kotlin, Python scripts, or third-party integrations can't use tRPC procedures.
Lesson 1559Trade-offs: When tRPC Fits vs Doesn't
Multiple contracts
that don't fit in a linear inheritance chain
Lesson 1055Combining implements and extends
Multiple focused functions
beat one "does everything" generic.
Lesson 662When Constraint Composition Becomes Overengineering
Multiple functions
Split one complex generic into focused helpers
Lesson 652When Conditional Constraints Become Too Complex
Multiple inference sites
Every `infer` in a complex conditional adds constraint-solving overhead
Lesson 1472Limits of Type-Level Computation
Multiple teams need contracts
Front-end and back-end teams can work in parallel once interfaces are agreed upon
Lesson 1326Type-First vs Code-First Trade-offs
Multiple valid choices exist
No single default makes sense for all use cases
Lesson 570When to Use Defaults vs Required Parameters
Multiple variadic parameters
Functions with three or more rest tuple parameters
Lesson 1718Variadic Tuple Complexity
MutableRefObject
For mutable value containers (writable `.
Lesson 1521Typing useRef for DOM Elements and Mutable Values
mutations
are procedures that modify server state—creating, updating, or deleting data.
Lesson 1544Mutation Procedures with Input TypesLesson 1561What Distinguishes Queries from Mutations

N

name
that object structure so you can reuse it and refer to it clearly.
Lesson 338What Interfaces AreLesson 497Enum Member Name vs Value
Name your constraint types
instead of using inline conditional types
Lesson 650Error Messages from Failed Conditional Constraints
Namespaces
provide a way to group these type definitions under a single top-level name, preventing pollution of the global scope while maintaining compatibility with how the library actually works.
Lesson 1134Namespaces in Declaration FilesLesson 1143Namespaces in DeclarationsLesson 1257Namespace Exports and LimitationsLesson 1769Syntax That Would Be Standardized
narrows
the type of `value` from `unknown` to `string` inside that block.
Lesson 132Narrowing unknown with typeofLesson 199Truthiness Narrowing Basics
Native `tsconfig.json` support
Respects your existing TypeScript configuration
Lesson 71Running TypeScript in Bun
Natural boundaries
Application layers often align with migration phases
Lesson 1599The Bottom-Up vs Top-Down Decision
Need careful error handling
(failed mutations may need rollback)
Lesson 1561What Distinguishes Queries from Mutations
Need documentation
Object types or interfaces are self-documenting.
Lesson 828Limitations of Template Literals
Negation narrowing
works in reverse: when you write `if (!
Lesson 208Negation Narrowing with !
Nested loops
that invoke generic validation or mapping functions
Lesson 1724Excessive Type Instantiation in Loops
Nested mapped types
Each layer multiplies the work the checker must do
Lesson 1472Limits of Type-Level Computation
Nested routers
let you organize procedures into hierarchical namespaces, and TypeScript preserves full type safety through every level.
Lesson 1547Nested Routers and Namespace Types
NestJS
was built with TypeScript from day one.
Lesson 33Backend TypeScript: Node.js and Beyond
Network responses
Data from `fetch()` calls absolutely requires runtime validation.
Lesson 1282When Type Assertions Are Acceptable
Never export
the brand or raw type constructor
Lesson 1352Smart Constructor Pattern
New feature code
Easier to fix before it grows
Lesson 1678Auditing Codebases for any Usage
Nightly builds
(`npm install typescript@next`) contain the absolute latest changes—features that might ship in the next release or might be experimental proofs-of-concept.
Lesson 1780Features in Active Development
No accidental internal leaks
implementation details aren't exposed
Lesson 1251Verifying Library Type Exports
No associated data
You can't attach error messages, progress percentages, or timestamps to specific states
Lesson 1653Discriminated Unions vs Flat String Unions
No bundle size increase
types don't ship to browsers
Lesson 893Performance and Runtime Impact
No configuration required
Works with any TypeScript file immediately
Lesson 71Running TypeScript in Bun
No enforcement
It's still JavaScript—the code runs even with type errors
Lesson 26JSDoc Type Annotations in Plain JavaScript
No implicit unsafety
Operations that TypeScript allows (with warnings) might be completely blocked in Hegel.
Lesson 27Hegel: A Stronger Type System for JavaScript
No imports/exports
→ Script mode → Global scope
Lesson 1158The global Scope in .d.ts Files
No information is lost
Unlike using `any`, the type is preserved exactly
Lesson 609The Identity Function Pattern
No installation needed
No `ts-node`, no `tsx`, no extra packages
Lesson 71Running TypeScript in Bun
No JavaScript is generated
for that `declare const` line.
Lesson 1129The declare Keyword
No modifier at all
*preserves* whatever the original property had
Lesson 752Common Pitfalls with Modifier Syntax
No mutations
once created, data never changes
Lesson 25PureScript and Elm: Pure Functional Alternatives
No null or undefined
these don't exist in the language
Lesson 25PureScript and Elm: Pure Functional Alternatives
No real abstraction
You're manually encoding what the type system should handle natively.
Lesson 1489TypeScript's Workaround: Interface Pattern
No runtime errors
if it compiles, entire categories of bugs are impossible
Lesson 25PureScript and Elm: Pure Functional Alternatives
No runtime lookups
JavaScript doesn't need to find a property on an object.
Lesson 502Performance Benefits of const enums
No safety net
Typos, incorrect function calls, and property access errors only appeared when users triggered specific code paths
Lesson 14The Problem TypeScript Set Out to Solve
No side effects
every function must return predictable results
Lesson 25PureScript and Elm: Pure Functional Alternatives
No structure
Everything is one flat list with no semantic grouping
Lesson 1653Discriminated Unions vs Flat String Unions
No type inference
TypeScript can't infer the HKT interface from actual generic types automatically.
Lesson 1489TypeScript's Workaround: Interface Pattern
Node.js (older versions)
expects CommonJS (`require` and `module.
Lesson 1233Module Format Configuration with tsc
Node.js environment (`NodeJS.Global`)
Lesson 1174Augmenting Built-in Global Interfaces
Nominally
distinct (TypeScript treats it as incompatible with plain strings)
Lesson 1362Simulating Opaque Types with Branding
Non-breaking at call sites
Functions accepting `unknown` still accept any argument, just like `any` did
Lesson 1676Replacing any with unknown for Safe Migration
Non-critical code paths
Logging, UI hints, or optional enhancements where missing a case isn't catastrophic
Lesson 426When Exhaustiveness Isn't Needed
Non-empty collections
`NonEmptyString`, `NonEmptyArray<T>`
Lesson 1353Branding Primitive Types
Non-intrusive
Doesn't affect how JavaScript actually executes
Lesson 1769Syntax That Would Be Standardized
Non-module scripts
get `"use strict";` prepended
Lesson 1187alwaysStrict
Non-relative imports
are everything else:
Lesson 1113Relative vs Non-Relative Imports
Non-TypeScript Consumers
Even JavaScript-only projects miss out on tRPC's benefits.
Lesson 1559Trade-offs: When tRPC Fits vs Doesn't
Not cached
by default (you want fresh data after changes)
Lesson 1561What Distinguishes Queries from Mutations
Not in `node_modules`
Your augmentations live in *your* code, not in the library's folder
Lesson 1167Placement and Scope of Augmentation Files
Null safety
(`strictNullChecks`) prevents null/undefined errors but doesn't help with implicit `any` types.
Lesson 1220Combining Safety Flags for Maximum Protection
Nullable
The property exists but its value is `null`: `{ name: "Alice", age: null }`
Lesson 1289Optional and Nullable Fields
number index signature
(`[key: number]: Type`) is designed for array-like structures where you access values by numeric index, like `items[0]` or `scores[42]`.
Lesson 312String vs Number Index SignaturesLesson 636keyof with Index Signatures
Number of source files
– Every `.
Lesson 1750Project Size Impact on IDE Speed
Nx
, and **pnpm workspaces** all take advantage of TypeScript's project reference system:
Lesson 38Monorepo Tooling and TypeScript

O

Object literals
with precise property types
Lesson 1416const vs Normal Type Parameters
Object transformations
(Partial, Required, Readonly, Pick, Omit, Record)
Lesson 716The Full Standard Library Reference
Object with specific properties
→ `in`
Lesson 220Choosing Between in, instanceof, and typeof
OCaml
, a strongly-typed functional programming language known for having one of the most powerful type systems in existence.
Lesson 24ReasonML and ReScript: OCaml-Based AlternativesLesson 1488Languages That Have HKTs
Onboarding friction
New team members had no way to discover how existing code worked without extensive documentation or asking colleagues
Lesson 14The Problem TypeScript Set Out to Solve
Onboarding takes longer
New developers can't easily understand what data flows through your functions without reading implementation details or documentation (which is often outdated).
Lesson 3The Cost of Dynamic Typing at Scale
Onboarding time explodes
New team members spend days understanding your type utilities instead of building features.
Lesson 1475The Readability Cost of Complex Type-Level Code
One ecosystem, not two
The split between "JavaScript files" and "TypeScript files" would blur
Lesson 1786Long-Term Vision: Types in JavaScript
One-off migration scripts
that run once and are archived
Lesson 1602When to Stop and Ship
Only export
the branded type and the smart constructor function
Lesson 1352Smart Constructor Pattern
Only generate `.d.ts` files
(no JavaScript)
Lesson 1250Combining with Composite Projects
Opaque Type Pattern
takes branding to its ultimate conclusion: instead of just marking a type with a brand, you hide the entire type definition inside a module and only export functions that create and work with it.
Lesson 1355Opaque Type Pattern
OpenAPI → TypeScript
Tools read REST API specs and generate request/response types
Lesson 1514Use Code Generation for Complex Patterns
OpenAPI/REST with Code Generation
involves tools that generate TypeScript clients from OpenAPI specifications.
Lesson 1581The End-to-End Type Safety Landscape
OpenAPI/Swagger
You define APIs in YAML/JSON, then generate client code with tools like `openapi-generator`
Lesson 1555No Code Generation Required
OpenAPI/Swagger code generation
Generate types from API specs (extra build step, spec must stay synchronized)
Lesson 1551What tRPC Solves: The Type-Safety Gap
Opt-In Strictness
Most strictness improvements ship as opt-in flags rather than defaults, giving teams control over when they adopt them.
Lesson 1785Community Feedback and Breaking Changes
Optimize builds
Help bundlers eliminate unused type code
Lesson 1106export type for Type-Only Exports
Optimizing configuration
See if TypeScript is checking unnecessary paths
Lesson 1120Module Resolution Tracing with --traceResolution
Optional `?`
Property type is `string | undefined` — it's *meant* to sometimes be undefined
Lesson 1022Optional Properties in ClassesLesson 1357Flavoring vs Full Branding
Optional additions
Consider also enabling `noUncheckedIndexedAccess` and `exactOptionalPropertyTypes` for even more safety, though these aren't included in the `strict` flag.
Lesson 1208Combining Strictness Options for Maximum Safety
Optional dependency chains
If `connectionId` requires `sessionToken`, don't make both optional—create separate `Connected` and `Disconnected` types.
Lesson 1346Refactoring Toward Impossible States
Optional, not mandatory
Browsers and Node.
Lesson 1786Long-Term Vision: Types in JavaScript
Options
Optional configuration parameters
Lesson 1685Naming Conventions That Clarify
Others
include Parcel (zero-config approach), Vite (uses esbuild under the hood for dev speed), and swc (Rust-based, similar philosophy to esbuild).
Lesson 1234Bundlers: Webpack, Rollup, esbuild, and Others
Otherwise
It returns `T` unchanged
Lesson 974Building NonNullable with never
Outer layer
(`K extends keyof T`): ensures you pick a valid property
Lesson 660Constraint Composition in Higher-Order Functions
Output directories
`dist`, `build`, `out`—these contain compiled JavaScript, not source code you're editing.
Lesson 1751excludeFiles and IDE Performance
Outside the class
Use the class name as a namespace
Lesson 1058Accessing Static Members
Overloaded functions
, **non-function types**, and **`never` types** expose situations where these utilities either produce surprising results or fail to capture the full picture you might expect.
Lesson 708Limitations and Edge Cases
Overloads
are more precise—they let you express relationships between specific input types and their corresponding output types.
Lesson 278Overloads vs Union ParametersLesson 550Generic Functions vs Function OverloadsLesson 1668Overloads vs Generic Union Parameters

P

Parallel arrays
where indices must align (`names: string[]` and `ages: number[]`)
Lesson 1346Refactoring Toward Impossible States
Parallel builds
Independent projects can compile simultaneously
Lesson 1229Monorepo Patterns with References
Parallel compilation
(independent projects build simultaneously)
Lesson 1221What Are Composite Projects?
Parallel processing
Different files can be parsed simultaneously
Lesson 1699TypeScript's Two-Phase Compilation Model
Parameter annotation
`name: string` tells TypeScript this function accepts a string argument.
Lesson 236Function Type Syntax
Parameter approach
Pass the age directly as a separate parameter
Lesson 1739Use Type Parameters Instead of Lookups
Parameter decorators
no longer exist in the standard
Lesson 1784Decorator Standardization Progress
Parameter name
(`value`) must match the function's parameter
Lesson 221What Type Predicates Are
parameter properties
a way to declare properties directly in the constructor by adding an access modifier (`public`, `private`, `protected`) or `readonly` to the parameter:
Lesson 1024Parameter Properties ShorthandLesson 1032public: The Default VisibilityLesson 1769Syntax That Would Be Standardized
Parameter typed as `never`
This means TypeScript expects no valid value can ever be passed.
Lesson 956Creating an assertNever Helper
Parameters need context
beyond their type (valid ranges, special values, format expectations)
Lesson 1684JSDoc Comments for Public APIs
Parse the error output
(TypeScript outputs errors in a structured format)
Lesson 1270Reporting Type Errors in Pull Requests
Parsing
(converting text into syntax trees)
Lesson 1726Reading the Diagnostics Output
Parsing and Binding Phase
TypeScript reads your source files, builds an Abstract Syntax Tree (AST), and establishes what symbols (variables, functions, types) exist and where they're declared.
Lesson 1699TypeScript's Two-Phase Compilation Model
Partial matching by design
You're intentionally filtering or processing only specific union members
Lesson 426When Exhaustiveness Isn't Needed
Pass through argument lists
with full type fidelity
Lesson 1394Variadic Tuples vs Rest Parameters
Patch version
(2): Bug fixes only, no new features
Lesson 46TypeScript Version Compatibility
Pattern match
against `Promise<infer U>` — if `T` is a Promise, capture what it wraps in `U`
Lesson 1447Building Awaited with infer
Performance matters
You want zero runtime overhead and the smallest possible bundle size
Lesson 506When to Use const enums
Performance optimizations
Engine-level improvements for BigInt operations
Lesson 1764Numeric Separators and BigInt Evolution
Performance-critical paths
Sometimes complex conditional types slow down the compiler significantly.
Lesson 1511Accept Some Dynamic Behavior with unknown
Performs an initial build
of your project and all its references
Lesson 1230Watch Mode with Project References
Phase 1
Start with `noImplicitAny` — it catches the most egregious gaps without changing runtime behavior assumptions.
Lesson 1208Combining Strictness Options for Maximum SafetyLesson 1597The Strictness Dial ApproachLesson 1615Setting Up for Incremental Migration
Phase 4
Enable remaining strict flags one by one: `strictFunctionTypes`, `strictBindCallApply`, `strictPropertyInitialization`.
Lesson 1597The Strictness Dial Approach
Phase 5
Finally, replace individual flags with the single `strict: true` setting.
Lesson 1597The Strictness Dial Approach
Pick one primary approach
for object shapes:
Lesson 380Consistency Within a Codebase Matters Most
PlainDate
Just a calendar date (year, month, day)
Lesson 1761Temporal API and Date Type Safety
PlainDateTime
Date + time without time zone context
Lesson 1761Temporal API and Date Type Safety
PlainTime
Just a wall-clock time (hour, minute, second)
Lesson 1761Temporal API and Date Type Safety
Planning data
to estimate remaining effort
Lesson 1600Tracking Migration Progress
Playwright
all support TypeScript out of the box or with minimal configuration.
Lesson 37Testing with TypeScript
Plugin registration systems
, **CSS imports**, **global type augmentations** all need regular imports to execute.
Lesson 1107Type-Only Imports with Side Effects
Polymorphic plugin systems
When third-party code registers handlers or transforms, you often can't know their shapes in advance.
Lesson 1511Accept Some Dynamic Behavior with unknown
Poor discoverability
Finding "what events relate to orders" requires scanning the entire union rather than looking at an `OrderEvents` module.
Lesson 1658The Module Boundary Smell
Poor documentation
The type itself provides little insight into *what* these values mean or *when* they're used.
Lesson 1651The Readability Problem with Giant Union Types
Poor IDE performance
(lag when hovering)
Lesson 1716String Template Literal Type Explosion
Post comments
on specific file lines via the platform's API (GitHub, GitLab, etc.
Lesson 1270Reporting Type Errors in Pull Requests
Practical soundness
It accepts some technically "unsafe" patterns if they're common in JavaScript
Lesson 23Flow: Facebook's Type Checker
Practical synergy
When you use optional chaining (`obj?
Lesson 693NonNullable in Strictness Contexts
Pragmatic deadlines
Ship features now, improve type coverage later
Lesson 874Gradual Typing Philosophy
Precise autocomplete
for allowed values
Lesson 474as const for Configuration Objects
Precompute when possible
Define explicit types instead of computing transformations
Lesson 839Performance and Complexity Considerations
Predictable
The semantics are straightforward
Lesson 1512Keep Types Simple and Composable
Predictable dependencies
Utilities typically have fewer dependencies themselves
Lesson 1599The Bottom-Up vs Top-Down Decision
Prefer named exports
for most TypeScript projects:
Lesson 1092Named exports vs default exports for types
preserve type information
at every level of nesting while maintaining flexibility through generics.
Lesson 655Recursive Constraints for Tree StructuresLesson 1250Combining with Composite Projects
Preserves literal types
`"development"` stays `"development"`, not `string`
Lesson 471as const on Objects
Preserving
means distributing your mapping operation across each union member individually, maintaining the union shape in the output.
Lesson 738Preserving vs Transforming Union Members
Prevent confusion
Avoid ambiguity between type and value exports
Lesson 1106export type for Type-Only Exports
Preventing basic mistakes
(wrong property names, mismatched function arguments)
Lesson 1509Embrace Runtime Checks Over Type Gymnastics
Preventing global leakage
When your `.
Lesson 1159export {} to Force Module Context
Prevents accidental runtime usage
If you try to use a type-only import as a value, TypeScript will immediately error.
Lesson 1095Type-only import syntax with import type
Prevents developer burnout
from endless type errors
Lesson 1597The Strictness Dial Approach
Prevents regressions
from entering your main branch
Lesson 1266Failing CI on Type Errors
Private + readonly
= Internal immutable data that even the class itself shouldn't modify after initialization:
Lesson 1040Combining readonly with Access Modifiers
Private Constructors Pattern
uses TypeScript's `private` access modifier on a class constructor to make it impossible to call `new MyClass()` from outside the class.
Lesson 1364Private Constructors Pattern
Production builds
require `tsc` to compile your TypeScript into JavaScript.
Lesson 75Choosing the Right Execution Method for Your Use Case
Project-Local Declaration Files
Lesson 1130Typing Third-Party Libraries
Project-specific configuration
(`tsconfig.
Lesson 63extends: Sharing Configuration
Promise wrappers
must preserve the resolved value type
Lesson 1663When Generics Are Better: Type Preservation Needed
Promoted to `strict`
In a later major version, it becomes part of the `strict` family
Lesson 1194Future Additions to strict
Proper module structure
exports match your runtime exports
Lesson 1251Verifying Library Type Exports
Properties
Instance variables with their types (including `readonly` if applicable)
Lesson 1141Declaring Classes
Properties become `readonly`
TypeScript infers them as immutable
Lesson 1417const with Object Parameters
Property access
When you access a property on a union, TypeScript computes which members have that property.
Lesson 1708Union and Intersection Expansion
Property keys
Symbols can be object property names without name collisions
Lesson 90The symbol Type
Property syntax
is useful when you need to emphasize that a function is just a value being stored, or when dealing with optional function properties.
Lesson 292Function Properties in Object Types
Property types
match exactly
Lesson 1044The implements Keyword
Props
Component input shapes (especially React)
Lesson 1685Naming Conventions That Clarify
Protected + readonly
= Data accessible to subclasses but frozen for everyone:
Lesson 1040Combining readonly with Access Modifiers
Protection within your domain
(catching `userId`/`productId` swaps)
Lesson 1357Flavoring vs Full Branding
Protects the entire team
from one developer's type shortcuts
Lesson 1266Failing CI on Type Errors
Protocol Buffers → TypeScript
Generate types from `.
Lesson 1514Use Code Generation for Complex Patterns
Prototype manipulation
Heavy use of `this` binding or prototypal inheritance needs careful typing
Lesson 1594The .js to .ts Rename Strategy
Prototypes and experimental code
not yet in production
Lesson 1602When to Stop and Ship
Provide autocomplete
for procedure names and parameters
Lesson 1569How tRPC Propagates Types Across the Network Boundary
Provide concrete types
lock the class to specific types like `string` or `number`
Lesson 556Implementing Generic Interfaces
Provide escape hatches
allow `string` as a fallback type
Lesson 865Practical Limits of Path Type Complexity
Provide TypeScript types
automatically through inference
Lesson 1302io-ts and Codec-Based Inference
Public + readonly
= Externally visible but immutable:
Lesson 1040Combining readonly with Access Modifiers
public API
a promise to other parts of your codebase (or other developers) about what your function accepts and returns.
Lesson 160Inference Across Module BoundariesLesson 279Real-World Overload Examples
Public API boundaries first
exported functions and classes
Lesson 1621Dealing with Implicit any in Legacy Code
Public API Development
When building libraries or APIs that others will consume, type-first design catches contract issues before they reach users.
Lesson 1333When Type-First Design Pays Off
Public API functions
should always have return type annotations.
Lesson 249Return Type Annotations Best Practices
public APIs
(what consumers see), inferred types for **internal validation** (what actually gets checked).
Lesson 1309When to Explicitly Annotate vs Purely InferLesson 1559Trade-offs: When tRPC Fits vs Doesn't
Public APIs are self-documenting
function signatures with annotated parameters and return types clearly communicate intent without reviewers needing to trace through implementation
Lesson 166Balancing Inference and Explicitness in Teams
Public APIs last
(what other teams consume)
Lesson 911Migration Strategy: any to unknown
Public REST APIs
requiring OpenAPI documentation (ts-rest/zodios)
Lesson 1590Hybrid Strategies: Mixing Approaches
Pure inference
means your schema is the single source of truth.
Lesson 1309When to Explicitly Annotate vs Purely Infer
Pure utility functions
that transform data
Lesson 1593Choosing Your First Files
PureScript
has full HKT support similar to Haskell
Lesson 1488Languages That Have HKTs

Q

queries
are procedures that fetch data without changing server state, while **mutations** are procedures that modify server state.
Lesson 1561What Distinguishes Queries from MutationsLesson 1562tRPC query() Method Basics
Query string type
what comes from `req.
Lesson 1531Typing Request Body and Query in Express
Quick prototypes
When you're experimenting to see if an idea works, type definitions slow you down.
Lesson 12When Static Typing Isn't Worth It
Quick prototyping
Testing ideas without compilation delays
Lesson 67tsx: A Faster Alternative to ts-node

R

Re-verify relationships
that were previously certain
Lesson 1723The any Pollution Performance Hit
read
values and use non-mutating methods like `map`, `filter`, and `slice`—these return new arrays without changing the original.
Lesson 306Readonly Arrays and TuplesLesson 1562tRPC query() Method Basics
Readability matters
Code like `Partial<User>` immediately communicates intent.
Lesson 715When to Use vs Custom Mapped TypesLesson 1481Simple Types with Good Tests
Readable
Anyone can understand `User | Admin` or `Loggable & Serializable`
Lesson 1512Keep Types Simple and Composable
readonly array
is an array type that TypeScript treats as *immutable*.
Lesson 108Readonly ArraysLesson 671Readonly with Arrays and Tuples
Reads your project references
from `tsconfig.
Lesson 1224Building with --build Mode
ReasonML
(now evolved into **ReScript**) compiles to JavaScript, just like TypeScript.
Lesson 24ReasonML and ReScript: OCaml-Based Alternatives
Reassigning the whole tuple
(you still can't if it's declared with `const`)
Lesson 122Readonly Tuples
Rebuild incrementally
when source types change
Lesson 1250Combining with Composite Projects
Record utility
says "this object has exactly these known keys, all with the same value type":
Lesson 685Record vs Index Signatures
Recurse
by calling `MyAwaited<U>` — handles nested promises
Lesson 1447Building Awaited with inferLesson 1467Type-Level Accumulators
Recurse on property types
`DeepReadonly<T[K]>` handles nesting
Lesson 802Building a Deep Readonly with infer
recursion
to unwrap nested structures layer by layer until reaching the core type, enabling type-safe operations on arbitrarily nested data.
Lesson 816The Flatten Pattern for Nested TypesLesson 1383Flattening Nested TuplesLesson 1468Type-Level Iteration Over TuplesLesson 1471Type-Level String Manipulation
Recursive mapped types
that traverse object structures multiple levels deep can exponentially increase resolution time.
Lesson 1749Complex Types and Autocomplete Lag
Recursive mapping
If yes, map over all keys with `[K in keyof T]`, make each optional (`?
Lesson 812The DeepPartial Pattern
Recursive tuple operations
Types that reference themselves with accumulating spreads
Lesson 1718Variadic Tuple Complexity
Recursive type aliases
are extremely limited or unsupported in JSDoc.
Lesson 1640JSDoc Limitations vs Native TypeScript
Recursive type definitions
that expand many levels deep
Lesson 1749Complex Types and Autocomplete Lag
Recursive type operations
that call generic utilities repeatedly
Lesson 1724Excessive Type Instantiation in Loops
Recursively generate sub-paths
for nested objects
Lesson 852Constructing Path Unions from Object Keys
Recursively instantiate types
at every level
Lesson 1448Performance Considerations with Complex infer
Red squiggles
appear under type errors in JSDoc-annotated code
Lesson 1642Validating JSDoc Coverage with Tooling
Red squiggles disappear
even though errors clearly exist
Lesson 1752Restart Language Service When Stuck
Reddit's r/typescript
for quick questions
Lesson 39Community Resources and Learning
Reduced bundle size
No enum object means fewer bytes shipped to users.
Lesson 502Performance Benefits of const enums
Reduced context switching
Error location, message, and code are all in one view
Lesson 1270Reporting Type Errors in Pull Requests
Reduced memory allocations
during type instantiation
Lesson 1790Performance and Scalability Focus
Reduced tooling burden
Fewer moving parts means fewer things to break, configure, or understand.
Lesson 1768The Motivation: Types Without Transpilation
Reduces repetition
define once, use everywhere
Lesson 353Aliasing Union Types
Refactoring becomes terrifying
Want to rename a property or change what a function returns?
Lesson 3The Cost of Dynamic Typing at ScaleLesson 1475The Readability Cost of Complex Type- Level Code
Refactoring confidence
When you change a type definition, CI immediately tells you everywhere that breaks across the entire project.
Lesson 1263Why Type-Check in CI
Refactoring friction
Complex types create coupling.
Lesson 1481Simple Types with Good Tests
Refactoring Large Systems
Before restructuring existing code, designing target types first creates a clear roadmap.
Lesson 1333When Type-First Design Pays Off
Refactoring operations
like rename symbol
Lesson 1747Why IDE Performance Matters
Refactoring overhead
changing brands propagates through codebases
Lesson 1359Tradeoffs and Ergonomics
Refactoring safety
Rename a value, and TypeScript finds every usage across your codebase.
Lesson 520Refactoring Safety and Autocomplete
Refactoring tools
like rename symbol
Lesson 36Editor Support and Language Services
Reference TypeScript types
from JavaScript code
Lesson 1595Type-Only Imports for Existing JS
References internal type positions
meaningless to the developer
Lesson 1476Debugging Complex Type Errors
Refine further
based on specific characteristics (via conditional)
Lesson 773Conditional Types with Generic Constraints
Refine types
as understanding deepens
Lesson 1322What Type-Driven Design Means
RefObject
For DOM element references (read-only `.
Lesson 1521Typing useRef for DOM Elements and Mutable Values
RefType
is what the ref points to (usually an `HTMLElement`), and **PropsType** defines the component's props.
Lesson 1527Typing forwardRef for Ref-Forwarding Components
Registry patterns
where the class tracks all instances
Lesson 1056Static Properties Basics
Regular function
Takes values, returns values
Lesson 1485What Are Higher-Kinded Types?
Regular generic type
Takes types, returns types (`Array<number>`)
Lesson 1485What Are Higher-Kinded Types?
Release notes
documenting new features in each version
Lesson 39Community Resources and Learning
Remember maintenance
Code is read far more than it's written.
Lesson 1516Prioritize Developer Experience Over Perfect Types
remembers
what type you passed in and carries it through to the return type.
Lesson 527Introducing Type ParametersLesson 1432The build() Method and Final Type Inference
Reorder overload signatures
Put more specific signatures before general ones
Lesson 1628Function Overload Conflicts
Repeated narrowing
The same variable checked multiple times in different ways
Lesson 1709Control Flow Analysis Overhead
Repeated patterns
indicating the same type being checked many times
Lesson 1729Identifying Hot Types in Traces
Replaced
(`string` instead of `T[K]`)?
Lesson 730Common Mapped Type Patterns
ReqBody
**Request body type** — what comes from `req.
Lesson 1531Typing Request Body and Query in Express
ReqQuery
**Query string type** — what comes from `req.
Lesson 1531Typing Request Body and Query in Express
Request body type
what comes from `req.
Lesson 1531Typing Request Body and Query in Express
Request metadata
Store request IDs, IP addresses, or headers for logging and tracing.
Lesson 1545Context Typing for Procedures
Require descriptions
alongside suppressions
Lesson 901Linting Suppression Comments
Require explicit invocation
(user clicks a button)
Lesson 1561What Distinguishes Queries from Mutations
Requirements are exploratory
You're prototyping or experimenting with an unfamiliar problem space
Lesson 1326Type-First vs Code-First Trade-offs
Requirements are well-understood
You're building a known pattern (like a REST API client) where the shape is clear upfront
Lesson 1326Type-First vs Code-First Trade-offs
Requirements evolve
New features stretch your type assumptions in directions you never anticipated
Lesson 1695Maintainability Over Time
ResBody
Response body type (rarely used directly in request typing)
Lesson 1531Typing Request Body and Query in Express
ReScript
) compiles to JavaScript, just like TypeScript.
Lesson 24ReasonML and ReScript: OCaml-Based Alternatives
Resolve constraints
for each generic type parameter
Lesson 1718Variadic Tuple Complexity
Resolve union distributions
across inferred types
Lesson 1448Performance Considerations with Complex infer
Respects dependencies
, rebuilding downstream projects when upstream ones change
Lesson 1230Watch Mode with Project References
Responsiveness
– How fast your IDE provides autocomplete, diagnostics, and navigation
Lesson 1790Performance and Scalability Focus
REST
, you think in terms of **resources** and **HTTP verbs**.
Lesson 1552RPC vs REST: The Conceptual Shift
Return `any`
You're saying "I don't know what this is, but **I trust you to know better**.
Lesson 909Return Types: When Each Makes Sense
Return `unknown`
You're saying "I don't know what this is, and **you must check before using it**.
Lesson 909Return Types: When Each Makes Sense
Return concrete types
from functions rather than exposing generic internals
Lesson 1482Library Boundaries and Type Complexity
Return result types
when validation failure is a normal flow (bad user input, optional fields)
Lesson 931Error Handling When Validation Fails
Return type `never`
The function never returns normally—it always throws.
Lesson 956Creating an assertNever Helper
Return type annotation
`: string` after the parentheses declares what the function returns.
Lesson 236Function Type Syntax
Return type annotations
`function add(): number`
Lesson 1769Syntax That Would Be Standardized
Return type dependencies
occur when your function's return type changes based on how input type parameters relate to each other.
Lesson 545Return Type Dependencies
Returns
either the branded type or signals failure (via `null`, throwing, or a Result type)
Lesson 1365Combining Validation with Types
Reusable safety
Once typed, many files benefit immediately
Lesson 1599The Bottom-Up vs Top-Down Decision
reverse mapping
(looking up an enum member's name from its value), but literal unions cannot provide this feature because they don't exist at runtime.
Lesson 481Literal Unions vs Enums: Trade-offsLesson 489Reverse Mapping in Numeric EnumsLesson 510String Enums Lack Reverse Mapping
Reversibility
If a migration approach isn't working, you've only invested hours or days, not months.
Lesson 1591The Gradual Migration Philosophy
Risk distribution
Converting thousands of files at once creates a massive changeset where any mistake can break production.
Lesson 1591The Gradual Migration Philosophy
RPC
(Remote Procedure Call), you think in terms of **functions you're calling**.
Lesson 1552RPC vs REST: The Conceptual Shift
Run conditional setup logic
that doesn't fit in a simple assignment
Lesson 1059Static Blocks for Initialization
Runs multiple codemods
(code transformations) in sequence
Lesson 1643What ts-migrate Does
Runs type-checking
without emitting files
Lesson 1265Setting Up GitHub Actions for TypeScript
Runtime checks
Accept looser types and validate at runtime when type gymnastics aren't worth it
Lesson 652When Conditional Constraints Become Too ComplexLesson 662When Constraint Composition Becomes Overengineering
Runtime code
the JavaScript that actually executes in your browser or Node.
Lesson 1463What Is Type-Level Programming?
Runtime confusion
Code checking enum values must handle both numbers and strings, complicating logic.
Lesson 492Heterogeneous Enums (Mixed Types)
Runtime environment extensions
(like custom properties on `window`)
Lesson 1172What Global Augmentation Means
Runtime errors
are like factual mistakes that only become obvious *after* someone reads your essay—by then, it's already published and embarrassing.
Lesson 2Runtime Errors vs Compile-Time Errors
Runtime logic
The function body uses a simple regex replace to substitute parameter values
Lesson 856Building URL Builder Functions
Runtime safety
If somehow a value slips through (maybe due to unsafe casts elsewhere), you get a clear error message instead of silent misbehavior.
Lesson 956Creating an assertNever HelperLesson 1526Typing Context Providers with createContext
Runtime values
in `STATUSES` for iteration or validation.
Lesson 482Extracting Union Members as Values
Rust
is exploring HKTs through Generic Associated Types (GATs)
Lesson 1488Languages That Have HKTs

S

Safe
After exhaustive validation (acceptable)
Lesson 1017Measuring Assertion Debt in Your Codebase
Safe narrowing
Inside the `if`, TypeScript knows `data` is `T`, so the return is type-safe
Lesson 934Generic parseResponse Helper Function
Same property name
across all union members
Lesson 405The Discriminant Property
Script files
Files with no imports or exports.
Lesson 1177Placement and Module Context
Script mode (global)
All declarations are automatically available everywhere without imports.
Lesson 1158The global Scope in .d.ts Files
Scripts and automation
work best with `ts-node` or `tsx`.
Lesson 75Choosing the Right Execution Method for Your Use Case
Scripts and tooling
Build scripts or utilities that aren't part of your application.
Lesson 1751excludeFiles and IDE Performance
Second assertion
(`as Engine`): `unknown` can be asserted to any type
Lesson 995Overriding Incompatible Types
Second assertion (`as TargetType`)
From that blank slate, you assert it's whatever you want
Lesson 994The unknown Middle Step
Second pass
Implementation reveals emails can be optional for guest users:
Lesson 1329Refining Types Through Iteration
Semantic clarity
Your API contract explicitly shows what reads vs.
Lesson 1563tRPC mutation() Method Basics
Senior developers
can read conditional types with `infer`
Lesson 1690The Readability Trade-off
Separate adoption period
Teams can test it independently without enabling all of `strict`
Lesson 1194Future Additions to strict
Separate Repositories
If your frontend and backend live in different repos with separate deployment cycles, sharing the router type becomes complex.
Lesson 1559Trade-offs: When tRPC Fits vs Doesn't
Separate validation
(TypeScript): `tsc --noEmit` — checks types without outputting files
Lesson 1235Type-Checking vs Transpilation Separation
Server receives validated input
with full type information
Lesson 1544Mutation Procedures with Input Types
Server side
You define a procedure with input validation (using Zod or similar) and return a typed value
Lesson 1541tRPC Procedure Basics
Set minimum description lengths
to ensure meaningful explanations
Lesson 901Linting Suppression Comments
Share type definitions
for JavaScript libraries
Lesson 1138Basic Declaration File Structure
Shared type packages
Publish types to npm (versioning complexity, still uses type assertions at runtime boundaries)
Lesson 1551What tRPC Solves: The Type-Safety Gap
Shifts type safety left
by catching errors before code review
Lesson 1266Failing CI on Type Errors
Shipping to npm
→ Union (better interop)
Lesson 524Choosing Between Enums and Unions
Should subclasses access it
→ `protected`
Lesson 1043When to Use Each Access Level
Shows helpful hints
Hover over something to see what type it is and how to use it
Lesson 4Autocomplete and IntelliSense Benefits
Signal intent
Make it obvious that something is purely for types
Lesson 1106export type for Type-Only Exports
Simple primitive types
the "leaf nodes" of your type tree
Lesson 1466Base Cases and Termination Conditions
Simpler constraints
Use basic `extends` checks and handle complexity in the function body
Lesson 652When Conditional Constraints Become Too Complex
Simpler mental model
A union like `"success" | "error" | "pending"` is exactly what it looks like—a choice between strings.
Lesson 515Community Preference for Unions
Simplicity
Just strings or numbers, no special syntax
Lesson 486When to Graduate to Real Enums
Simplified type representations
rather than fully expanded aliases
Lesson 1791Better Error Messages and Developer Experience
Simplify incrementally
Comment out parts of your complex type and add them back one piece at a time until the error appears.
Lesson 1691Debugging Complex Generic Errors
Simplify nested infer
by breaking complex conditionals into smaller, named helper types.
Lesson 1448Performance Considerations with Complex infer
Simplify the recursive case
Avoid combining recursion with complex mapped types or conditional logic
Lesson 1714Recursive Type Aliases and Stack Depth
Single compilation
You're not using `isolatedModules` (or you've enabled `preserveConstEnums` as a workaround)
Lesson 506When to Use const enums
Single point of change
Adding a new payment type requires modifying this central union, creating merge conflicts and forcing recompilation of distant code.
Lesson 1658The Module Boundary Smell
Single-owner types
If you control the entire interface, just define it once completely
Lesson 369When to Leverage Declaration Merging
Size and longevity matter
For a quick prototype or one-off script, plain JavaScript might be faster.
Lesson 30When to Choose TypeScript Over Alternatives
Sketch the ideal usage
in comments or pseudo-code
Lesson 1327Designing Public APIs with Types
Skip functions
preserve callable types unchanged
Lesson 802Building a Deep Readonly with infer
Skips up-to-date projects
entirely
Lesson 1224Building with --build Mode
Slow compilation
(seconds become minutes)
Lesson 1716String Template Literal Type Explosion
Slow editor responsiveness
when hovering over types
Lesson 1448Performance Considerations with Complex infer
Slow IDE responsiveness
when hovering over types
Lesson 839Performance and Complexity Considerations
Slow to compile
The compiler must recursively evaluate complex type expressions, dramatically increasing compilation time
Lesson 1503The Complexity Tax of HKT Simulation
Slow type narrowing
each `typeof`, `in`, or `===` check tests against all members
Lesson 1741Break Large Union Types into Smaller Chunks
Slower to compile
Complex type operations impact TypeScript's performance
Lesson 1483The Principle of Least Type Power
Slowest files
Which source files consumed the most compiler time
Lesson 1730Using @typescript/analyze-trace CLI
Sluggish error checking
red squiggles appearing slowly or disappearing incorrectly
Lesson 1505IDE Performance Degradation
Small codebases
are the obvious candidate.
Lesson 1620When All-at-Once Actually Works
Small to medium codebases
(under 10,000 lines) can benefit from all-at-once conversion.
Lesson 1613The All-at-Once Approach: Risks and RewardsLesson 1649When Automation Helps vs Manual Migration
smart constructor
pattern: make the type impossible to construct directly, and force all creation through a validation function.
Lesson 1344Temporal Constraints in TypesLesson 1363Smart Constructor Functions
Smart Constructor Pattern
solves this: you write a factory function that:
Lesson 1352Smart Constructor Pattern
Smart constructors required
no direct literal assignment
Lesson 1359Tradeoffs and Ergonomics
Smarter symbol table lookups
and module resolution
Lesson 1790Performance and Scalability Focus
Snapshot Testing Type Definitions
Lesson 1321Testing End-to-End Type Safety
Solidifying the type checker
so it could reliably catch null and undefined errors
Lesson 15TypeScript 0.8 Through 1.0
Solo throwaway projects
Building a one-off tool just for yourself that you'll use once?
Lesson 12When Static Typing Isn't Worth It
Solution
Either add the property to your type or use a different type:
Lesson 337Common Spread Pitfalls and SolutionsLesson 543Generic Arrow Functions
Sound typing focus
Flow prioritizes catching *all* type errors (even if it means rejecting valid code)
Lesson 23Flow: Facebook's Type Checker
Soundness
means the type system guarantees your code will never have certain categories of runtime errors.
Lesson 27Hegel: A Stronger Type System for JavaScript
Specific literal types
exact values that signal completion
Lesson 1466Base Cases and Termination Conditions
Specification Alignment
As ECMAScript evolves, TypeScript occasionally adjusts to match JavaScript behavior, even if it breaks existing patterns.
Lesson 1785Community Feedback and Breaking Changes
Split by domain
Separate shared utilities, core business logic, and application layers into distinct projects
Lesson 1753Workspace Recommendations for Speed
Split concerns
One project handles data models, another handles business logic — eliminate back-references
Lesson 1228Circular References Between Projects
Split the function
Sometimes JavaScript functions do too many things; migration is a chance to separate concerns
Lesson 1628Function Overload Conflicts
Stabilizing the compiler
to ensure predictable compile-time error checking
Lesson 15TypeScript 0.8 Through 1.0
Stable union types
The union rarely changes, so the maintenance benefit of exhaustiveness is minimal
Lesson 426When Exhaustiveness Isn't Needed
Stable, battle-tested utilities
that rarely change and work perfectly
Lesson 1602When to Stop and Ship
Stack Overflow
with the `typescript` tag for searchable Q&A
Lesson 39Community Resources and Learning
Stacks multiple failures
when outer types depend on inner inferred types
Lesson 1476Debugging Complex Type Errors
Stage 0 (Strawperson)
An informal idea, just a proposal document
Lesson 1756Stage 0-4 Process and TypeScript Timing
Stage 0-1 (Strawperson/Proposal)
TypeScript rarely touches these.
Lesson 1783ECMAScript Alignment Strategy
Stage 1
of TC39's standardization process.
Lesson 1776Timeline and Current Status
Stage 1 (Proposal)
Problem identified, high-level API sketched
Lesson 1756Stage 0-4 Process and TypeScript Timing
Stage 2
features if they're very stable and highly anticipated (decorators being a famous example).
Lesson 1756Stage 0-4 Process and TypeScript Timing
Stage 4 (Finished)
Tested in browsers, ready for the next ECMAScript release
Lesson 1756Stage 0-4 Process and TypeScript TimingLesson 1783ECMAScript Alignment Strategy
Stakeholder communication
with concrete numbers
Lesson 1600Tracking Migration Progress
Standalone function declarations
Regular function declarations don't receive contextual hints—they exist independently.
Lesson 188Contextual Typing Not Applied Everywhere
Standalone helper modules
with clear inputs/outputs
Lesson 1593Choosing Your First Files
Start minimal
only type the functions you actually use, then expand as needed
Lesson 1147Typing Third-Party Libraries
Start permissive, then tighten
is the key strategy.
Lesson 1596Dealing with Implicit any
State machines
where literal string states matter
Lesson 1421const Type Parameters in Classes
State snapshots
where you want compile-time guarantees nothing mutates
Lesson 813The DeepReadonly Pattern
Static typing
means your code's types are checked *before* the program runs.
Lesson 1What is Static Typing?Lesson 2Runtime Errors vs Compile-Time Errors
Status 200
`{ success: true, data: User }`
Lesson 1277Union Types for Multiple Response Shapes
Status 404
`{ success: false, error: string }`
Lesson 1277Union Types for Multiple Response Shapes
Step 1: allowJs only
TypeScript compiles your `.
Lesson 1612Combining allowJs, checkJs, and Incremental Migration
Strictness Expansion
New flags like `noUncheckedIndexedAccess` are opt-in, but they reveal problems in existing code when enabled.
Lesson 1785Community Feedback and Breaking Changes
String Enums
are *nominal* types at the type level — only actual enum members can be assigned:
Lesson 518Type Safety: Enums vs Unions
string index signature
(`[key: string]: Type`) allows any string key—perfect for objects where you'll use property names like `user.
Lesson 312String vs Number Index SignaturesLesson 636keyof with Index Signatures
string literal union
combines multiple string literals with the `|` operator to define a type that can only be one of those exact strings.
Lesson 479String Literal Unions as Lightweight EnumsLesson 682Record with String Literal KeysLesson 719keyof and Property Iteration
string literal unions
and **enums** let you restrict values to a specific set of options, but they work differently under the hood.
Lesson 481Literal Unions vs Enums: Trade-offsLesson 512Enums Don't Interop WellLesson 726Mapping Over Literal Types
String manipulations
(Uppercase, Lowercase, Capitalize, Uncapitalize)
Lesson 716The Full Standard Library Reference
String template literal types
which are expensive to process
Lesson 1738Cache Expensive Mapped Type Results
String-Literal Unions
are *structural* — any matching string literal works:
Lesson 518Type Safety: Enums vs Unions
Stronger guarantees
The type system catches more errors at compile time
Lesson 24ReasonML and ReScript: OCaml-Based Alternatives
structural
type systems (like TypeScript), types are compatible based on their *shape*, not their name.
Lesson 355Type Aliases Are Not NominalLesson 1486Why TypeScript Lacks True HKTs
Structural flexibility
types describe shapes, not rigid contracts
Lesson 1486Why TypeScript Lacks True HKTs
Structurally
a string (at runtime, it *is* just a string)
Lesson 1362Simulating Opaque Types with Branding
Structure and shape
(objects, arrays, basic unions)
Lesson 1509Embrace Runtime Checks Over Type Gymnastics
Sublime Text
Restart the LSP-typescript plugin through the Command Palette
Lesson 1752Restart Language Service When Stuck
Success case
`{ success: true, data: T }` — the parsed and validated data
Lesson 1294Safe Parsing with .safeParse
Suppressions stand out
in pull requests rather than hiding silently
Lesson 901Linting Suppression Comments

T

Tall stacks
showing deep instantiation chains
Lesson 1729Identifying Hot Types in Traces
Target type
(`string`) is what you're confirming
Lesson 221What Type Predicates Are
TC39
(Technical Committee 39) is the standards body responsible for evolving JavaScript through the ECMAScript specification.
Lesson 1755TC39 and ECMAScript: The FoundationLesson 1756Stage 0-4 Process and TypeScript Timing
Team composition changes
The person who understands your nested `infer` chains leaves; junior developers join
Lesson 1695Maintainability Over Time
Team consistency
Everyone must satisfy the same type rules, regardless of their local setup.
Lesson 1263Why Type-Check in CI
Team Coordination
When multiple developers work on interconnected features, agreed-upon types serve as contracts.
Lesson 1333When Type-First Design Pays Off
Team learning curve
explaining brand symbols to new developers
Lesson 1359Tradeoffs and Ergonomics
Team policy requires consistency
and you have the time to enforce it
Lesson 1602When to Stop and Ship
Team productivity
A six-month freeze where no features ship while you rewrite everything?
Lesson 1591The Gradual Migration Philosophy
Team velocity
developers can keep shipping features while migration happens
Lesson 1612Combining allowJs, checkJs, and Incremental Migration
Team velocity drops
When junior developers fear touching type-heavy modules, or PRs stall on type refinement debates, the safety isn't worth the collaboration cost.
Lesson 1508Diminishing Returns on Type Safety
Teams enforce consistent standards
for when suppressions are acceptable
Lesson 901Linting Suppression Comments
Teams with migration expertise
who've done this before can move quickly and anticipate common pitfalls.
Lesson 1613The All-at-Once Approach: Risks and Rewards
Template literal combinations
Crossing two 10-member string unions creates 100 possibilities
Lesson 1472Limits of Type-Level Computation
Template literal explosions
multiply string combinations geometrically
Lesson 1484Recognizing When You've Gone Too Far
template literals
(backticks), which let you embed expressions inside strings:
Lesson 88The string TypeLesson 848Nested Property Path Generation
Temporal API
is a Stage 3 TC39 proposal that will introduce a suite of *immutable*, strongly-typed objects for working with dates and times.
Lesson 1761Temporal API and Date Type Safety
Temporary third-party type bugs
When a library has incorrect types but you need to ship today.
Lesson 896When @ts-expect-error Is Preferred
Temporary variables
– often can be inferred instead
Lesson 892Migrating from any to unknown
Temporary workarounds
during refactoring
Lesson 894What Are Type Suppression Comments
Terminal 1
Your bundler runs in watch mode (e.
Lesson 1240Running tsc in Parallel with Bundling
Terminal 2
`tsc --noEmit --watch` runs continuously, type-checking without generating files
Lesson 1240Running tsc in Parallel with Bundling
Terminal methods
(execution, retrieval) return actual results and end the chain
Lesson 1078Mixing Chainable and Non-Chainable Methods
Terminate
The base case returns the fully-built accumulator
Lesson 1467Type-Level Accumulators
Test artifacts
`coverage`, `__snapshots__`—type-checking coverage reports is pointless.
Lesson 1751excludeFiles and IDE Performance
Test files
where you're intentionally checking invalid states
Lesson 894What Are Type Suppression CommentsLesson 1593Choosing Your First Files
Test readability
improves by focusing only on what matters
Lesson 1005Mocking and Testing Scenarios
Test setup methods
that run before each test
Lesson 1021Definite Assignment Assertion (!)
Test with assignments
Try assigning a literal object to your intersection type—TypeScript will complain at the exact conflicting property.
Lesson 448Deep Property Conflicts
Testing compile time
with `tsc --diagnostics` on large codebases
Lesson 764Performance Considerations with as
Testing frameworks
that provide type-safe mocking
Lesson 1796Long-Term Vision: TypeScript as a Platform
Testing is impossible
you can only verify types compile, not why they work
Lesson 1480The Maintenance Burden of Clever Types
Testing the waters
Let your team experience TypeScript's safety without file renames
Lesson 1604checkJs: Type-Checking JavaScript Without Conversion
Testing/mocking
Creating fake objects that don't fully implement interfaces
Lesson 995Overriding Incompatible Types
Think of it like
spreading objects is like painting layers on a canvas — later layers completely cover earlier ones, both in value and type.
Lesson 331Property Override Order and Type MergingLesson 1137When You Need a .d.ts File
Third pass
You realize you need to distinguish between guests and registered users:
Lesson 1329Refining Types Through Iteration
Third-party API responses
Even documented APIs can change or return errors in unexpected formats.
Lesson 1282When Type Assertions Are Acceptable
Third-party code integration
is blocking your migration path
Lesson 1004Progressive Migration Scenarios
Third-party code you copied
that has no types available
Lesson 1602When to Stop and Ship
Third-party dependencies
Untyped libraries need `@types` packages or custom declarations
Lesson 1594The .js to .ts Rename Strategy
Third-party integrations
using GraphQL (graphql-codegen)
Lesson 1590Hybrid Strategies: Mixing Approaches
Third-party JavaScript libraries
ship declaration files so TypeScript users get type safety
Lesson 1124What Are Declaration Files (.d.ts)
Third-party libraries
You don't control the source, but need to reference its types
Lesson 707When These Utilities Save RepetitionLesson 936unknown for External Data Entry Points
Third-party library quirks
A library's types say something might be null, but you know it won't be in your usage
Lesson 985Non-Null Assertions with !Lesson 1190The Cost of strict: False Positives
This is frustrating
maybe you're passing through options to an underlying library that *does* use `debug`.
Lesson 329Common Gotchas with Options Objects
This is helpful
you misspelled `retries`!
Lesson 329Common Gotchas with Options Objects
This is wrong
Type assertions are purely a compile-time instruction that tells TypeScript: "Trust me, I know better than you about this value's type.
Lesson 982Assertions Are Not Casts
Throw errors
when invalid data is a bug or truly unexpected
Lesson 931Error Handling When Validation Fails
Time in each phase
Parse time, bind time, check time, emit time
Lesson 1725Using --extendedDiagnostics for Build Metrics
Tiny scripts
A 20-line script that renames files or processes a CSV?
Lesson 12When Static Typing Isn't Worth It
Tooling-friendly
IDEs handle them efficiently
Lesson 1512Keep Types Simple and Composable
Top-down
Begin with entry points or high-level modules and work your way down to dependencies, using type assertions or stubs when reaching unconverted code.
Lesson 1614The File-by-File Incremental Strategy
Top-down inference
(also called **contextual typing**) starts with an expected type based on where a value is being used, then flows that type information downward into the expression.
Lesson 1700Type Inference Flow: Bottom-Up and Top-Down
Top-down migration
means starting with entry points like `main.
Lesson 1599The Bottom-Up vs Top-Down Decision
Top-level exports
Declarations marked with `export` that other files can import
Lesson 1126Structure of a Basic Declaration File
Total compile time
Wall-clock time from start to finish
Lesson 1731The --diagnostics Flag for Quick Summaries
Track element positions
through multiple transformations
Lesson 1718Variadic Tuple Complexity
Track multiple inference sites
and their constraints
Lesson 1448Performance Considerations with Complex infer
Tracking progress isn't optional
it's the difference between a successful migration and an abandoned half-typed codebase.
Lesson 1619Tracking Progress and Setting Migration Goals
Tradeoff
You might miss some type errors if your dependencies have incorrect or conflicting type definitions, but this is rare and the performance gain is almost always worth it.
Lesson 84The --skipLibCheck Flag: Skipping node_modules Types
Transform tuple structures
while maintaining type relationships
Lesson 1394Variadic Tuples vs Rest Parameters
Translation dictionaries
`{ "en": "Hello", "es": "Hola", "fr": "Bonjour" }` — you don't know every language code upfront
Lesson 310What Index Signatures Solve
Transparency
What you see is what you get at runtime
Lesson 486When to Graduate to Real Enums
Transpiling
(removing types and transforming syntax) to JavaScript
Lesson 1773Impact on the TypeScript Compiler
Tree nodes
Each node has child nodes (same type)
Lesson 356Recursive Type Aliases
Tree-shakable by default
Since unions don't generate code, there's nothing to tree-shake.
Lesson 515Community Preference for Unions
Triggers cascading checks
(changing it forces rechecking many dependents)
Lesson 1729Identifying Hot Types in Traces
Triggers on push/PR
to specified branches
Lesson 1265Setting Up GitHub Actions for TypeScript
Truly dynamic values
Rare cases where the type genuinely can't be known
Lesson 126Introduction to any: The Opt-Out Type
Trust
Published libraries are usually already type-checked by their maintainers
Lesson 84The --skipLibCheck Flag: Skipping node_modules Types
Trust your team
Developers understand their domain.
Lesson 1516Prioritize Developer Experience Over Perfect Types
ts-rest
lets you define a REST API contract once, then use it on both client and server with automatic inference—no build step required.
Lesson 1315Type-Safe REST with ts-restLesson 1581The End-to-End Type Safety LandscapeLesson 1584ts-rest: Contract-First REST APIsLesson 1589When to Choose Each Approach
tsc
(the TypeScript compiler) separately, in parallel, *only* for type-checking using the `--noEmit` flag.
Lesson 1241Vite and Modern Bundler WorkflowsLesson 1246When Libraries Need Declaration Files Only
Tuple types
instead of arrays (when order and length matter)
Lesson 1416const vs Normal Type Parameters
Tuples
are for heterogeneous, structured data where:
Lesson 124Tuples vs ArraysLesson 1370Tuple Types vs Array Types
Turborepo
, **Nx**, and **pnpm workspaces** all take advantage of TypeScript's project reference system:
Lesson 38Monorepo Tooling and TypeScript
Twitter/X
where TypeScript team members and community experts share tips
Lesson 39Community Resources and Learning
Type alias declarations
`type ID = string`
Lesson 1769Syntax That Would Be Standardized
type aliases
for derived types, unions, intersections, and complex computed types.
Lesson 368Hybrid Approaches: Interfaces + Type AliasesLesson 1138Basic Declaration File Structure
type annotations
that give you compile-time type checking without converting your `.
Lesson 1635Basic JSDoc Type SyntaxLesson 1766Keeping TypeScript Aligned with JavaScript
Type Annotations Proposal
is a TC39 proposal to add type syntax directly to JavaScript — but with a crucial twist: **JavaScript engines would completely ignore the types at runtime**.
Lesson 1767What the Type Annotations Proposal IsLesson 1771Type Checking Still Requires TypeScriptLesson 1775Challenges and Controversies
Type appears multiple times
DRY principle applies
Lesson 357Type Aliases vs Inline Types
Type Checking Phase
Only after the structure is understood does TypeScript validate that types are used correctly— checking assignments, function calls, property access, and all type relationships.
Lesson 1699TypeScript's Two-Phase Compilation Model
Type checking seems wrong
after major dependency changes
Lesson 1752Restart Language Service When Stuck
Type complexity
intersection types in error messages
Lesson 1359Tradeoffs and Ergonomics
type constructors
types that take other types as parameters:
Lesson 1485What Are Higher-Kinded Types?Lesson 1497Type-Level Apply Functions
Type definition complexity
– Large `.
Lesson 1750Project Size Impact on IDE Speed
Type definitions
Interfaces, type aliases, and other type constructs
Lesson 1126Structure of a Basic Declaration File
Type errors are leaking
from JS files into TS code
Lesson 1602When to Stop and Ship
type guards
come in—they're runtime checks that tell TypeScript "I've verified what this is now, so treat it accordingly.
Lesson 102Type Guards for PrimitivesLesson 811Creating Type Guards as Types
Type has conceptual meaning
"User", "Config", "Response" communicate intent
Lesson 357Type Aliases vs Inline Types
Type identity checks
Whether two types are identical
Lesson 1704The Type Cache and Memoization
Type inference
means TypeScript examines your code and determines what types your variables should have — without you explicitly writing type annotations.
Lesson 141What Is Type Inference?Lesson 1535Zod Validators with Hono MiddlewareLesson 1555No Code Generation RequiredLesson 1634Enabling Type-Checking with checkJs
Type instantiation depth
measures how many nested layers deep the compiler goes when resolving a single generic type.
Lesson 1711Understanding Type Instantiation Depth
Type is complex
Nested objects or unions are easier to understand when named
Lesson 357Type Aliases vs Inline Types
type narrowing
you're proving to TypeScript what the value actually is.
Lesson 132Narrowing unknown with typeofLesson 189What Is Type Narrowing?
type parameters
with template literal types, you can build powerful string transformation utilities that work across different inputs while maintaining full type safety.
Lesson 827Template Literals in Generic TypesLesson 1528Generic Components with Type ParametersLesson 1638Generic Functions with JSDoc @template
Type parameters flow through
Whatever type `T` is at the call site becomes the return type
Lesson 609The Identity Function Pattern
Type predicate parameter
`validator: (value: unknown) => value is T` tells TypeScript "if this returns true, narrow to `T`"
Lesson 934Generic parseResponse Helper Function
Type Predicate Pattern
takes this further by making conditional types return `true` or `false` literal types — essentially creating compile-time boolean checks that TypeScript can reason about.
Lesson 806The Type Predicate Pattern
type predicates
come in—they let you create your own custom type-checking functions that TypeScript understands and trusts.
Lesson 222Basic Type Predicate SyntaxLesson 233Assertion Functions vs Type Predicates
Type providers
solve this by making your schema the single source of truth.
Lesson 1539Type Providers in Fastify for Full Safety
Type safety across packages
No more loose `any` types at package boundaries
Lesson 1229Monorepo Patterns with References
Type safety is local
The constraint doesn't propagate through generic flows
Lesson 1662When Unions Are Better: Known Fixed Options
Type system limitations
Rare cases where correct runtime code can't be expressed in TypeScript's type system
Lesson 995Overriding Incompatible Types
Type system surprises
emerge when implicit behaviors that worked fine in JavaScript suddenly conflict with TypeScript's expectations, and you discover them all at once rather than incrementally.
Lesson 1613The All-at-Once Approach: Risks and Rewards
Type utility modules
Dedicated files containing your complex mapped types, conditional types, and type-level functions
Lesson 1515Separate Business Logic from Type Acrobatics
Type wizards
build recursive type-level utilities
Lesson 1690The Readability Trade-off
Type-checking and declaration generation
(TypeScript's strength)
Lesson 1247Setting emitDeclarationOnly in tsconfig.json
Type-First
You define your interfaces, types, and domain models before writing implementation code.
Lesson 1326Type-First vs Code-First Trade-offs
Type-first annotations
(Approach 2) are useful when you're implementing a specific function signature or want to reuse the type.
Lesson 237Arrow Function Type Annotations
Type-level code
the type system that runs during compilation and then disappears
Lesson 1463What Is Type-Level Programming?
Type-level function application
to unwrap the final result
Lesson 1503The Complexity Tax of HKT Simulation
Type-level programming
means writing logic that exists *only* in the type system.
Lesson 1463What Is Type-Level Programming?
Type-level programming patterns
treating types like functions that compute other types — are essentially off the table.
Lesson 1640JSDoc Limitations vs Native TypeScript
Type-only
Purely for static analysis tools
Lesson 1769Syntax That Would Be Standardized
Type-only imports
solve this by letting you use types for compile-time checking without affecting the runtime JavaScript at all.
Lesson 1595Type-Only Imports for Existing JS
Type-safe data transformations
Lesson 942When NOT to Use unknown
Type-safe event systems
where event names were specific strings
Lesson 1414What const Type Parameters Solve
Type-safe form submission
ensures only valid, correctly-typed data reaches your API
Lesson 1317Type Safety in Form Handling
Type-safe lookups
using config keys
Lesson 474as const for Configuration Objects
Type-safe registries
that remember exact keys
Lesson 1421const Type Parameters in Classes
Typeclasses
Interfaces like `Functor`, `Monad`, and `Applicative` that declare operations generically
Lesson 1502Libraries That Use HKT Simulation: fp-ts
Types → API Contract
Your API handlers use these types for requests and responses
Lesson 1310The End-to-End Type Safety Vision
Types the response
automatically in your client code—no manual typing needed
Lesson 1565Type Inference Across Mutation Procedures
TypeScript Blog
and **@typescript** on social media keeps you informed about new releases and best practices as the language evolves.
Lesson 39Community Resources and Learning
TypeScript changes this
The compiler needs to fully resolve types during compilation.
Lesson 1630Circular Dependencies Breaking
TypeScript compiler (`tsc`)
Handles type extraction → `.
Lesson 1246When Libraries Need Declaration Files Only
TypeScript Compiler's `--noImplicitAny`
Lesson 1678Auditing Codebases for any Usage
TypeScript Discord
and **Reddit's r/typescript** for quick questions
Lesson 39Community Resources and Learning
TypeScript Exercises
, and **type-challenges** on GitHub offer progressively harder problems.
Lesson 39Community Resources and Learning
TypeScript Handbook
at [typescriptlang.
Lesson 39Community Resources and Learning
TypeScript immediately errors
at `assertNever(shape)` because `shape` could now be a triangle, not `never`.
Lesson 424Adding New Union Variants Safely
TypeScript infers types
from that schema automatically
Lesson 1544Mutation Procedures with Input Types
TypeScript Language Service
Your editor's built-in "Add all missing imports" and quick-fix actions can auto-generate basic type stubs
Lesson 1648Alternative Tools: dts-gen and Others
TypeScript Playground
– an in-browser editor where you can write TypeScript and instantly see the compiled JavaScript alongside type errors
Lesson 39Community Resources and Learning
TypeScript the language
becomes less distinct from JavaScript
Lesson 1786Long-Term Vision: Types in JavaScript
TypeScript the tool
becomes *more* essential as the de facto type checker
Lesson 1786Long-Term Vision: Types in JavaScript
TypeScript treats them identically
.
Lesson 391Union Order and Duplicate Types
TypeScript types
compile-time types for your form data
Lesson 1304Typed Form Validation with Inferred Schemas
TypeScript's type system itself
as the transport mechanism.
Lesson 1314tRPC for Zero-Code-Gen Type Safety
TypeStat
Mentioned earlier, focuses on adding type annotations based on usage analysis
Lesson 1648Alternative Tools: dts-gen and Others
TypeWiz
takes a different approach: it instruments your JavaScript code during development, observes actual values passed to functions as you run your application or tests, and then suggests type annotations based on observed usage.
Lesson 1648Alternative Tools: dts-gen and Others
Typing legacy scripts
that use namespaced patterns
Lesson 1143Namespaces in Declarations
Typing third-party globals
that don't have types
Lesson 1156Declaring Global Types and Interfaces
Typos are caught
Invalid keys produce errors immediately
Lesson 317Index Signatures and Record Utility

U

UI components
that don't export types to other components
Lesson 1593Choosing Your First Files
UMD modules
that can be used both globally and as imports
Lesson 1134Namespaces in Declaration Files
Unchecked by default
Files without the Flow comment are ignored entirely
Lesson 23Flow: Facebook's Type Checker
Unclear intent
Mixing types signals unclear design.
Lesson 492Heterogeneous Enums (Mixed Types)
Under 50 files
Manual migration is almost certainly faster and produces better results.
Lesson 1649When Automation Helps vs Manual Migration
Understanding paths mappings
Is your `baseUrl` or `paths` configuration working?
Lesson 1120Module Resolution Tracing with --traceResolution
Undocumented
Error messages become cryptic novels
Lesson 652When Conditional Constraints Become Too Complex
Unforgeable
Unlike string literal brands, you cannot accidentally create matching structures.
Lesson 1351Declaring Brand Symbols
Unification
is the mechanism for making two types "match" by finding substitutions for type parameters.
Lesson 1702Constraint Solving and UnificationLesson 1707Contextual Typing PerformanceLesson 1717The Hidden Cost of Inference
Unify types
Find that `T = string` (widened from literal `"hello"`) and `U = number`
Lesson 1702Constraint Solving and Unification
Union and intersection operators
`string | number`, `A & B`
Lesson 1769Syntax That Would Be Standardized
Union everything together
to create all possible paths
Lesson 852Constructing Path Unions from Object Keys
Union explosion
A type that generates hundreds of union members slows down checking for every variable using that type
Lesson 1472Limits of Type-Level Computation
Union or intersection types
combining multiple shapes
Lesson 1735Prefer Type Aliases Over Complex Inline Types
Union overuse
creates brittleness.
Lesson 1670The Readability Trade-off
Union parameters
are simpler—they say "this parameter can be type A OR type B.
Lesson 278Overloads vs Union ParametersLesson 1665Unions Widen, Generics Narrow
union types
(`string | number`) and alias them with `type`.
Lesson 354Aliasing Intersection TypesLesson 387Unions vs Overloads
Union with undefined
(`age: number | undefined`) means "the key must be present, but can be `undefined`"
Lesson 1205exactOptionalPropertyTypes: Optional vs Undefined
Union/intersection operations
(Exclude, Extract, NonNullable)
Lesson 716The Full Standard Library Reference
unions
for covariant positions (like returns) and **intersections** for contravariant positions (like parameters).
Lesson 800Union Collapse with Multiple infer SitesLesson 801Covariance and Contravariance with inferLesson 1670The Readability Trade-off
Unions (`|`)
make optional properties **more optional**
Lesson 442Intersection vs Union for Optional Properties
Unions are immediately readable
but inflexible.
Lesson 1670The Readability Trade-off
Unions combine multiple possibilities
into a single type.
Lesson 1661The Core Difference: Generics Preserve, Unions Combine
Unique
Every symbol is different from every other symbol
Lesson 90The symbol Type
Unique values
that distinguish each variant
Lesson 405The Discriminant Property
Unmaintainable
Small changes break everything in mysterious ways
Lesson 652When Conditional Constraints Become Too Complex
Unreadable
Even you struggle to understand them a week later
Lesson 652When Conditional Constraints Become Too Complex
Unreadable error messages
(hundreds of string literals)
Lesson 1716String Template Literal Type Explosion
Unrelated optionality
where one field requires another
Lesson 1346Refactoring Toward Impossible States
Unresponsive editor
typing feels laggy, especially in large files
Lesson 1505IDE Performance Degradation
Unteachable
New team members avoid touching your code
Lesson 652When Conditional Constraints Become Too Complex
Update operations
You only want to change a few fields, not replace the whole object
Lesson 664The Partial<T> Utility
Update status checks
with pass/fail and error count
Lesson 1270Reporting Type Errors in Pull Requests
URI Registry Pattern
solves this by using string literal types as unique keys in a global interface.
Lesson 1499The URI Registry Pattern
URIs
String literal types like `'Option'`, `'Either'`, `'Array'`
Lesson 1502Libraries That Use HKT Simulation: fp-ts
Usage examples
showing typical and edge cases
Lesson 1696The Documentation Burden
Usage examples would help
callers understand the common patterns
Lesson 1684JSDoc Comments for Public APIs
Use @types
when available — it's maintained by the community and kept up-to-date
Lesson 1147Typing Third-Party Libraries
Use `excludeFiles` wisely
Don't include test fixtures or build artifacts in your projects
Lesson 1753Workspace Recommendations for Speed
Use `ReactElement` when
You need exactly one React component/element as a child.
Lesson 1519Children Props and ReactNode
Use `ReactNode` when
You want maximum flexibility and don't care about the exact structure of children.
Lesson 1519Children Props and ReactNode
Use an arrow function
(which captures `this` from the surrounding scope):
Lesson 1186noImplicitThis
Use anonymous types
for one-off structures that appear only once, especially simple shapes or quick function parameters.
Lesson 294Anonymous vs Named Object Types
Use arrow functions
(which capture `this` from their surrounding context)
Lesson 1217noImplicitThis: Preventing Untyped this
Use case
When you need to know what context object a function expects.
Lesson 711ThisParameterType<T> and OmitThisParameter<T>
Use community type definitions
from DefinitelyTyped (`@types/*` packages)
Lesson 884any in Third-Party Libraries
Use generics
when the output type depends on the input type in a predictable way (like returning an array of whatever type you passed in)
Lesson 550Generic Functions vs Function OverloadsLesson 1665Unions Widen, Generics Narrow
Use overloads
when you need specific, unrelated type mappings for different cases (like a function that accepts a number and returns a string, or accepts a boolean and returns an array)
Lesson 550Generic Functions vs Function Overloads
Use runtime validation
where compile-time checking becomes too expensive
Lesson 865Practical Limits of Path Type Complexity
Use simpler patterns
when possible—sometimes a mapped type beats recursive `infer`.
Lesson 1448Performance Considerations with Complex infer
Use smaller intersections
Build complex intersections piece by piece to catch conflicts early.
Lesson 448Deep Property Conflicts
Use treeshaking-friendly validators
Modern validators like Zod and ArkType are designed to treeshake unused schema definitions.
Lesson 1297Performance and Bundle Size Considerations
Use type aliases
at module boundaries to flatten complex unions
Lesson 1482Library Boundaries and Type Complexity
Use type tests
Create explicit test types with known inputs to isolate which transformation step breaks.
Lesson 1691Debugging Complex Generic Errors
Use union return types
or a broad return type that covers all cases
Lesson 1409Implementation Signature Compatibility
Use union types
for parameters that vary across overloads
Lesson 1409Implementation Signature Compatibility
Use unions
when your function genuinely needs to handle distinct cases differently and the output type depends on runtime logic.
Lesson 1665Unions Widen, Generics Narrow
User input
– forms, file uploads, clipboard data
Lesson 936unknown for External Data Entry Points
User preferences by ID
`{ "user123": true, "user456": false }` — user IDs are dynamic
Lesson 310What Index Signatures Solve
User-generated content
You cannot predict what users will submit through form fields or file uploads.
Lesson 1511Accept Some Dynamic Behavior with unknown
Using simpler patterns
when possible (Pick/Omit instead of custom remapping)
Lesson 764Performance Considerations with as
Utility functions
they're used everywhere, so typing them helps everything else
Lesson 1621Dealing with Implicit any in Legacy Code

V

Validate
Check that these solutions satisfy all constraints
Lesson 1702Constraint Solving and Unification
Validate each property
with typeof or other guards
Lesson 927Validating Object Shape with Type Predicates
Validate the design
by writing example usage (no implementation yet)
Lesson 1327Designing Public APIs with Types
Validated data
`Email`, `PhoneNumber`, `URL` ensure format checks
Lesson 1353Branding Primitive Types
Validates
it against your business rules
Lesson 1365Combining Validation with Types
Validates your input
matches the Zod schema you defined on the server
Lesson 1565Type Inference Across Mutation Procedures
Validation results
where partial input becomes complete output
Lesson 723Making All Properties Required
Validation rules
runtime checks to ensure data is correct
Lesson 1304Typed Form Validation with Inferred Schemas
value
is the concrete data itself: `42`, `"hello"`, `true`.
Lesson 93Literal Values vs Type NamesLesson 497Enum Member Name vs Value
Variable declarations
specifying what type something is
Lesson 1138Basic Declaration File Structure
Variables injected
via a `<script>` tag before your code runs
Lesson 1150What declare Does: Ambient Declarations
Variables without initialization
are another source: if you declare a variable without assigning a value or providing a type annotation, TypeScript has nothing to work with and defaults to `any`.
Lesson 1672Implicit any from Missing Type Annotations
Variadic tuple syntax
lets you combine fixed tuple elements with variable-length segments using the spread operator (`.
Lesson 1385Basic Variadic Tuple Syntax
Variadic Tuples
made it possible to work with tuple types more flexibly, especially when combining multiple tuples together—like having a more powerful way to describe function argument lists.
Lesson 18TypeScript 4.x: Refinement and PerformanceLesson 1384What Are Variadic Tuples?Lesson 1394Variadic Tuples vs Rest Parameters
Verbose syntax
The comment format is clunky compared to TypeScript's inline types
Lesson 26JSDoc Type Annotations in Plain JavaScript
Verify with `--noEmit`
to ensure type-checking still passes
Lesson 1262Debugging Bundler Type Issues
Vim/Neovim
Restart your LSP client (`:LspRestart` in many setups)
Lesson 1752Restart Language Service When Stuck
Visibility
into what's actually been accomplished
Lesson 1600Tracking Migration Progress
Visual Studio Code (2015)
gave TypeScript an unexpected advantage.
Lesson 20Community Adoption Milestones
Visualize progress
Add a progress bar to your README or CI dashboard
Lesson 1619Tracking Progress and Setting Migration Goals
Vitest
, and **Playwright** all support TypeScript out of the box or with minimal configuration.
Lesson 37Testing with TypeScript

W

Warnings
about when the type doesn't work as expected
Lesson 1696The Documentation Burden
Watches all source files
across the entire project graph
Lesson 1230Watch Mode with Project References
WebSocket/REST Requirements
Teams with established REST conventions, OpenAPI tooling, or WebSocket needs may find tRPC's RPC model doesn't align with their architecture.
Lesson 1559Trade-offs: When tRPC Fits vs Doesn't
WebStorm/IntelliJ
File → Invalidate Caches → Restart
Lesson 1752Restart Language Service When Stuck
Week 1-2
Convert all utility modules (no dependencies on other files)
Lesson 1619Tracking Progress and Setting Migration Goals
Week 3-4
Convert API clients and data models
Lesson 1619Tracking Progress and Setting Migration Goals
Week 5-8
Convert React components, starting with leaf components
Lesson 1619Tracking Progress and Setting Migration Goals
Week 9-12
Convert route handlers and business logic
Lesson 1619Tracking Progress and Setting Migration Goals
What data shapes exist
in your domain (interfaces, type aliases)
Lesson 1322What Type-Driven Design Means
What invariants must hold
(constraints, readonly properties, branded types)
Lesson 1322What Type-Driven Design Means
What JavaScript version
to target (ES5, ES6, etc.
Lesson 49What is tsconfig.json
What operations are allowed
(function signatures with strict parameters)
Lesson 1322What Type-Driven Design Means
What states are possible
(discriminated unions for state machines)
Lesson 1322What Type-Driven Design Means
What TypeScript eliminates
Tests checking "Did I pass 3 arguments when the function expects 2?
Lesson 9The Testing Tradeoff
What you still need
Tests verifying "Does my shopping cart calculate discounts correctly?
Lesson 9The Testing Tradeoff
What's being suppressed
What type error are we ignoring?
Lesson 900Documenting Why You Suppress
What's the failure cost
Financial transactions demand precision
Lesson 1698Finding the Right Abstraction Level
What's the plan
"Will add types after v2 migration"
Lesson 875Documenting Known Type Gaps
What's the resolution path
Will we fix this?
Lesson 900Documenting Why You Suppress
When inference fails
(TypeScript can't figure it out)
Lesson 542Explicit Type Arguments
When to choose
You're maintaining existing code using Yup, or your team already knows it well
Lesson 1295Alternatives: Yup, io-ts, ArkType
When to use global
Great for quick experiments, learning, or using TypeScript's command-line tools (`tsc`) from anywhere.
Lesson 41Installing TypeScript Globally vs Locally
When to use local
This is the **recommended approach** for real projects.
Lesson 41Installing TypeScript Globally vs Locally
Where is this module
(Which directory, which file?
Lesson 1110What Module Resolution Means
Where the mismatch occurred
(in nested or complex types)
Lesson 650Error Messages from Failed Conditional Constraints
Where to output
compiled `.
Lesson 49What is tsconfig.json
Which constraint failed
(the conditional check itself)
Lesson 650Error Messages from Failed Conditional Constraints
Which files
to include or exclude
Lesson 49What is tsconfig.json
Which states exist
(as a union type)
Lesson 595Generic State Machines
Which transitions are valid
(enforced through discriminated unions)
Lesson 595Generic State Machines
Who maintains this
Junior devs benefit from explicit types
Lesson 1698Finding the Right Abstraction Level
Why is this necessary
Is it a library bug?
Lesson 900Documenting Why You Suppress
Why it failed
(the type didn't match the expected shape)
Lesson 650Error Messages from Failed Conditional Constraints
Why it fails
The bundler can't tell if `User` is a type or value without checking `types.
Lesson 1262Debugging Bundler Type Issues
Why it matters here
You can't patch every consumer's codebase when they misuse your API.
Lesson 1478When Type-Level Guarantees Matter Most
Why this happens
TypeScript's type system prioritizes flexibility.
Lesson 119Tuple Length and Array Methods
Why this matters
It prevents callers from passing completely unrelated types when the logic requires them to be compatible.
Lesson 627Constraining One Type Parameter to Another
Wide bars
that dominate the timeline
Lesson 1729Identifying Hot Types in Traces
Widen surrounding types
to accommodate the unknown
Lesson 1723The any Pollution Performance Hit
Widen the implementation signature
Make it accept all possible parameter combinations using unions
Lesson 1628Function Overload Conflicts
Wildcard module declarations
let you tell TypeScript: "When someone imports a file matching this pattern (like `*.
Lesson 1128Wildcard Module DeclarationsLesson 1155Wildcard Module Declarations
With `any`
TypeScript turns off type checking.
Lesson 940unknown vs any in Function Parameters
With `isolatedModules: true`
(used by Babel, esbuild, swc):
Lesson 513The const Enum Escape Hatch Trade-offs
With `unknown`
TypeScript forces you to prove what type the value is before you use it.
Lesson 940unknown vs any in Function Parameters
With enums
, TypeScript reports errors using the enum's name:
Lesson 520Refactoring Safety and Autocomplete
With regular arrays
, TypeScript treats it as spreading an unknown number of elements
Lesson 263Spread Operator in Function Calls
With string-literal unions
, TypeScript shows the actual values:
Lesson 520Refactoring Safety and Autocomplete
With tuples
, each position maps directly to a parameter
Lesson 263Spread Operator in Function Calls
Works with isolatedModules
Build tools like Babel that compile files independently can safely strip type-only imports without analyzing the entire dependency graph.
Lesson 1095Type-only import syntax with import type
Wrap library calls
in strongly-typed functions
Lesson 884any in Third-Party Libraries
Wrapped in a structure
Treat the entire union as one type
Lesson 779What Makes a Conditional Type Distributive
Write the skeleton
Create the function signature matching your type
Lesson 1328Using Types to Drive Implementation
Write your own
for internal libraries, custom tools, or when @types doesn't exist
Lesson 1147Typing Third-Party Libraries
Wrong file extensions
Your import uses `.
Lesson 1123Troubleshooting Common Resolution Errors
Wrong return type usage
If you expect an object but the function returns an array, you'll know before deployment
Lesson 8API Contract Enforcement

Y

Years, not months
Major TC39 proposals typically take 3-7 years from Stage 1 to Stage 4.
Lesson 1776Timeline and Current Status
You can read them
No mystery about what `Partial<User>` does—it iterates over keys and adds `?
Lesson 747Understanding How Built-in Utilities Work
You gain
Better type safety, more specific operations, clearer errors
Lesson 632When Constraints Improve Safety vs Flexibility
You lose
Flexibility to use your generic with broader input types
Lesson 632When Constraints Improve Safety vs Flexibility
You maintain complexity
that adds no business value
Lesson 1510Use Libraries with Good Types Instead of Recreating Them
You need constraints
Type aliases with unions/intersections are more explicit and don't merge unexpectedly
Lesson 369When to Leverage Declaration Merging
You understand limitations
Since they're shallow mappings, they don't transform nested objects
Lesson 747Understanding How Built-in Utilities Work
You'll hit edge cases
you didn't anticipate (variance issues, inference failures, recursive depth limits)
Lesson 1510Use Libraries with Good Types Instead of Recreating Them
You're building library boundaries
where callers shouldn't care about variants they don't use
Lesson 1656When a Single Focused Type Is Better Than a Union
You're building reusable infrastructure
When you find yourself applying the same complex transformation repeatedly, extract it into a named custom mapped type for your codebase.
Lesson 715When to Use vs Custom Mapped Types
You're publishing a library
where users expect full TypeScript support
Lesson 1602When to Stop and ShipLesson 1684JSDoc Comments for Public APIs
You're refactoring existing JavaScript
Gradual migration benefits from incremental type addition
Lesson 1326Type-First vs Code-First Trade-offs
You're simulating higher-kinded types
or building type-level parsers
Lesson 1509Embrace Runtime Checks Over Type Gymnastics
Your editor freezes
when you open TypeScript files
Lesson 1752Restart Language Service When Stuck
Your own compiled TypeScript
can generate declaration files for consumers of your code
Lesson 1124What Are Declaration Files (.d.ts)
Yup
predates Zod and was the go-to validation library for years, especially in React forms with Formik.
Lesson 1295Alternatives: Yup, io-ts, ArkType

Z

zero runtime footprint
perfect for keeping bundles small.
Lesson 519Runtime Behavior DifferencesLesson 1351Declaring Brand Symbols
Zod
is a TypeScript-first schema validation library that lets you declare what your data *should* look like, then automatically validates it and provides full type safety—all in one step.
Lesson 932Integrating Zod for unknown Validation
Zod schema
defining the expected shape
Lesson 1535Zod Validators with Hono Middleware
ZonedDateTime
Date + time *with* a specific time zone
Lesson 1761Temporal API and Date Type Safety