Z-Js-Framework/z-js

Error handling in Z.js, alternative to try{}catch(){} block

Bona96 opened this issue · 1 comments

Borrowing from the idea of unwrap in jquery, and an infamous idea of using an assignment operator ie

const [error, data] ?= await doSomething();

i suggest we use this concept in z.js, introduce that assignment operator inform of a helper function or use a transpiler like for typescript. As we await the TC39 update on this in ECMA, which might never happen but fingers crossed.

This will create easy to read and organized code.

👌 wow