refactor(core): deprecate coreBootstrap
, PLATFORM_PIPES/DIRECTIVES
providers and ComponentResolver
BREAKING CHANGE (deprecations) - Instead of `coreBootstrap`, create an `@AppModule` and use `bootstrapModule`. - Instead of `coreLoadAndBootstarp`, create an `@AppModule` and use `bootstrapModuleFactory`. - Instead of `bootstrapWorkerApp`, create an `@AppModule` that includes the `WorkerAppModule` and use `bootstrapModule` with the `workerAppPlatform()`. - Instead of `bootstrapWorkerUi`, create an @AppModule that includes the `WorkerUiModule` and use `bootstrapModule` with the `workerUiPlatform()` instead. - Instead of `serverBootstrap`, create an @AppModule and use `bootstrapModule` with the `serverDynamicPlatform()` instead. - Instead of `PLATFORM_PIPES` and `PLATFORM_DIRECTIVES`, provide platform directives/pipes via an `@AppModule`. - Instead of `ComponentResolver`: - use `ComponentFactoryResolver` together with `@AppModule.precompile`/`@Component.precompile` or `ANALYZE_FOR_PRECOMPILE` provider for dynamic component creation. - use `AppModuleFactoryLoader` for lazy loading. - Instead of `SystemJsComponentResolver`, create an `@AppModule` and use `SystemJsAppModuleLoader`. - Instead of `SystemJsCmpFactoryResolver`, create an `@AppModule` and use `SystemJsAppModuleFactoryLoader` Closes #9726
This commit is contained in:
19
tools/public_api_guard/core/index.d.ts
vendored
19
tools/public_api_guard/core/index.d.ts
vendored
@ -471,10 +471,12 @@ export declare abstract class ComponentRef<C> {
|
||||
abstract onDestroy(callback: Function): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
/** @deprecated */
|
||||
export declare abstract class ComponentResolver {
|
||||
abstract clearCache(): void;
|
||||
abstract resolveComponent(component: Type | string): Promise<ComponentFactory<any>>;
|
||||
static DynamicCompilationDeprecationMsg: string;
|
||||
static LazyLoadingDeprecationMsg: string;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
@ -526,10 +528,10 @@ export interface ContentChildrenMetadataFactory {
|
||||
}): ContentChildrenMetadata;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
/** @deprecated */
|
||||
export declare function coreBootstrap<C>(componentFactory: ComponentFactory<C>, injector: Injector): ComponentRef<C>;
|
||||
|
||||
/** @experimental */
|
||||
/** @deprecated */
|
||||
export declare function coreLoadAndBootstrap(componentType: Type, injector: Injector): Promise<ComponentRef<any>>;
|
||||
|
||||
/** @experimental */
|
||||
@ -1057,13 +1059,13 @@ export interface PipeTransform {
|
||||
/** @experimental */
|
||||
export declare const PLATFORM_COMMON_PROVIDERS: Array<any | Type | Provider | any[]>;
|
||||
|
||||
/** @stable */
|
||||
/** @deprecated */
|
||||
export declare const PLATFORM_DIRECTIVES: OpaqueToken;
|
||||
|
||||
/** @experimental */
|
||||
export declare const PLATFORM_INITIALIZER: any;
|
||||
|
||||
/** @stable */
|
||||
/** @deprecated */
|
||||
export declare const PLATFORM_PIPES: OpaqueToken;
|
||||
|
||||
/** @experimental */
|
||||
@ -1338,15 +1340,16 @@ export declare class SystemJsAppModuleLoader implements AppModuleFactoryLoader {
|
||||
load(path: string): Promise<AppModuleFactory<any>>;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
/** @deprecated */
|
||||
export declare class SystemJsCmpFactoryResolver implements ComponentResolver {
|
||||
constructor(_console: Console);
|
||||
clearCache(): void;
|
||||
resolveComponent(componentType: string | Type): Promise<ComponentFactory<any>>;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
/** @deprecated */
|
||||
export declare class SystemJsComponentResolver implements ComponentResolver {
|
||||
constructor(_resolver: ComponentResolver);
|
||||
constructor(_resolver: ComponentResolver, _console: Console);
|
||||
clearCache(): void;
|
||||
resolveComponent(componentType: string | Type): Promise<ComponentFactory<any>>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user