github
1052 of 1431 branches covered (73.52%)
Branch coverage included in aggregate %.
13 of 14 new or added lines in 3 files covered. (92.86%)
24126 existing lines in 274 files now uncovered.30956 of 59925 relevant lines covered (51.66%)
2.22 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
|
} |
× |