refactor(core): type ComponentRef
, ComponentFactory
and ComponentFixture
by the component type
BREAKING CHANGE: - `ComponetRef`, `ComponentFactory`, `ComponentFixture` now all require a type parameter with the component type. Closes #8361
This commit is contained in:
@ -121,7 +121,7 @@ export function browserPlatform(): PlatformRef {
|
||||
*/
|
||||
export function bootstrap(
|
||||
appComponentType: Type,
|
||||
customProviders?: Array<any /*Type | Provider | any[]*/>): Promise<ComponentRef> {
|
||||
customProviders?: Array<any /*Type | Provider | any[]*/>): Promise<ComponentRef<any>> {
|
||||
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
||||
var appInjector = ReflectiveInjector.resolveAndCreate(
|
||||
[BROWSER_APP_PROVIDERS, isPresent(customProviders) ? customProviders : []],
|
||||
|
@ -47,7 +47,7 @@ export function browserStaticPlatform(): PlatformRef {
|
||||
*/
|
||||
export function bootstrapStatic(appComponentType: Type,
|
||||
customProviders?: Array<any /*Type | Provider | any[]*/>,
|
||||
initReflector?: Function): Promise<ComponentRef> {
|
||||
initReflector?: Function): Promise<ComponentRef<any>> {
|
||||
if (isPresent(initReflector)) {
|
||||
initReflector();
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ PlatformRef workerAppPlatform(SendPort renderSendPort) {
|
||||
return platform;
|
||||
}
|
||||
|
||||
Future<ComponentRef> bootstrapApp(
|
||||
Future<ComponentRef<dynamic>> bootstrapApp(
|
||||
SendPort renderSendPort,
|
||||
Type appComponentType,
|
||||
[List<dynamic /*Type | Provider | any[]*/> customProviders]) {
|
||||
|
@ -44,7 +44,7 @@ export function workerAppPlatform(): PlatformRef {
|
||||
|
||||
export function bootstrapApp(
|
||||
appComponentType: Type,
|
||||
customProviders?: Array<any /*Type | Provider | any[]*/>): Promise<ComponentRef> {
|
||||
customProviders?: Array<any /*Type | Provider | any[]*/>): Promise<ComponentRef<any>> {
|
||||
var appInjector = ReflectiveInjector.resolveAndCreate(
|
||||
[WORKER_APP_APPLICATION, isPresent(customProviders) ? customProviders : []],
|
||||
workerAppPlatform().injector);
|
||||
|
Reference in New Issue
Block a user