kungfooman / RuntimeTypeInspector.js

Checking JSDoc types at runtime for high-quality types - Trust is good, control is better.
MIT License
8 stars 0 forks source link

Add `validationDivision` errors in UI #148

Closed kungfooman closed 4 months ago

kungfooman commented 4 months ago

Fixes: #147

The division errors in UI looks like this:

image

If there is more context available, we use it:

function test() {
  console.log("ret", 123 / 0);
}
test();

image

The name row doesn't make too much sense - it's an artifact of only checking function arguments from the beginning and a division isn't exactly a function with argument names (I guess we could call it dividor in case of 123 / 0, but we also check for bigint/number incompatibility e.g.)