I experienced the same in Angular 8 (still the default for the ASP.NET (.NET 5) Angular template, unfortunately). You can add this command to your tsconfig.json and it resolves (read: ignores) it.
Or better yet, upgrade to Angular 11 and there are no such errors.