fix(core): renderer-to-renderer2 migration not migrating methods (#33571)
The `renderer-to-renderer2` migration currently does not work properly in v9 because the migration relies on the type checker for detecting references to `Renderer` from `@angular/core`. This is contradictory since the `Renderer` is no longer exported in v9 `@angular/core`. In order to make sure that the migration still works in v9, and that we can rely on the type checker for the best possible detection, we take advantage of module augmentation and in-memory add the `Renderer` export to the `@angular/core` module. PR Close #33571
This commit is contained in:

committed by
atscott

parent
974005b064
commit
d751ca7596
@ -35,7 +35,6 @@ describe('Renderer to Renderer2 migration', () => {
|
||||
}));
|
||||
// We need to declare the Angular symbols we're testing for, otherwise type checking won't work.
|
||||
writeFile('/node_modules/@angular/core/index.d.ts', `
|
||||
export declare abstract class Renderer {}
|
||||
export declare function forwardRef(fn: () => any): any {}
|
||||
`);
|
||||
|
||||
|
Reference in New Issue
Block a user