mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
caeab598c9
The static `ɵprov` field emitted on `@Injectable()` classes uses `ɵɵInjectableDeclaration<T>`. When a subclass extends a generic `@Injectable()` base class with contravariant parameters (such as callback/transformer methods depending on generic type parameters), TypeScript's static side inheritance check (`typeof Sub extends typeof Super`) fails with `TS2417` because `ɵɵInjectableDeclaration<Sub>` is not assignable to `ɵɵInjectableDeclaration<Super<any>>`. Using `any` (`o.DYNAMIC_TYPE`) in `createInjectableType` avoids strict variance checks on static inheritance for internal Ivy definitions and aligns with other Ivy declaration types.