Angular DI system does not respect TypeScript 3.8 type-only imports.
import type { ChangeDetectorRef } from '@angular/core';
...
@Component({
templateUrl: './popup.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class Component implements OnInit {
constructor(
private readonly changeDetectorRef: ChangeDetectorRef // ERROR: Consider changing the type-only import to a regular import, or use the @Inject decorator to specify an injection token
) {}
}
Is there any possibility how to use type-only imports in Angular?