feat(core): missing-injectable migration should migrate empty object literal providers (#33709)
In View Engine, providers which neither used `useValue`, `useClass`, `useFactory` or `useExisting`, were interpreted differently. e.g. ``` {provide: X} -> {provide: X, useValue: undefined}, // this is how it works in View Engine {provide: X} -> {provide: X, useClass: X}, // this is how it works in Ivy ``` The missing-injectable migration should migrate such providers to the explicit `useValue` provider. This ensures that there is no unexpected behavioral change when updating to v9. PR Close #33709
This commit is contained in:

committed by
Alex Rickabaugh

parent
71b8e271b3
commit
15fefdbb8d
@ -160,7 +160,7 @@ export class StaticInterpreter {
|
||||
return array;
|
||||
}
|
||||
|
||||
private visitObjectLiteralExpression(node: ts.ObjectLiteralExpression, context: Context):
|
||||
protected visitObjectLiteralExpression(node: ts.ObjectLiteralExpression, context: Context):
|
||||
ResolvedValue {
|
||||
const map: ResolvedValueMap = new Map<string, ResolvedValue>();
|
||||
for (let i = 0; i < node.properties.length; i++) {
|
||||
|
Reference in New Issue
Block a user