MCPcopy
hub / github.com/angular/angular / isInstanceOf

Function isInstanceOf

packages/forms/test/form_control_spec.ts:1646–1649  ·  view source on GitHub ↗
(value: Constructor<T>, arg: unknown)

Source from the content-addressed store, hash-verified

1644 type Constructor<T> = Function & {prototype: T};
1645
1646 function isInstanceOf<T>(value: Constructor<T>, arg: unknown): arg is T {
1647 // The implementation does not matter; we want to check whether this guard narrows the type.
1648 return true;
1649 }
1650
1651 // This is a nullable FormControl, and we want isInstanceOf to narrow the type.
1652 const fcOrNull: FormControl | null = new FormControl(42);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…