summaryrefslogtreecommitdiff
path: root/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util.ts')
-rw-r--r--util.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/util.ts b/util.ts
new file mode 100644
index 000000000..decf4d043
--- /dev/null
+++ b/util.ts
@@ -0,0 +1,6 @@
+
+export function assert(cond: boolean, msg = "assert") {
+ if (!cond) {
+ throw Error(msg);
+ }
+}