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

rokucommunity / brighterscript / #13590

13 Jan 2025 02:40PM UTC coverage: 86.911% (-1.3%) from 88.185%
#13590

push

web-flow
Merge 38702985d into 9d6ef67ba

12071 of 14663 branches covered (82.32%)

Branch coverage included in aggregate %.

90 of 94 new or added lines in 11 files covered. (95.74%)

796 existing lines in 47 files now uncovered.

13048 of 14239 relevant lines covered (91.64%)

31886.92 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,
315,012✔
13
        public readonly superInterface?: InterfaceType | ReferenceType
315,012✔
14
    ) {
15
        super(name, superInterface);
315,012✔
16
    }
17

18
    public readonly kind = BscTypeKind.InterfaceType;
315,012✔
19

20
    public isTypeCompatible(targetType: BscType, data?: TypeCompatibilityData) {
21
        if (isInvalidType(targetType) ||
81✔
22
            isDynamicType(targetType) ||
23
            isObjectType(targetType) ||
24
            isUnionTypeCompatible(this, targetType, data)) {
25
            return true;
5✔
26
        }
27
        if (isInterfaceType(targetType)) {
76✔
28
            return this.checkCompatibilityBasedOnMembers(targetType, SymbolTypeFlag.runtime, data);
41✔
29
        }
30
        const ancestorTypes = this.getAncestorTypeList();
35✔
31
        if (ancestorTypes?.find(ancestorType => ancestorType.isEqual(targetType))) {
35!
UNCOV
32
            return true;
×
33
        }
34
        return this.checkCompatibilityBasedOnMembers(targetType, SymbolTypeFlag.runtime, data);
35✔
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);
29✔
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