type Destructor = () => void export const finalizationRegistry = new FinalizationRegistry(async (destructor) => { await destructor() })