Upgrading from Apollo Client 3.12.15 to 3.12.16 in an Apollo-Angular 8.0.0 / Angular 19 project generates two sets of TypeScript errors when building with tsc
under TypeScript 5.7.3 (masked by a FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
error unless tsconfig.json
has compilerOptions: { skipLibCheck: true }
set).
The first error is error TS2589: Type instantiation is excessively deep and possibly infinite
on MutationUpdaterFunctions with recursively nested result types. This is happening with several types that do have circular references but worked fine in Apollo Client 3.12.15 and previous versions. From looking at the diffs, I’m assuming this is occurring because of the changes to Unmasked
as I see that type used in the MutationUpdaterFunction
.
The second error is error TS7006: Parameter '' implicitly has an 'any' type.
on Cache.ModifyOptions
Modifier
function. I’m not sure why the previously working typing passed to the generic is not working.
Can anyone shed light on the TypeScript typing changes made in Apollo Client 3.12.16?