• 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

94.44
/src/types/ObjectType.ts
1
import { SymbolTypeFlag } from '../SymbolTypeFlag';
1✔
2
import { isObjectType } from '../astUtils/reflection';
1✔
3
import type { GetTypeOptions, TypeCompatibilityData } from '../interfaces';
4
import { BscType } from './BscType';
1✔
5
import { BscTypeKind } from './BscTypeKind';
1✔
6
import { BuiltInInterfaceAdder } from './BuiltInInterfaceAdder';
1✔
7
import { DynamicType } from './DynamicType';
1✔
8

9
export class ObjectType extends BscType {
1✔
10

11
    public readonly kind = BscTypeKind.ObjectType;
8✔
12

13
    public isBuiltIn = true;
8✔
14

15
    public isTypeCompatible(targetType: BscType, data?: TypeCompatibilityData) {
16
        //Brightscript allows anything passed "as object", so as long as a type is provided, this is true
17
        return !!targetType;
9,376✔
18
    }
19

20
    public static instance = new ObjectType();
1✔
21

22
    public toString() {
23
        return 'object';
2,741✔
24
    }
25

26
    public toTypeString(): string {
UNCOV
27
        return this.toString();
×
28
    }
29

30
    getMemberType(name: string, options: GetTypeOptions) {
31
        // TODO: How should we handle accessing properties of an object?
32
        // For example, we could add fields as properties to m.top, but there could be other members added programmatically
33
        return DynamicType.instance;
19✔
34
    }
35

36
    isEqual(otherType: BscType) {
37
        return isObjectType(otherType) && this.checkCompatibilityBasedOnMembers(otherType, SymbolTypeFlag.runtime);
8✔
38
    }
39
}
40

41

42
BuiltInInterfaceAdder.primitiveTypeInstanceCache.set('object', ObjectType.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