In my index.d.ts
file, I have declared two modules like so:
declare module 'googlemaps';
declare module 'detect-resize';
Previously, these declarations worked perfectly fine, allowing me to utilize these modules.
The googlemaps
module has a dependency on @types/googlemaps
, but the actual Google Maps API cannot be loaded until runtime with an API key.
On the other hand, detect-resize
lacks typing and requires the declare
statement for that reason.
Up until Angular 8, I had no issues with these modules as long as they were included in index.d.ts
. However, since upgrading to Angular 9, this approach does not resolve the problem, causing build errors.
I have come across similar problems related to Angular 9 and index.d.ts
, but they all pertain to Angular Material. Changing the version of Angular Material is not a viable solution in this case.
If anyone has any insights or solutions to offer, I would greatly appreciate it!