fix(core): proper @internal and @nocollapse combined usage fix (#28138)

This update fixes the way the @internal and @nocollapse annotations are used together, which produced errors while running it with Closure compiler. Now two annotations are a part of the same comment block.

PR Close #28138
This commit is contained in:
Andrew Kushnir 2019-01-14 12:44:06 -08:00
parent d12db4e114
commit f1fb62d1e5
5 changed files with 20 additions and 10 deletions

View File

@ -107,8 +107,10 @@ export abstract class ChangeDetectorRef {
*/ */
abstract reattach(): void; abstract reattach(): void;
/** @internal */ /**
/** @nocollapse */ * @internal
* @nocollapse
*/
static __NG_ELEMENT_ID__: () => ChangeDetectorRef = () => SWITCH_CHANGE_DETECTOR_REF_FACTORY(); static __NG_ELEMENT_ID__: () => ChangeDetectorRef = () => SWITCH_CHANGE_DETECTOR_REF_FACTORY();
} }

View File

@ -50,8 +50,10 @@ export class ElementRef<T = any> {
constructor(nativeElement: T) { this.nativeElement = nativeElement; } constructor(nativeElement: T) { this.nativeElement = nativeElement; }
/** @internal */ /**
/** @nocollapse */ * @internal
* @nocollapse
*/
static __NG_ELEMENT_ID__: () => ElementRef = () => SWITCH_ELEMENT_REF_FACTORY(ElementRef); static __NG_ELEMENT_ID__: () => ElementRef = () => SWITCH_ELEMENT_REF_FACTORY(ElementRef);
} }

View File

@ -53,8 +53,10 @@ export abstract class TemplateRef<C> {
*/ */
abstract createEmbeddedView(context: C): EmbeddedViewRef<C>; abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
/** @internal */ /**
/** @nocollapse */ * @internal
* @nocollapse
*/
static __NG_ELEMENT_ID__: static __NG_ELEMENT_ID__:
() => TemplateRef<any>| null = () => SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef) () => TemplateRef<any>| null = () => SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef)
} }

View File

@ -144,8 +144,10 @@ export abstract class ViewContainerRef {
*/ */
abstract detach(index?: number): ViewRef|null; abstract detach(index?: number): ViewRef|null;
/** @internal */ /**
/** @nocollapse */ * @internal
* @nocollapse
*/
static __NG_ELEMENT_ID__: static __NG_ELEMENT_ID__:
() => ViewContainerRef = () => SWITCH_VIEW_CONTAINER_REF_FACTORY(ViewContainerRef, ElementRef) () => ViewContainerRef = () => SWITCH_VIEW_CONTAINER_REF_FACTORY(ViewContainerRef, ElementRef)
} }

View File

@ -374,8 +374,10 @@ export abstract class Renderer2 {
target: 'window'|'document'|'body'|any, eventName: string, target: 'window'|'document'|'body'|any, eventName: string,
callback: (event: any) => boolean | void): () => void; callback: (event: any) => boolean | void): () => void;
/** @internal */ /**
/** @nocollapse */ * @internal
* @nocollapse
*/
static __NG_ELEMENT_ID__: () => Renderer2 = () => SWITCH_RENDERER2_FACTORY(); static __NG_ELEMENT_ID__: () => Renderer2 = () => SWITCH_RENDERER2_FACTORY();
} }