diff --git a/aio/content/guide/testing.md b/aio/content/guide/testing.md
index 41f6d9bcf8..0acff26bf1 100644
--- a/aio/content/guide/testing.md
+++ b/aio/content/guide/testing.md
@@ -2367,9 +2367,9 @@ The [override metadata object](#metadata-override-object) is a generic defined a
type MetadataOverride = {
- add?: T;
- remove?: T;
- set?: T;
+ add?: Partial;
+ remove?: Partial;
+ set?: Partial;
};
@@ -2725,9 +2725,9 @@ appropriate to the method, that is, the parameter of an `@NgModule`,
type MetadataOverride = {
- add?: T;
- remove?: T;
- set?: T;
+ add?: Partial;
+ remove?: Partial;
+ set?: Partial;
};
diff --git a/packages/core/testing/src/metadata_override.ts b/packages/core/testing/src/metadata_override.ts
index 7e2d1d6467..7773cbbf25 100644
--- a/packages/core/testing/src/metadata_override.ts
+++ b/packages/core/testing/src/metadata_override.ts
@@ -12,7 +12,7 @@
* @experimental
*/
export type MetadataOverride = {
- add?: T,
- remove?: T,
- set?: T
+ add?: Partial,
+ remove?: Partial,
+ set?: Partial
};
diff --git a/packages/platform-browser/test/testing_public_spec.ts b/packages/platform-browser/test/testing_public_spec.ts
index f20b78a0c7..cf33d392f0 100644
--- a/packages/platform-browser/test/testing_public_spec.ts
+++ b/packages/platform-browser/test/testing_public_spec.ts
@@ -376,7 +376,8 @@ class CompWithUrlTemplate {
TestBed
.overrideComponent(
SomeComponent, {set: {selector: 'comp', template: `{{'hello' | somePipe}}`}})
- .overridePipe(SomePipe, {set: {name: 'somePipe'}});
+ .overridePipe(SomePipe, {set: {name: 'somePipe'}})
+ .overridePipe(SomePipe, {add: {pure: false}});
});
it('should work', () => {
const compFixture = TestBed.createComponent(SomeComponent);
diff --git a/tools/public_api_guard/core/testing.d.ts b/tools/public_api_guard/core/testing.d.ts
index b25ae5069d..c7df004ea6 100644
--- a/tools/public_api_guard/core/testing.d.ts
+++ b/tools/public_api_guard/core/testing.d.ts
@@ -55,9 +55,9 @@ export declare class InjectSetupWrapper {
/** @experimental */
export declare type MetadataOverride = {
- add?: T;
- remove?: T;
- set?: T;
+ add?: Partial;
+ remove?: Partial;
+ set?: Partial;
};
/** @experimental */