MCPcopy Create free account
hub / github.com/angular/angular / isDirectiveDefHack

Function isDirectiveDefHack

packages/core/src/render3/util/discovery_utils.ts:482–488  ·  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

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

Callers 1

getInjectionTokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected