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

rokucommunity / brighterscript / #14044

20 Mar 2025 07:09PM UTC coverage: 87.163% (-2.0%) from 89.117%
#14044

push

web-flow
Merge e33b1f944 into 0eceb0830

13257 of 16072 branches covered (82.49%)

Branch coverage included in aggregate %.

1163 of 1279 new or added lines in 24 files covered. (90.93%)

802 existing lines in 52 files now uncovered.

14323 of 15570 relevant lines covered (91.99%)

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

18
    public readonly kind = BscTypeKind.InterfaceType;
331,281✔
19

20
    public isTypeCompatible(targetType: BscType, data?: TypeCompatibilityData) {
21
        if (isInvalidType(targetType) ||
87✔
22
            isDynamicType(targetType) ||
23
            isObjectType(targetType) ||
24
            isUnionTypeCompatible(this, targetType, data)) {
25
            return true;
5✔
26
        }
27
        if (isInterfaceType(targetType)) {
82✔
28
            return this.checkCompatibilityBasedOnMembers(targetType, SymbolTypeFlag.runtime, data);
42✔
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);
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