1
- import { Type , DebugElement , EventEmitter , Signal , InputSignalWithTransform } from '@angular/core' ;
1
+ import {
2
+ Type ,
3
+ DebugElement ,
4
+ ModuleWithProviders ,
5
+ EventEmitter ,
6
+ EnvironmentProviders ,
7
+ Provider ,
8
+ Signal ,
9
+ InputSignalWithTransform ,
10
+ } from '@angular/core' ;
2
11
import { ComponentFixture , DeferBlockBehavior , DeferBlockState , TestBed } from '@angular/core/testing' ;
3
12
import { Routes } from '@angular/router' ;
4
13
import { BoundFunction , Queries , queries , Config as dtlConfig , PrettyDOMOptions } from '@testing-library/dom' ;
@@ -153,7 +162,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
153
162
* declarations: [ CustomerDetailComponent, ButtonComponent ]
154
163
* })
155
164
*/
156
- declarations ?: any [ ] ;
165
+ declarations ?: ( Type < unknown > | unknown [ ] ) [ ] ;
157
166
/**
158
167
* @description
159
168
* A collection of providers needed to render the component via Dependency Injection, for example, injectable services or tokens.
@@ -174,7 +183,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
174
183
* ]
175
184
* })
176
185
*/
177
- providers ?: any [ ] ;
186
+ providers ?: ( Provider | EnvironmentProviders ) [ ] ;
178
187
/**
179
188
* @description
180
189
* A collection of imports needed to render the component, for example, shared modules.
@@ -192,7 +201,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
192
201
* ]
193
202
* })
194
203
*/
195
- imports ?: any [ ] ;
204
+ imports ?: ( Type < unknown > | ModuleWithProviders < unknown > ) [ ] ;
196
205
/**
197
206
* @description
198
207
* A collection of schemas needed to render the component.
@@ -314,7 +323,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
314
323
* ]
315
324
* })
316
325
*/
317
- componentProviders ?: any [ ] ;
326
+ componentProviders ?: Provider [ ] ;
318
327
/**
319
328
* @description
320
329
* Collection of child component specified providers to override with
@@ -348,7 +357,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
348
357
* ]
349
358
* })
350
359
*/
351
- componentImports ?: ( Type < any > | any [ ] ) [ ] ;
360
+ componentImports ?: ( Type < unknown > | unknown [ ] ) [ ] ;
352
361
/**
353
362
* @description
354
363
* Queries to bind. Overrides the default set from DOM Testing Library unless merged.
@@ -462,7 +471,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
462
471
463
472
export interface ComponentOverride < T > {
464
473
component : Type < T > ;
465
- providers : any [ ] ;
474
+ providers : Provider [ ] ;
466
475
}
467
476
468
477
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
@@ -496,7 +505,7 @@ export interface Config extends Pick<RenderComponentOptions<any>, 'excludeCompon
496
505
/**
497
506
* Imports that are added to the imports
498
507
*/
499
- defaultImports : any [ ] ;
508
+ defaultImports ?: ( Type < unknown > | ModuleWithProviders < unknown > ) [ ] ;
500
509
/**
501
510
* Set to `true` to use zoneless change detection.
502
511
* This automatically adds `provideZonelessChangeDetection` to the default imports.
0 commit comments