unref<R> function
R
unref<R>(
- dynamic ref
Unwraps a Ref instance if the given value is a Ref, otherwise returns the value as-is.
If ref is a Ref, returns its value.
If ref is not a Ref, returns ref unchanged.
R is the type of the unwrapped value.
Implementation
R unref<R>(ref) {
if (ref is public.Ref) {
return ref.value;
}
return ref;
}