mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): declare TestModuleMetadata as an interface (#45891)
This allows the documentation for the options `errorOnUnknownElements` and `errorOnUnknownProperties` to be displayed in the docs. They aren't currently displayed, as `TestModuleMetadata` is a type and not an interface. See https://next.angular.io/api/core/testing/TestModuleMetadata PR Close #45891
This commit is contained in:
committed by
Andrew Kushnir
parent
cd5a273edb
commit
def1f0fb93
@@ -221,15 +221,20 @@ export interface TestEnvironmentOptions {
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type TestModuleMetadata = {
|
||||
providers?: any[];
|
||||
export interface TestModuleMetadata {
|
||||
// (undocumented)
|
||||
declarations?: any[];
|
||||
imports?: any[];
|
||||
schemas?: Array<SchemaMetadata | any[]>;
|
||||
teardown?: ModuleTeardownOptions;
|
||||
errorOnUnknownElements?: boolean;
|
||||
errorOnUnknownProperties?: boolean;
|
||||
};
|
||||
// (undocumented)
|
||||
imports?: any[];
|
||||
// (undocumented)
|
||||
providers?: any[];
|
||||
// (undocumented)
|
||||
schemas?: Array<SchemaMetadata | any[]>;
|
||||
// (undocumented)
|
||||
teardown?: ModuleTeardownOptions;
|
||||
}
|
||||
|
||||
// @public
|
||||
export function tick(millis?: number, tickOptions?: {
|
||||
|
||||
@@ -45,11 +45,11 @@ export const ComponentFixtureNoNgZone = new InjectionToken<boolean[]>('Component
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export type TestModuleMetadata = {
|
||||
providers?: any[],
|
||||
declarations?: any[],
|
||||
imports?: any[],
|
||||
schemas?: Array<SchemaMetadata|any[]>,
|
||||
export interface TestModuleMetadata {
|
||||
providers?: any[];
|
||||
declarations?: any[];
|
||||
imports?: any[];
|
||||
schemas?: Array<SchemaMetadata|any[]>;
|
||||
teardown?: ModuleTeardownOptions;
|
||||
/**
|
||||
* Whether NG0304 runtime errors should be thrown when unknown elements are present in component's
|
||||
@@ -65,7 +65,7 @@ export type TestModuleMetadata = {
|
||||
* @see https://angular.io/errors/NG8002 for the description of the error and how to fix it
|
||||
*/
|
||||
errorOnUnknownProperties?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
|
||||
Reference in New Issue
Block a user