ApolloClient Cache Typescript Inference

Does anyone know how I can get correct type inference for the cache attached to an ApolloClient?

For example:

const client = new ApolloClient({
  cache: new InMemoryCache(),
})
client.cache // Type is ApolloCache<NormalizeCacheObject>

This type should be narrowed to InMemoryCache but it isn’t. It’s unclear to me why this is not being narrowed based on the way the types are written. If anyone can shed some light here it would be useful.

I finally tracked down an answer here: `policies` Property Missing from `ApolloCache` Type · Issue #7729 · apollographql/apollo-client · GitHub. It seems that this is intentional but I think the type inference could be improved here to make all parties satisfied.