function flushPendingWork flushPendingWork(): Promise<void> Await all queued work. Call before returning the response. Return Type Promise<void>