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

rokucommunity / brighterscript / #15048

01 Jan 2026 11:17PM UTC coverage: 87.048% (-0.9%) from 87.907%
#15048

push

web-flow
Merge 02ba2bb57 into 2ea4d2108

14498 of 17595 branches covered (82.4%)

Branch coverage included in aggregate %.

192 of 261 new or added lines in 12 files covered. (73.56%)

897 existing lines in 48 files now uncovered.

15248 of 16577 relevant lines covered (91.98%)

24112.76 hits per line

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

80.77
/src/types/FunctionType.ts
1
import { isCallableType, isDynamicType, isFunctionTypeLike, isObjectType } from '../astUtils/reflection';
1✔
2
import { BaseFunctionType } from './BaseFunctionType';
1✔
3
import type { BscType } from './BscType';
4
import { BscTypeKind } from './BscTypeKind';
1✔
5
import { isUnionTypeCompatible } from './helpers';
1✔
6
import { BuiltInInterfaceAdder } from './BuiltInInterfaceAdder';
1✔
7
import type { TypeCompatibilityData } from '../interfaces';
8

9
export class FunctionType extends BaseFunctionType {
1✔
10
    public readonly kind = BscTypeKind.FunctionType;
3✔
11

12
    public static instance = new FunctionType();
1✔
13

14
    public isTypeCompatible(targetType: BscType, data?: TypeCompatibilityData) {
15
        if (
15✔
16
            isDynamicType(targetType) ||
33✔
17
            isCallableType(targetType) ||
18
            isFunctionTypeLike(targetType) ||
19
            isObjectType(targetType) ||
20
            isUnionTypeCompatible(this, targetType, data)
21
        ) {
22
            return true;
14✔
23
        }
24
        return false;
1✔
25
    }
26

27
    public toString() {
28
        return this.toTypeString();
44✔
29

30
    }
31

32
    public toTypeString(): string {
33
        return 'function';
44✔
34
    }
35

36
    isEqual(targetType: BscType) {
UNCOV
37
        if (isFunctionTypeLike(targetType)) {
×
UNCOV
38
            return true;
×
39
        }
UNCOV
40
        return false;
×
41
    }
42
}
43

44
BuiltInInterfaceAdder.primitiveTypeInstanceCache.set('function', FunctionType.instance);
1✔
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