Permalink
Browse files

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
  • Loading branch information...
mprobst authored and IgorMinar committed Dec 21, 2017
1 parent 6353b77 commit d1f45002d3d0aea3003b49f918393c45fa778773
Showing with 9 additions and 1 deletion.
  1. +9 −1 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;

0 comments on commit d1f4500

Please sign in to comment.