github
1903 of 2546 branches covered (74.74%)
Branch coverage included in aggregate %.
775 of 823 new or added lines in 10 files covered. (94.17%)
17884 existing lines in 262 files now uncovered.37927 of 62547 relevant lines covered (60.64%)
158.97 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
|
} |
× |