cast_option<C extends CandidType> method
Casts an Option<CandidType> into an Option<C extends CandidType>.
Useful for casting the type of this.value
into a specific CandidType
Implementation
Option<C> cast_option<C extends CandidType>() {
return Option<C>(
value: this.value == null ? null : this.value as C,
value_type: this.value_type == null ? null : this.value_type as C,
type_mode: this.type_mode
);
}