export async function waitForPluginRefreshSettlement( getCurrent: () => Promise ): Promise { while (true) { const pending = getCurrent() await pending.catch(() => undefined) if (pending === getCurrent()) { return } } }