very huge typescript question
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
Ok and ErrflatMap function which maps a Result of Ok type. If the Result is of Err type, leaves it untouched. The map function must return a Result
T doesn't have anything constraining it
err tho, not the okfromNullable just takes a value and turns it into a Result of Ok type and Err if its either null or undefinedOk and Err?match function which would be very hard to do on a union (i think)
Ok(x), the other one will run if the result is an Errmap_or_else heheOkOkOkErrErrErrErrflatMapTerrokfromNullableResultmatchOk(x)map_or_else