Generic type 'ModuleWithProviders<T>' 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
},
.....
4
9
// make your index.d.ts file to be like this
import { ModuleWithProviders, Provider } from '@angular/core';
import * as ɵngcc0 from '@angular/core';
export * from './src/jwt.interceptor';
export * from './src/jwthelper.service';
export * from './src/jwtoptions.token';
export interface JwtModuleOptions {
jwtOptionsProvider?: Provider;
config?: {
tokenGetter?: () => string | null | Promise<string | null>;
headerName?: string;
authScheme?: string;
whitelistedDomains?: Array<string | RegExp>;
blacklistedRoutes?: Array<string | RegExp>;
throwNoTokenError?: boolean;
skipWhenExpired?: boolean;
};
}
export declare class JwtModule {
constructor(parentModule: JwtModule);
static forRoot(options: JwtModuleOptions): ModuleWithProviders<JwtModule>;
static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<JwtModule, [{ optional: true; skipSelf: true; }]>;
static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<JwtModule, never, never, never>;
static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<JwtModule>;
}
//# sourceMappingURL=index.d.ts.map
Thank you!
9
0
Are there any code examples left?
New code examples in category TypeScript
-
TypeScript 2022-03-27 19:30:45 typescript promise
-
TypeScript 2022-03-27 17:25:44 how to search for imports in vscode
-
TypeScript 2022-03-27 17:15:20 angular formgroup mark as touched
-
TypeScript 2022-03-27 17:05:06 use of slice and splice add elements array
-
TypeScript 2022-03-27 16:50:23 android studio loop through all objects in layout
-
TypeScript 2022-03-27 14:35:08 wergensherts meaning
-
TypeScript 2022-03-27 13:50:15 remove all the elements from a numpy array python
-
TypeScript 2022-03-27 12:35:49 redux toolkit typescript install
-
TypeScript 2022-03-27 12:35:30 laravel middleware for apis