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

rokucommunity / brighterscript / #14403

14 May 2025 05:45PM UTC coverage: 87.003% (-2.0%) from 89.017%
#14403

push

web-flow
Merge 343773173 into a194c3925

13887 of 16869 branches covered (82.32%)

Branch coverage included in aggregate %.

174 of 191 new or added lines in 11 files covered. (91.1%)

839 existing lines in 51 files now uncovered.

14750 of 16046 relevant lines covered (91.92%)

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

18
    public readonly kind = BscTypeKind.InterfaceType;
343,946✔
19

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