Function
isInstanceOf
(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); |
Tested by
no test coverage detected