• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rokucommunity / brighterscript / #13677

03 Feb 2025 03:04PM UTC coverage: 86.757% (-1.4%) from 88.185%
#13677

push

web-flow
Merge 142d6f80c into 4afb6f658

12464 of 15187 branches covered (82.07%)

Branch coverage included in aggregate %.

7747 of 8404 new or added lines in 101 files covered. (92.18%)

85 existing lines in 17 files now uncovered.

13394 of 14618 relevant lines covered (91.63%)

34277.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.43
/src/types/InterfaceType.ts
1
import type { TypeCompatibilityData } from '../interfaces';
2
import { SymbolTypeFlag } from '../SymbolTypeFlag';
1✔
3
import { isDynamicType, isInterfaceType, isInvalidType, isObjectType } from '../astUtils/reflection';
1✔
4
import type { BscType } from './BscType';
5
import { BscTypeKind } from './BscTypeKind';
1✔
6
import { InheritableType } from './InheritableType';
1✔
7
import { isUnionTypeCompatible } from './helpers';
1✔
8
import type { ReferenceType } from './ReferenceType';
9

10
export class InterfaceType extends InheritableType {
1✔
11
    public constructor(
12
        public name: string,
320,164✔
13
        public readonly superInterface?: InterfaceType | ReferenceType
320,164✔
14
    ) {
15
        super(name, superInterface);
320,164✔
16
    }
17

18
    public readonly kind = BscTypeKind.InterfaceType;
320,164✔
19

20
    public isTypeCompatible(targetType: BscType, data?: TypeCompatibilityData) {
21
        if (isInvalidType(targetType) ||
85✔
22
            isDynamicType(targetType) ||
23
            isObjectType(targetType) ||
24
            isUnionTypeCompatible(this, targetType, data)) {
25
            return true;
5✔
26
        }
27
        if (isInterfaceType(targetType)) {
80✔
28
            return this.checkCompatibilityBasedOnMembers(targetType, SymbolTypeFlag.runtime, data);
42✔
29
        }
30
        const ancestorTypes = this.getAncestorTypeList();
38✔
31
        if (ancestorTypes?.find(ancestorType => ancestorType.isEqual(targetType))) {
38!
NEW
32
            return true;
×
33
        }
34
        return this.checkCompatibilityBasedOnMembers(targetType, SymbolTypeFlag.runtime, data);
38✔
35
    }
36

37
    /**
38
     *  Is this the exact same interface as the target?
39
     */
40
    isEqual(targetType: BscType, data?: TypeCompatibilityData): boolean {
41
        return isInterfaceType(targetType) && super.isEqual(targetType, data);
66✔
42
    }
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc