Skip to content

Commit 04c9711

Browse files
committed
Fix review feedback
1 parent b880be9 commit 04c9711

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

projects/testing-library/src/lib/models.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
import { Type, DebugElement, ModuleWithProviders, EnvironmentProviders, TypeProvider } from '@angular/core';
1+
import {
2+
Type,
3+
DebugElement,
4+
ModuleWithProviders,
5+
EnvironmentProviders,
6+
Provider,
7+
ValueProvider,
8+
ClassProvider,
9+
ExistingProvider,
10+
FactoryProvider,
11+
} from '@angular/core';
212
import { ComponentFixture, TestBed } from '@angular/core/testing';
313
import { Routes } from '@angular/router';
414
import { BoundFunction, Queries, queries, Config as dtlConfig, PrettyDOMOptions } from '@testing-library/dom';
@@ -65,12 +75,6 @@ export interface RenderResult<ComponentType, WrapperType = ComponentType> extend
6575
) => Promise<void>;
6676
}
6777

68-
export interface ProviderInterface {
69-
provide: any;
70-
useValue: any;
71-
multi?: boolean;
72-
}
73-
7478
export interface RenderComponentOptions<ComponentType, Q extends Queries = typeof queries> {
7579
/**
7680
* @description
@@ -113,7 +117,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
113117
* declarations: [ CustomerDetailComponent, ButtonComponent ]
114118
* })
115119
*/
116-
declarations?: any[];
120+
declarations?: Array<Type<any> | any[]>;
117121
/**
118122
* @description
119123
* A collection of providers needed to render the component via Dependency Injection, for example, injectable services or tokens.
@@ -134,7 +138,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
134138
* ]
135139
* })
136140
*/
137-
providers?: Array<ProviderInterface | TypeProvider | EnvironmentProviders>;
141+
providers?: Array<Provider | EnvironmentProviders>;
138142
/**
139143
* @description
140144
* A collection of imports needed to render the component, for example, shared modules.
@@ -153,7 +157,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
153157
* ]
154158
* })
155159
*/
156-
imports?: Array<Type<any> | ModuleWithProviders<unknown> | any[]>;
160+
imports?: Array<Type<any> | ModuleWithProviders<any>>;
157161
/**
158162
* @description
159163
* A collection of schemas needed to render the component.
@@ -237,7 +241,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
237241
* ]
238242
* })
239243
*/
240-
componentProviders?: Array<ProviderInterface | TypeProvider | EnvironmentProviders>;
244+
componentProviders?: Array<ValueProvider | ClassProvider | ExistingProvider | FactoryProvider>;
241245
/**
242246
* @description
243247
* Collection of child component specified providers to override with

0 commit comments

Comments
 (0)