7900 shaares
161 private links
161 private links
export type Result<T, E> = { ok: true, result?: T } | { ok: false, err: E }
Advantages: everything.
Disadvantages: it creates an object for it.
It is a quick way to test it before using a small library https://shaarli.lyokolux.space/?NJ9Efg