panic

Functional way of throwing errors in JS/TS

usage

panic("Oops, something went wrong");
panic(new Error("Unrecoverable error"));