refactor(core): remove underscore suffix from locally scoped class expression names (#34757)

remove unnecessary underscore suffix and the corresponding TODO comments,
because the rollup bug was fixed: github.com/rollup/rollup/issues/2047

PR Close #34757
This commit is contained in:
Mike Casebolt 2020-01-13 12:17:23 -08:00 committed by Matias Niemelä
parent d56cf6a92d
commit f2df1c79d2
1 changed files with 3 additions and 6 deletions

View File

@ -60,8 +60,7 @@ export function createElementRef(
ElementRefToken: typeof ViewEngine_ElementRef, tNode: TNode, ElementRefToken: typeof ViewEngine_ElementRef, tNode: TNode,
view: LView): ViewEngine_ElementRef { view: LView): ViewEngine_ElementRef {
if (!R3ElementRef) { if (!R3ElementRef) {
// TODO: Fix class name, should be ElementRef, but there appears to be a rollup bug R3ElementRef = class ElementRef extends ElementRefToken {};
R3ElementRef = class ElementRef_ extends ElementRefToken {};
} }
return new R3ElementRef(getNativeByTNode(tNode, view) as RElement); return new R3ElementRef(getNativeByTNode(tNode, view) as RElement);
} }
@ -96,8 +95,7 @@ export function createTemplateRef<T>(
TemplateRefToken: typeof ViewEngine_TemplateRef, ElementRefToken: typeof ViewEngine_ElementRef, TemplateRefToken: typeof ViewEngine_TemplateRef, ElementRefToken: typeof ViewEngine_ElementRef,
hostTNode: TNode, hostView: LView): ViewEngine_TemplateRef<T>|null { hostTNode: TNode, hostView: LView): ViewEngine_TemplateRef<T>|null {
if (!R3TemplateRef) { if (!R3TemplateRef) {
// TODO: Fix class name, should be TemplateRef, but there appears to be a rollup bug R3TemplateRef = class TemplateRef<T> extends TemplateRefToken<T> {
R3TemplateRef = class TemplateRef_<T> extends TemplateRefToken<T> {
constructor( constructor(
private _declarationView: LView, private _declarationTContainer: TContainerNode, private _declarationView: LView, private _declarationTContainer: TContainerNode,
readonly elementRef: ViewEngine_ElementRef) { readonly elementRef: ViewEngine_ElementRef) {
@ -173,8 +171,7 @@ export function createContainerRef(
hostTNode: TElementNode|TContainerNode|TElementContainerNode, hostTNode: TElementNode|TContainerNode|TElementContainerNode,
hostView: LView): ViewEngine_ViewContainerRef { hostView: LView): ViewEngine_ViewContainerRef {
if (!R3ViewContainerRef) { if (!R3ViewContainerRef) {
// TODO: Fix class name, should be ViewContainerRef, but there appears to be a rollup bug R3ViewContainerRef = class ViewContainerRef extends ViewContainerRefToken {
R3ViewContainerRef = class ViewContainerRef_ extends ViewContainerRefToken {
constructor( constructor(
private _lContainer: LContainer, private _lContainer: LContainer,
private _hostTNode: TElementNode|TContainerNode|TElementContainerNode, private _hostTNode: TElementNode|TContainerNode|TElementContainerNode,