You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many methods in ZIO are implemented in an intermediate class, like this example.
/**
* Accesses the environment of the effect.
*/
def environmentWith[R]: ZIO.EnvironmentWithPartiallyApplied[R] =
new ZIO.EnvironmentWithPartiallyApplied[R]
final class EnvironmentWithPartiallyApplied[R](private val dummy: Boolean = true) extends AnyVal {
def apply[A](f: ZEnvironment[R] => A)(implicit trace: Trace): URIO[R, A] =
ZIO.environment.map(f)
}
The current tool tip for ZIO.environmentWith[Foo] comes only from the first code block, but a lot of the valuable information sits in the second code block. I think both blocks contains valuable information:
Actual method signature including parameters and return type
Method documentation
The name of the method you're using ("def apply") would be confusing
Information that the method was implemented with an intermediate class. Otherwise you might get tricked by false hints about implementation.
The text was updated successfully, but these errors were encountered:
Many methods in ZIO are implemented in an intermediate class, like this example.
The current tool tip for
ZIO.environmentWith[Foo]
comes only from the first code block, but a lot of the valuable information sits in the second code block. I think both blocks contains valuable information:The text was updated successfully, but these errors were encountered: