import { Context } from "../context/context"; import notyf from "./Notyf"; export default class Util { public static range(size: number) { var ans: number[] = []; for (let i = 0; i < size; i++) { ans.push(i); } return ans; } public static checkConnectionAndMaybeAlert(context: Context): boolean { if (context.rtmt.connectionState !== "connected") { notyf.error(context.texts.ConnectionLost); return true; } return false; } }