Returns the given value but updates the type to T | undefined. Useful in cases where the value can be undefiend but the type checker does not infer undefined (e.g. indexing an array).
T | undefined
Returns the given value but updates the type to
T | undefined. Useful in cases where the value can be undefiend but the type checker does not infer undefined (e.g. indexing an array).