Clear the cached selector map.
Useful for testing or when project files have changed significantly.
Find a component class name by its selector.
Builds the selector map lazily on first call, then reuses for O(1) lookups.
ts-morph Project
Component selector (e.g., 'app-user-profile')
Class name (e.g., 'UserProfileComponent') or undefined if not found
Get the complete selector map.
Builds the map lazily if not yet built.
ts-morph Project
Map of selector → className
Maps component selectors to class names.
The map is built lazily on first use from the project files (O(n) once, O(1) per lookup) and covers both standard
@Componentdecorators and custom decorators (e.g.@PageComponent).