import type { Operation } from "./types.js"; /** * Bind a JavaScript disposable value to the current Effection scope. * * The provided value is yielded immediately, then disposed when the owning * scope exits (on return, error, or halt). * * @example * ```ts * import { run, using } from "effection"; * * class Connection { * opened = true; * [Symbol.dispose]() { * this.opened = false; * } * } * * await run(function* () { * let connection = yield* using(new Connection()); * connection.opened; // true while in scope * }); * ``` */ export declare function using(value: T): Operation;