Skip to content

Commit

Permalink
fix(a15): supporting env provides #3887
Browse files Browse the repository at this point in the history
  • Loading branch information
satanTime committed Oct 22, 2022
1 parent 53fb28c commit 2769644
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ import { Type } from './core.types';
*/
export interface NgModuleWithProviders<T = any> {
ngModule: Type<T>;
providers?: Provider[];
providers?: Array<Provider>;
}

/**
* NgModuleWithProviders which supports A15
*
* @internal remove after removal of A5 support and switch to NgModuleWithProviders
*/
export interface NgModuleWithProvidersA15<T = any> {
ngModule: Type<T>;
providers?: Array<Provider | { ɵbrand: string }>;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions libs/ng-mocks/src/lib/mock-builder/mock-builder.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { flatten } from '../common/core.helpers';
import { AnyDeclaration } from '../common/core.types';
import { NgModuleWithProviders } from '../common/func.is-ng-module-def-with-providers';
import { NgModuleWithProviders, NgModuleWithProvidersA15 } from '../common/func.is-ng-module-def-with-providers';
import { isStandalone } from '../common/func.is-standalone';

import { MockBuilderPerformance } from './mock-builder.performance';
import { IMockBuilder } from './types';

export type MockBuilderParam = string | AnyDeclaration<any> | NgModuleWithProviders;
export type MockBuilderParam = string | AnyDeclaration<any> | NgModuleWithProviders | NgModuleWithProvidersA15;

/**
* MockBuilder provides reach and simple interfaces of chain functions
Expand Down

0 comments on commit 2769644

Please sign in to comment.