/** * A terrible function which ascertains the depth of a certain array * Depending on the optimization level, this can be essentially nop * @returns depth of array */ // @ts-ignore: Decorator export function getArrayDepth(depth: i32 = 1): i32 { if (!isArray()) { return 0; } else if (isArray>()) { depth++; return getArrayDepth>(depth); } else { return depth; } }