Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/disposable/using.ts>usingSync

🦕 Ensure a disposable resource is disposed in Deno
Latest
function usingSync
Deprecated
Deprecated

Use usingResourceSync instead

import { usingSync } from "https://deno.land/x/disposable@v1.2.0/using.ts";

Type Parameters

T extends Disposable<void>
optional
R = unknown

Parameters

resource: T
fn: (resource: T) => R