refactor(ivy): pre-factor: set explicit type parameters for ModuleWithProviders (#25970)

Ivy depends on having the generic type token later when reading the ModuleWithProviders from a .d.ts file.

PR Close #25970
This commit is contained in:
Alex Eagle
2018-09-14 14:55:16 -07:00
committed by Ben Lesh
parent 96ee898cee
commit cbbad1b791
9 changed files with 21 additions and 20 deletions

View File

@ -1482,11 +1482,11 @@ export declare class HttpClientModule {
}
export declare class HttpClientXsrfModule {
static disable(): ModuleWithProviders;
static disable(): ModuleWithProviders<HttpClientXsrfModule>;
static withOptions(options?: {
cookieName?: string;
headerName?: string;
}): ModuleWithProviders;
}): ModuleWithProviders<HttpClientXsrfModule>;
}
export interface HttpDownloadProgressEvent extends HttpProgressEvent {

View File

@ -506,7 +506,7 @@ export declare class ModuleWithComponentFactories<T> {
constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
}
export interface ModuleWithProviders<T = any> {
export interface ModuleWithProviders<T = any /** TODO(alxhub): remove default when callers pass explicit type param */> {
ngModule: Type<T>;
providers?: Provider[];
}

View File

@ -331,7 +331,7 @@ export declare class FormGroupName extends AbstractFormGroupDirective implements
export declare class FormsModule {
static withConfig(opts: { warnOnDeprecatedNgFormSelector?: 'never' | 'once' | 'always';
}): ModuleWithProviders;
}): ModuleWithProviders<FormsModule>;
}
export declare class MaxLengthValidator implements Validator, OnChanges {

View File

@ -3,7 +3,7 @@ export declare class ServiceWorkerModule {
static register(script: string, opts?: {
scope?: string;
enabled?: boolean;
}): ModuleWithProviders;
}): ModuleWithProviders<ServiceWorkerModule>;
}
/** @experimental */