type<P> method

  1. @override
Maybe<P> type<P>()
override

Narrows the type to P if the value is present and has actually the type of P.

Implementation

@override
Maybe<P> type<P>() => value is P ? (as<P>()) : Nothing();