MCPcopy Index your code
hub / github.com/angular/angular / getOwnDefinition

Function getOwnDefinition

packages/core/src/di/interface/defs.ts:219–222  ·  view source on GitHub ↗

* Return definition only if it is defined directly on `type` and is not inherited from a base * class of `type`.

(type: any, field: string)

Source from the content-addressed store, hash-verified

217 * class of `type`.
218 */
219function getOwnDefinition<T>(type: any, field: string): ɵɵInjectableDeclaration<T> | null {
220 // if the ɵprov prop exist but is undefined we still want to return null
221 return (type.hasOwnProperty(field) && type[field]) || null;
222}
223
224/**
225 * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.

Callers 1

getInjectableDefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…