• 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

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;
8,980✔
18
    }
19

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

22
    public toString() {
23
        return 'object';
2,853✔
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