github
946 of 1273 branches covered (74.31%)
Branch coverage included in aggregate %.
117 of 146 new or added lines in 9 files covered. (80.14%)
24638 existing lines in 277 files now uncovered.31680 of 63169 relevant lines covered (50.15%)
2.0 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
|
} |
× |