Creates a successful result with the given value.
The type of the value.
Optional
The value to wrap in a successful result. Defaults to null if not provided.
A ResultOk containing the value.
const [error, value] = ok("Success"); // [null, "Success"] Copy
const [error, value] = ok("Success"); // [null, "Success"]
const [error, value] = ok(); // [null, null] Copy
const [error, value] = ok(); // [null, null]
Creates a successful result with the given value.