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

rokucommunity / brighterscript / #14302

24 Apr 2025 06:12PM UTC coverage: 87.099% (-1.9%) from 89.017%
#14302

push

web-flow
Merge 9f25468b6 into a742ceae5

13489 of 16372 branches covered (82.39%)

Branch coverage included in aggregate %.

8031 of 8709 new or added lines in 103 files covered. (92.21%)

85 existing lines in 22 files now uncovered.

14462 of 15719 relevant lines covered (92.0%)

19990.85 hits per line

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

95.45
/src/types/DynamicType.ts
1
import type { GetTypeOptions, TypeCompatibilityData } from '../interfaces';
2
import { isDynamicType, isUninitializedType, isVoidType } from '../astUtils/reflection';
1✔
3
import { BscType } from './BscType';
1✔
4
import { BscTypeKind } from './BscTypeKind';
1✔
5
import { BuiltInInterfaceAdder } from './BuiltInInterfaceAdder';
1✔
6

7
export class DynamicType extends BscType {
1✔
8

9
    public readonly kind = BscTypeKind.DynamicType;
29✔
10

11
    public static readonly instance = new DynamicType();
1✔
12

13
    public isBuiltIn = true;
29✔
14

15
    get returnType() {
16
        return DynamicType.instance;
518✔
17
    }
18

19
    public isAssignableTo(targetType: BscType) {
20
        //everything can be dynamic, so as long as a type is provided, this is true
UNCOV
21
        return !!targetType;
×
22
    }
23

24
    /**
25
     * The dynamic type is convertible to everything.
26
     */
27
    public isTypeCompatible(targetType: BscType, data?: TypeCompatibilityData) {
28
        //everything can be dynamic, so as long as a type is provided, this is true
29
        if (isVoidType(targetType) || isUninitializedType(targetType)) {
4,010✔
30
            return false;
1✔
31
        }
32
        return !!targetType;
4,009✔
33
    }
34

35
    public toString() {
36
        return 'dynamic';
5,414✔
37
    }
38

39
    public toTypeString(): string {
40
        return this.toString();
4✔
41
    }
42

43
    public isEqual(targetType: BscType) {
44
        return isDynamicType(targetType);
51✔
45
    }
46

47
    getMemberType(memberName: string, options: GetTypeOptions) {
48
        return DynamicType.instance;
655✔
49
    }
50

51

52
}
53

54
BuiltInInterfaceAdder.primitiveTypeInstanceCache.set('dynamic', DynamicType.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