MCPcopy
hub / github.com/angular/angular / isDirectiveDefHack

Function isDirectiveDefHack

packages/core/src/render3/util/discovery_utils.ts:479–485  ·  view source on GitHub ↗

* This function should not exist because it is megamorphic and only mostly correct. * * See call site for more info.

(obj: any)

Source from the content-addressed store, hash-verified

477 * See call site for more info.
478 */
479function isDirectiveDefHack(obj: any): obj is DirectiveDef<any> {
480 return (
481 obj.type !== undefined &&
482 obj.declaredInputs !== undefined &&
483 obj.resolveHostDirectives !== undefined
484 );
485}
486
487/**
488 * Retrieve the component `LView` from component/element.

Callers 1

getInjectionTokensFunction · 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…