Function scopedCaptureSync

Source
scopedCaptureSync<T>(fn: () => T, obj: unknown): T

Execute a closure fn, and guarantee that obj will not be garbage-collected during the execution