Anonymous - 2026-03-27

Originally posted by: Ujjwaljain16

I looked into it in detail

There’s currently a mismatch between the declared type and the runtime behavior:

  • Type (CleanupResult) exposes deletedCacheRequests
  • Implementation (PrecacheController.activate()) returns deletedURLs
  • Tests and actual usage already rely on deletedURLs

So at runtime, consumers receive { deletedURLs }, while TypeScript users are guided to use deletedCacheRequests, which doesn’t exist in practice.

From what I can see:

  • deletedURLs is the de facto API (used in tests and implementation)
  • deletedCacheRequests appears to be a stale/incorrect type definition
  • Also, deletedURLs is semantically more accurate (array of URL strings, not Request objects)

Proposed fix (non-breaking)

To avoid breaking either JS or TS users:

  • Keep deletedURLs as the canonical field
  • Add deletedCacheRequests as a deprecated alias (pointing to the same array)
  • Update types accordingly and mark the alias as deprecated

Example:

return {
  deletedURLs,
  deletedCacheRequests: deletedURLs, // deprecated alias
};

This:

  • aligns types with actual behavior
  • avoids breaking existing consumers
  • provides a clear migration path