Add `getPotentialImportsFor` method on template type checker

refactor(compiler): Add `getPotentialImportsFor` method on template type checker (#47631)
Add `getPotentialImportsFor` method on template type checkerrefactoradd getpotentialimportsfor method template type checker

Committed by dylhunn

commit message
refactor(compiler): Add `getPotentialImportsFor` method on template type checker (#47631)

`getPotentialImportsFor` returns an array of possible imports, including TypeScript module specifier and identifier name, for a requested trait in the context of a given component.
 
PR Close #47631

Editor assessment

The `refactor(compiler)` header and scope fit an internal type-checker addition, though one could argue a new public method leans toward `feat`. Style-wise the subject is imperative but capitalized — "Add `getPotentialImportsFor`..." — where lowercase is the usual convention; it also runs near the 72-character ceiling. The body compensates well, precisely describing the contract: it "returns an array of possible imports, including TypeScript module specifier and identifier name". Blank-line structure and the `PR Close` trailer are correct. A small casing fix and a word on motivation would make this exemplary.

Browse categories

More refactor examples · Back to search