use
use<
E,A,B>(f): (resource) =>TaskResult<E,B>
Defined in: Core/Resource.ts:83
Acquires the resource, runs f with it, then releases it.
Release always runs, even when f returns an error.
If acquire fails, f and release are both skipped and the error is returned.
Type Parameters
Section titled “Type Parameters”E
A
B
Parameters
Section titled “Parameters”(a) => TaskResult<E, B>
Returns
Section titled “Returns”(resource) => TaskResult<E, B>