
import { int32 } from "./Int32.ts";
import { MutableArray } from "./Util.ts";

export function Helpers_allocateArrayFromCons<T>(cons: any, len: int32): MutableArray<T> {
    if (cons == null) {
        return new Array(len);
    }
    else {
        const cons_1: any = cons;
        if ((typeof cons_1) === "function") {
            return new cons_1(len);
        }
        else {
            return new Array(len);
        }
    }
}

