refactor(core): remove deprecated Renderer (#33019)
Removes the `Renderer` and related symbols which have been deprecated since version 4. BREAKING CHANGES: * `Renderer` has been removed. Use `Renderer2` instead. * `RenderComponentType` has been removed. Use `RendererType2` instead. * `RootRenderer` has been removed. Use `RendererFactory2` instead. PR Close #33019
This commit is contained in:

committed by
Alex Rickabaugh

parent
c507dda21a
commit
2265cb5938
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Injectable, RenderComponentType, RendererType2, Type, ɵstringify as stringify} from '@angular/core';
|
||||
import {Injectable, RendererType2, Type, ɵstringify as stringify} from '@angular/core';
|
||||
import {RenderStore} from './render_store';
|
||||
|
||||
|
||||
@ -44,9 +44,6 @@ export class Serializer {
|
||||
if (type === SerializerTypes.RENDER_STORE_OBJECT) {
|
||||
return this._renderStore.serialize(obj) !;
|
||||
}
|
||||
if (type === RenderComponentType) {
|
||||
return this._serializeRenderComponentType(obj);
|
||||
}
|
||||
if (type === SerializerTypes.RENDERER_TYPE_2) {
|
||||
return this._serializeRendererType2(obj);
|
||||
}
|
||||
@ -67,9 +64,6 @@ export class Serializer {
|
||||
if (type === SerializerTypes.RENDER_STORE_OBJECT) {
|
||||
return this._renderStore.deserialize(map);
|
||||
}
|
||||
if (type === RenderComponentType) {
|
||||
return this._deserializeRenderComponentType(map);
|
||||
}
|
||||
if (type === SerializerTypes.RENDERER_TYPE_2) {
|
||||
return this._deserializeRendererType2(map);
|
||||
}
|
||||
@ -99,22 +93,6 @@ export class Serializer {
|
||||
loc['search'], loc['hash'], loc['origin']);
|
||||
}
|
||||
|
||||
private _serializeRenderComponentType(type: RenderComponentType): Object {
|
||||
return {
|
||||
'id': type.id,
|
||||
'templateUrl': type.templateUrl,
|
||||
'slotCount': type.slotCount,
|
||||
'encapsulation': this.serialize(type.encapsulation),
|
||||
'styles': this.serialize(type.styles),
|
||||
};
|
||||
}
|
||||
|
||||
private _deserializeRenderComponentType(props: {[key: string]: any}): RenderComponentType {
|
||||
return new RenderComponentType(
|
||||
props['id'], props['templateUrl'], props['slotCount'],
|
||||
this.deserialize(props['encapsulation']), this.deserialize(props['styles']), {});
|
||||
}
|
||||
|
||||
private _serializeRendererType2(type: RendererType2): {[key: string]: any} {
|
||||
return {
|
||||
'id': type.id,
|
||||
|
Reference in New Issue
Block a user