We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a83ef8d commit 973ac74Copy full SHA for 973ac74
src/base.ts
@@ -1,3 +1,5 @@
1
-export const assert = (condition: boolean, ...infos: any[]) => { if (!condition) throw new Error(...infos) }
+export const assert = (condition: boolean, message: string): asserts condition => {
2
+ if (!condition) throw new Error(message)
3
+}
4
export const toString = Object.prototype.toString
5
export const noop = () => {}
0 commit comments