Angular Modernizer
    Preparing search index...

    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 @Component decorators and custom decorators (e.g. @PageComponent).

    Index

    Constructors

    Methods

    • Clear the cached selector map.

      Useful for testing or when project files have changed significantly.

      Returns void

    • Find a component class name by its selector.

      Builds the selector map lazily on first call, then reuses for O(1) lookups.

      Parameters

      • project: Project

        ts-morph Project

      • selector: string

        Component selector (e.g., 'app-user-profile')

      Returns string | undefined

      Class name (e.g., 'UserProfileComponent') or undefined if not found

    • Get the complete selector map.

      Builds the map lazily if not yet built.

      Parameters

      • project: Project

        ts-morph Project

      Returns Map<string, string>

      Map of selector → className