MCPcopy Create free account
hub / github.com/MathMan05/Fermi / constructor

Method constructor

src/webpage/typeChecker/checkers/array.ts:5–12  ·  view source on GitHub ↗
(arr: resolveable | resolveable[])

Source from the content-addressed store, hash-verified

3export class ArrayChecker extends TypeChecker {
4 arr: TypeChecker | TypeChecker[];
5 constructor(arr: resolveable | resolveable[]) {
6 super();
7 if (arr instanceof Array) {
8 this.arr = arr.map((_) => TypeChecker.resolve(_));
9 } else {
10 this.arr = TypeChecker.resolve(arr);
11 }
12 }
13 check(obj: unknown) {
14 if (!(obj instanceof Array)) throw new Error(`${obj} is not of type array`);
15 if (this.arr instanceof Array) {

Callers

nothing calls this directly

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected