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

rokucommunity / brighterscript / #15024

13 Dec 2025 02:11AM UTC coverage: 87.29% (-0.5%) from 87.825%
#15024

push

web-flow
Merge d8dcd8d52 into a65ebfcad

14406 of 17439 branches covered (82.61%)

Branch coverage included in aggregate %.

36 of 36 new or added lines in 4 files covered. (100.0%)

909 existing lines in 49 files now uncovered.

15091 of 16353 relevant lines covered (92.28%)

24217.12 hits per line

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

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

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

18
    public readonly kind = BscTypeKind.InterfaceType;
362,208✔
19

20
    public isTypeCompatible(targetType: BscType, data?: TypeCompatibilityData) {
21
        if (isInvalidType(targetType) ||
100✔
22
            isDynamicType(targetType) ||
23
            isObjectType(targetType) ||
24
            isUnionTypeCompatible(this, targetType, data)) {
25
            return true;
6✔
26
        }
27
        if (isCallFuncableType(targetType)) {
94✔
28
            return this.checkCompatibilityBasedOnMembers(targetType, SymbolTypeFlag.runtime, data) &&
46✔
29
                this.checkCompatibilityBasedOnMembers(targetType, SymbolTypeFlag.runtime, data, this.callFuncMemberTable, targetType.callFuncMemberTable);
30
        }
31

32
        const ancestorTypes = this.getAncestorTypeList();
48✔
33
        if (ancestorTypes?.find(ancestorType => ancestorType.isEqual(targetType))) {
48!
UNCOV
34
            return true;
×
35
        }
36
        return this.checkCompatibilityBasedOnMembers(targetType, SymbolTypeFlag.runtime, data);
48✔
37
    }
38

39
    /**
40
     *  Is this the exact same interface as the target?
41
     */
42
    isEqual(targetType: BscType, data?: TypeCompatibilityData): boolean {
43
        return isInterfaceType(targetType) && super.isEqual(targetType, data);
123✔
44
    }
45
}
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