Reference

runWithCleanupScope

Runs a synchronous callback with a public cleanup scope as its dynamic owner.

Signature

function runWithCleanupScope<T>(scope: CleanupScope, run: (): T): T