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

Function assertDirectiveDef

packages/core/src/render3/assert.ts:138–144  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

136 * an interface, so we can't do a direct instanceof check.
137 */
138export function assertDirectiveDef<T>(obj: any): asserts obj is DirectiveDef<T> {
139 if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {
140 throwError(
141 `Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`,
142 );
143 }
144}
145
146export function assertIndexInDeclRange(tView: TView, index: number) {
147 assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);

Callers 1

getNodeInjectableFunction · 0.90

Calls 1

throwErrorFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…