DisposableScope Interface
Package: @esfx/disposable
Used to aproximate using
via for..of
. See scope().
NOTE: This is not spec-compliant and will not be standardized.
Declaration
export interface DisposableScope
Methods
fail(error)
Tracks an exception from the body of a for..of
statement. See scope().
Declaration
fail(error: unknown): void;
Parameters
- error
- unknown
Returns
void
using(value)
Tracks a resource to be disposed at the end of a for..of
statement. See scope().
Declaration
using<T extends Disposable | null | undefined>(value: T): T;
Type Parameters
- T
Parameters
- value
- T
Returns
T