A DI parameter typed by a type-only import (import type { X } or import { type X }) is promoted to a value import and used as a runtime token.
Repro
import { Component } from '@angular/core';
import type { MyService } from './my-service';
@Component({ selector: 'x', template: '' })
export class X { constructor(private svc: MyService) {} }
Actual
OXC injects import * as i1 from './my-service' and emits ɵɵdirectiveInject(i1.MyService).
Expected
A type-only import is erased and cannot be a value. Angular emits ɵɵinvalidFactory() (ValueUnavailableKind.TYPE_ONLY_IMPORT).
Impact
Breaks verbatimModuleSyntax/isolatedModules; runtime crash if the import is genuinely type-only (interface / export type).
Researched and drafted with Claude Code.
A DI parameter typed by a type-only import (
import type { X }orimport { type X }) is promoted to a value import and used as a runtime token.Repro
Actual
OXC injects
import * as i1 from './my-service'and emitsɵɵdirectiveInject(i1.MyService).Expected
A type-only import is erased and cannot be a value. Angular emits
ɵɵinvalidFactory()(ValueUnavailableKind.TYPE_ONLY_IMPORT).Impact
Breaks
verbatimModuleSyntax/isolatedModules; runtime crash if the import is genuinely type-only (interface /export type).Researched and drafted with Claude Code.