MCPcopy
hub / github.com/angular/angular / ɵɵdefineInjectable

Function ɵɵdefineInjectable

packages/core/src/di/interface/defs.ts:167–178  ·  view source on GitHub ↗
(opts: {
  token: unknown;
  providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null;
  factory: (parent?: Type<any>) => T;
})

Source from the content-addressed store, hash-verified

165 * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
166 */
167export function ɵɵdefineInjectable<T>(opts: {
168 token: unknown;
169 providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null;
170 factory: (parent?: Type<any>) => T;
171}): ɵɵInjectableDeclaration<T> {
172 return {
173 token: opts.token,
174 providedIn: (opts.providedIn as any) || null,
175 factory: opts.factory,
176 value: undefined,
177 };
178}
179
180/**
181 * Construct an `InjectorDef` which configures an injector.

Callers 15

CircularAClass · 0.90
CircularBClass · 0.90
ServiceClass · 0.90
OptionalServiceClass · 0.90
ServiceWithDepClass · 0.90
ServiceWithMultiDepClass · 0.90
ServiceTwoClass · 0.90
DeepServiceClass · 0.90
EagerServiceClass · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…