environmentAs<V> method
V?
environmentAs<V>()
A helper function to attempt to cast environment as the given Type V.
If environment is not a V this function returns null.
Useful for a Plugin to check an Environment supports that Plugins Mixin features.
Implementation
V? environmentAs<V>() => environment is V ? environment as V : null;