deferSync
function deferSync(fn, options?): DeferredSync;Defined in: defer.ts:158
Creates a sync disposable with cancellation, resume, and double-dispose protection.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
fn |
() => void |
options? |
DeferOptions |
Returns
Section titled “Returns”Example
Section titled “Example”using cleanup = deferSync(() => { console.log("cleanup");});