ERROR in node_modules/ngx-bootstrap/modal/modal.module.d.ts:3:23 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s). 3 static forRoot(): ModuleWithProviders; code example

Example 1: Generic type 'ModuleWithProviders' requires 1 type argument(s).

// Add in app.module.ts

declare module "@angular/core" {
  interface ModuleWithProviders<T = any> {
    ngModule: Type<T>;
    providers?: Provider[];
  }
}

// OR add in tsconfig.app.json
"skipLibCheck": true;

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./out-tsc/app",
    "types": [],
    "skipLibCheck": true
  },
      .....

Example 2: node_modules/angularx-flatpickr/flatpickr.module.d.ts:6:64 - error TS2314: Generic type 'ModuleWithProviders' requires 1 type argument(s).

export declare class FlatpickrModule {
   static forRoot(userDefaults?: FlatpickrDefaultsInterface): ModuleWithProviders<unknown>;