assert
assert copied to clipboard
separate exceptions in assert methods
E.g. the following code would report a type error:
static assert(obj) {
assert(obj).is(assert.structureOf({
createRootView: Function
}));
}
The real problem was the typo: It needs to be assert.structure instead of assert.structureOf. However, the error that assert generated was misleading.