github
1710 of 2234 branches covered (76.54%)
Branch coverage included in aggregate %.
94 of 141 new or added lines in 25 files covered. (66.67%)
20319 existing lines in 272 files now uncovered.35902 of 63049 relevant lines covered (56.94%)
11.42 hits per line
1 |
// Check if one JavaScript class inherits from another
|
1✔ |
2 |
export function inheritsFrom<T>(Type: any, ParentType: T): Type is T {
|
|
UNCOV
3
|
while (Type) {
|
× |
UNCOV
4
|
if (Type === ParentType) {
|
× |
UNCOV
5
|
return true; |
× |
UNCOV
6
|
} |
× |
UNCOV
7
|
Type = Object.getPrototypeOf(Type); |
× |
UNCOV
8
|
} |
× |
UNCOV
9
|
return false; |
× |
UNCOV
10
|
} |
× |