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' ;
211import { ComponentFixture , DeferBlockBehavior , DeferBlockState , TestBed } from '@angular/core/testing' ;
312import { Routes } from '@angular/router' ;
413import { BoundFunction , Queries , queries , Config as dtlConfig , PrettyDOMOptions } from '@testing-library/dom' ;
@@ -153,7 +162,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
153162 * declarations: [ CustomerDetailComponent, ButtonComponent ]
154163 * })
155164 */
156- declarations ?: any [ ] ;
165+ declarations ?: ( Type < unknown > | unknown [ ] ) [ ] ;
157166 /**
158167 * @description
159168 * 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
174183 * ]
175184 * })
176185 */
177- providers ?: any [ ] ;
186+ providers ?: ( Provider | EnvironmentProviders ) [ ] ;
178187 /**
179188 * @description
180189 * 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
192201 * ]
193202 * })
194203 */
195- imports ?: any [ ] ;
204+ imports ?: ( Type < unknown > | ModuleWithProviders < unknown > ) [ ] ;
196205 /**
197206 * @description
198207 * A collection of schemas needed to render the component.
@@ -314,7 +323,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
314323 * ]
315324 * })
316325 */
317- componentProviders ?: any [ ] ;
326+ componentProviders ?: Provider [ ] ;
318327 /**
319328 * @description
320329 * Collection of child component specified providers to override with
@@ -348,7 +357,7 @@ export interface RenderComponentOptions<ComponentType, Q extends Queries = typeo
348357 * ]
349358 * })
350359 */
351- componentImports ?: ( Type < any > | any [ ] ) [ ] ;
360+ componentImports ?: ( Type < unknown > | unknown [ ] ) [ ] ;
352361 /**
353362 * @description
354363 * 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
462471
463472export interface ComponentOverride < T > {
464473 component : Type < T > ;
465- providers : any [ ] ;
474+ providers : Provider [ ] ;
466475}
467476
468477// eslint-disable-next-line @typescript-eslint/no-empty-object-type
@@ -496,7 +505,7 @@ export interface Config extends Pick<RenderComponentOptions<any>, 'excludeCompon
496505 /**
497506 * Imports that are added to the imports
498507 */
499- defaultImports : any [ ] ;
508+ defaultImports ?: ( Type < unknown > | ModuleWithProviders < unknown > ) [ ] ;
500509 /**
501510 * Set to `true` to use zoneless change detection.
502511 * This automatically adds `provideZonelessChangeDetection` to the default imports.
0 commit comments