More rust at home
This commit is contained in:
parent
d324c83667
commit
1131fe3761
@ -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);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user