Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
LateInitialized Property Wrapper
struct LateInitialized<T> {
var storage: T? = nil
var wrappedValue: T {
get {
guard let value = storage else {
fatalError("value has not been set!")
return value
set {
storage = newValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment