More rust at home

This commit is contained in:
jordan4ibanez 2024-04-17 11:04:29 -04:00
parent d324c83667
commit 1131fe3761

View File

@ -28,4 +28,13 @@ namespace utility {
}
}
}
/**
* If you're not sure if it's going to be nothing, safely wrap it.
* @param input Something...or maybe nothing?
* @returns Option<Type>
*/
export function optionWrap<T>(input: T | null): Option<T> {
return new Option<T>(input);
}
}