You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like all errors that have to do with incorrect arguments or types being passed to microstar to be caught by type-check. This will make it easier to implement, and developers won't have to track down errors caused by simple typos for hours.
The minimum is to catch errors before they leave microstar. This will greatly help those who are familiar with the microstar source. I've done a tiny bit of this already, in level-librarian:
This will catch incorrectly formatted indexes before they cause a confusing error which may only occur later, on read.
Ideally though, we would catch errors as they go into any microstar module. This means that all arguments of most methods across modules should contain a type-check statement and throw an informative error. This is going to be a lot of repetitive code, but think about it this way- it's really not any worse than writing in a strongly typed language. We'll hold off on this second goal until modules are much more stabilized though.
The text was updated successfully, but these errors were encountered:
I'd like all errors that have to do with incorrect arguments or types being passed to microstar to be caught by type-check. This will make it easier to implement, and developers won't have to track down errors caused by simple typos for hours.
The minimum is to catch errors before they leave microstar. This will greatly help those who are familiar with the microstar source. I've done a tiny bit of this already, in level-librarian:
https://github.com/microstar-db/level-librarian/blob/master/index.js#L117
This will catch incorrectly formatted indexes before they cause a confusing error which may only occur later, on read.
Ideally though, we would catch errors as they go into any microstar module. This means that all arguments of most methods across modules should contain a type-check statement and throw an informative error. This is going to be a lot of repetitive code, but think about it this way- it's really not any worse than writing in a strongly typed language. We'll hold off on this second goal until modules are much more stabilized though.
The text was updated successfully, but these errors were encountered: