From 871ece6123e205a39b492108697d80d5aaf2e53c Mon Sep 17 00:00:00 2001 From: Martin Probst Date: Thu, 21 Dec 2017 08:42:01 +0100 Subject: [PATCH] fix(animations): renaming issue with DOMAnimation. (#21125) Closure Compiler renames all properties that are "internal" to the program. `DOMAnimation` however is external, it is a browser API, so its fields must not be renamed. This change marks `DOMAnimation` as external using `declare interface`, which will cause Closure Compiler to back off and prevent renaming of any of its fields. PR Close #21125 --- .../browser/src/render/web_animations/dom_animation.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/animations/browser/src/render/web_animations/dom_animation.ts b/packages/animations/browser/src/render/web_animations/dom_animation.ts index 3004695a9e..f1d825af34 100644 --- a/packages/animations/browser/src/render/web_animations/dom_animation.ts +++ b/packages/animations/browser/src/render/web_animations/dom_animation.ts @@ -6,7 +6,15 @@ * found in the LICENSE file at https://angular.io/license */ -export interface DOMAnimation { +/** + * DOMAnimation represents the Animation Web API. + * + * It is an external API by the browser, and must thus use "declare interface", + * to prevent renaming by Closure Compiler. + * + * @see https://developer.mozilla.org/de/docs/Web/API/Animation + */ +export declare interface DOMAnimation { cancel(): void; play(): void; pause(): void;