This function extracts the value from an Optional, returning undefined
for empty Optionals. This is useful when interfacing with APIs or systems
that expect nullable values rather than Optional types.
Note: This returns undefined (not null) for consistency with
JavaScript's undefined semantics and TypeScript's optional properties.
Converts an
Optionalto a nullable value.This function extracts the value from an Optional, returning
undefinedfor empty Optionals. This is useful when interfacing with APIs or systems that expect nullable values rather than Optional types.Note: This returns
undefined(notnull) for consistency with JavaScript's undefined semantics and TypeScript's optional properties.