8467 shaares
203 private links
203 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