R/combinators.R
opt.Rd
Shorthand for T | NULL, and the readable way to write a self-reference or a forward reference by name.
T | NULL
opt(t)
A type, or a struct name.
A type.
opt(int[1])(NULL) #> NULL opt(int[1])(3) #> [1] 3 opt("User") #> <type> User | NULL