diff --git a/goldens/public-api/platform-browser/index.md b/goldens/public-api/platform-browser/index.md
index df3ccad791a..afebeb18013 100644
--- a/goldens/public-api/platform-browser/index.md
+++ b/goldens/public-api/platform-browser/index.md
@@ -235,6 +235,9 @@ export class Title {
}
// @public @deprecated
+export type TransferState = TransferState_2;
+
+// @public (undocumented)
export const TransferState: {
new (): TransferState_2;
};
diff --git a/packages/platform-browser/src/platform-browser.ts b/packages/platform-browser/src/platform-browser.ts
index 2efc7402599..29691fe244d 100644
--- a/packages/platform-browser/src/platform-browser.ts
+++ b/packages/platform-browser/src/platform-browser.ts
@@ -47,6 +47,8 @@ export const makeStateKey = makeStateKeyFromCore;
* instead.
*/
// The below is a workaround to add a deprecated message.
+export type TransferState = TransferStateFromCore;
+// The below type is needed for G3 due to JSC_CONFORMANCE_VIOLATION.
export const TransferState: {new (): TransferStateFromCore} = TransferStateFromCore;
/**
diff --git a/packages/platform-browser/test/testing_public_spec.ts b/packages/platform-browser/test/testing_public_spec.ts
index 71636f07d25..1746c057a79 100644
--- a/packages/platform-browser/test/testing_public_spec.ts
+++ b/packages/platform-browser/test/testing_public_spec.ts
@@ -11,6 +11,8 @@ import {Compiler, Component, ComponentFactoryResolver, CUSTOM_ELEMENTS_SCHEMA, D
import {fakeAsync, getTestBed, inject, TestBed, tick, waitForAsync, withModule} from '@angular/core/testing';
import {expect} from '@angular/platform-browser/testing/src/matchers';
+import {TransferState} from '../public_api';
+
// Services, and components for the tests.
@Component({selector: 'child-comp', template: `Original {{childBinding}}`})
@@ -46,18 +48,6 @@ class MyIfComp {
class ChildChildComp {
}
-@Component({
- selector: 'child-comp',
- template: `Original {{childBinding}}()`,
-})
-@Injectable()
-class ChildWithChildComp {
- childBinding: string;
- constructor() {
- this.childBinding = 'Child';
- }
-}
-
class FancyService {
value: string = 'real value';
getAsyncValue() {
@@ -1057,5 +1047,10 @@ Did you run and wait for 'resolveComponentResources()'?`);
/Cannot override template when the test module has already been instantiated/);
});
});
+
+ it('TransferState re-export can be used as a type and contructor', () => {
+ const transferState: TransferState = new TransferState();
+ expect(transferState).toBeDefined();
+ });
});
}