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

rokucommunity / brighterscript / #13978

10 Mar 2025 01:00PM UTC coverage: 86.759% (-2.4%) from 89.113%
#13978

push

web-flow
Merge 96004e807 into 700183e7d

12688 of 15459 branches covered (82.08%)

Branch coverage included in aggregate %.

28 of 28 new or added lines in 1 file covered. (100.0%)

924 existing lines in 53 files now uncovered.

13614 of 14857 relevant lines covered (91.63%)

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

18
    public readonly kind = BscTypeKind.InterfaceType;
322,218✔
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