MCPcopy
hub / github.com/angular/angular / ServiceWithOptionalDep

Class ServiceWithOptionalDep

packages/core/test/di/r3_injector_spec.ts:81–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 class ServiceWithOptionalDep {
82 constructor(@Optional() readonly service: OptionalService | null) {}
83
84 static ɵprov = ɵɵdefineInjectable({
85 token: ServiceWithOptionalDep,
86 providedIn: null,
87 factory: () =>
88 new ServiceWithOptionalDep(ɵɵinject(OptionalService, InternalInjectFlags.Optional)),
89 });
90 }
91
92 class ServiceWithMissingDep {
93 constructor(readonly service: Service) {}

Callers

nothing calls this directly

Calls 2

ɵɵdefineInjectableFunction · 0.90
ɵɵinjectFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…