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

rokucommunity / brighterscript / #13866

11 Oct 2024 08:19PM UTC coverage: 89.045% (+0.3%) from 88.706%
#13866

push

web-flow
Fix issues with the .gitignore loading for pathFilterer (#1325)

* Fix issues with the .gitignore loading for pathFilterer

* Apply suggestions from code review

---------

Co-authored-by: Christopher Dwyer-Perkins <chris@inverted-solutions.com>

7209 of 8534 branches covered (84.47%)

Branch coverage included in aggregate %.

11 of 11 new or added lines in 2 files covered. (100.0%)

220 existing lines in 20 files now uncovered.

9617 of 10362 relevant lines covered (92.81%)

1781.46 hits per line

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

61.11
/src/types/ArrayType.ts
1
import type { BscType } from './BscType';
2
import { DynamicType } from './DynamicType';
1✔
3

4
export class ArrayType implements BscType {
1✔
5
    constructor(...innerTypes: BscType[]) {
6
        this.innerTypes = innerTypes;
14✔
7
    }
8
    public innerTypes: BscType[] = [];
14✔
9

10
    public isAssignableTo(targetType: BscType) {
11
        if (targetType instanceof DynamicType) {
7✔
12
            return true;
1✔
13
        } else if (!(targetType instanceof ArrayType)) {
6✔
14
            return false;
2✔
15
        }
16
        //this array type is assignable to the target IF
17
        //1. all of the types in this array are present in the target
18
        outer: for (let innerType of this.innerTypes) {
4✔
19
            //find this inner type in the target
20

21
            // eslint-disable-next-line no-unreachable-loop
22
            for (let targetInnerType of targetType.innerTypes) {
2✔
23
                //TODO is this loop correct? It ends after 1 iteration but we might need to do more iterations
24

25
                if (innerType.isAssignableTo(targetInnerType)) {
2✔
26
                    continue outer;
1✔
27
                }
28

29
                //our array contains a type that the target array does not...so these arrays are different
30
                return false;
1✔
31
            }
32
        }
33
        return true;
3✔
34
    }
35

36
    public isConvertibleTo(targetType: BscType) {
37
        return this.isAssignableTo(targetType);
2✔
38
    }
39

40
    public toString() {
41
        return `Array<${this.innerTypes.map((x) => x.toString()).join(' | ')}>`;
2✔
42
    }
43

44
    public toTypeString(): string {
45
        return 'object';
×
46
    }
47

48
    public clone() {
UNCOV
49
        return new ArrayType(...this.innerTypes?.map(x => x?.clone()) ?? []);
×
50
    }
51
}
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