
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
28 lines
747 B
TypeScript
28 lines
747 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
/**
|
|
* 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;
|
|
finish(): void;
|
|
onfinish: Function;
|
|
position: number;
|
|
currentTime: number;
|
|
addEventListener(eventName: string, handler: (event: any) => any): any;
|
|
dispatchEvent(eventName: string): any;
|
|
}
|