How-to guides
This section contains task-oriented guides that show how to achieve specific goals. Use these when you know what you want to do and need to find out how.
By task
These guides cover MetadataCollection operations:
Traversing and configuring
Helper functions
All guides
Querying metadata
Find, get, and count metadata items by type using MetadataCollection 's query methods.
Filtering metadata
Filter collections using predicates, type constraints, and runtime-checkable protocols.
Transforming metadata
Combine, sort, deduplicate, and transform metadata collections.
Metadata recipes
Real-world patterns for validation extraction, documentation generation, and troubleshooting.
Walking the type graph
Traverse the type graph recursively using the children() method to process nested types.
Filtering with walk()
Filter type graphs using walk() with built-in type guards, custom TypeIs predicates, and depth limits.
Configuration options
Customize inspection behavior with InspectConfig , forward reference modes, and cache management.
Common helper functions
Use built-in helpers for optional types, union extraction, and class detection.
Working with unions
Detect unions, extract members, handle optionals, build dispatch logic, and control normalization.