refactor(compiler): rework and expose APIs to be used in schematics#48730
refactor(compiler): rework and expose APIs to be used in schematics#48730crisbeto wants to merge 3 commits intoangular:mainfrom
Conversation
ca7d7f6 to
effa7a7
Compare
|
Thanks, reviewing this today. |
There was a problem hiding this comment.
Creating a new reference to perform the lookup works fine for locally declared ngModules, but may not work for ngModules coming from external dts file (i.e. anything not in the current compilation unit). This also applies to the other get*Metadata methods. I'm not sure if this matters to you -- for more details, look in the dts metadata reader.
There was a problem hiding this comment.
It doesn't really matter for my case. FWIW, I was following what we were doing in getDirectiveMetadata which has been there for a while.
Reworks some of the existing compiler APIs to make them easier to use in a schematic and exposes a few new ones to surface information we already had. High-level list of changes: * `getPotentialImportsFor` now requires a class reference, instead of a `PotentialDirective | PotentialPipe`. * New `getNgModuleMetadata` method has been added to the type checker. * New `getPipeMetadata` method has been added to the type checker. * New `getUsedDirectives` method has been added to the type checker. * New `getUsedPipes` method has been added to the type checker. * The `decorator` property was exposed on the `TypeCheckableDirectiveMeta`. The property was already present at runtime, but it wasn't specified on the interface.
effa7a7 to
470b2c5
Compare
|
Caretaker note: the presubmit passed after a re-run (see http://test/OCL:501899200:BASE:501909214:1673640872156:74595b02). I'm not sure why the status is set to unknown. |
|
This PR was merged into the repository by commit 6beff5e. |
…ngular#48730) Reworks some of the existing compiler APIs to make them easier to use in a schematic and exposes a few new ones to surface information we already had. High-level list of changes: * `getPotentialImportsFor` now requires a class reference, instead of a `PotentialDirective | PotentialPipe`. * New `getNgModuleMetadata` method has been added to the type checker. * New `getPipeMetadata` method has been added to the type checker. * New `getUsedDirectives` method has been added to the type checker. * New `getUsedPipes` method has been added to the type checker. * The `decorator` property was exposed on the `TypeCheckableDirectiveMeta`. The property was already present at runtime, but it wasn't specified on the interface. PR Close angular#48730
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Reworks some of the existing compiler APIs to make them easier to use in a schematic and exposes a few new ones to surface information we already had. High-level list of changes:
getPotentialImportsFornow requires a class reference, instead of aPotentialDirective | PotentialPipe.getNgModuleMetadatamethod has been added to the type checker.getPipeMetadatamethod has been added to the type checker.getUsedDirectivesmethod has been added to the type checker.getUsedPipesmethod has been added to the type checker.decoratorproperty was exposed on theTypeCheckableDirectiveMeta. The property was already present at runtime, but it wasn't specified on the interface.