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
This commit is contained in:
Martin Probst 2017-12-21 08:42:01 +01:00 committed by Igor Minar
parent abca7c0243
commit 871ece6123
1 changed files with 9 additions and 1 deletions

View File

@ -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;