Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update externs for 2017-era implementations #173

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 31 additions & 59 deletions externs/web-animations-next.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,55 +16,51 @@


/**
* @fileoverview Basic externs for the Web Animations API (Level 2 / Groups).
* This is not intended to be exhaustive, and requires the base externs from
* web-animations.js.
* @fileoverview Externs for the Web Animations API (Level 2 / Groups).
*
* This defines externs for the "-next" version of the Web Animations API
* polyfill found online at:
* https://github.com/web-animations/web-animations.js
*
* These features are NOT natively implemented in browsers and are not clearly
* part of the official spec. This is NOT intended to be exhaustive, and
* requires the base externs from web-animations.js.
*
* @externs
*/


/**
* @interface
*/
var AnimationEffectReadOnly = function() {};
/** @type {Element} */
KeyframeEffectReadOnly.prototype.target;

/** @type {!AnimationEffectTiming} */
AnimationEffectReadOnly.prototype.timing;
/** @type {?function(number, !KeyframeEffect, !Animation)|undefined} */
KeyframeEffectReadOnly.prototype.onsample;


/**
* @param {Element} target
* @param {!Array<!Object>} frames
* @param {(number|AnimationEffectTimingProperties)=} opt_options
* @constructor
* @implements {AnimationEffectReadOnly}
* @param {!AnimationEffectReadOnly} effect
* @return {!Animation}
*/
var KeyframeEffect = function(target, frames, opt_options) {};
DocumentTimeline.prototype.play = function(effect) {};

/**
* @return {!Array<!Object>}
* @return {!Array<!Animation>}
*/
KeyframeEffect.prototype.getFrames = function() {};

/** @type {!AnimationEffectTiming} */
KeyframeEffect.prototype.timing;

/** @type {Element} */
KeyframeEffect.prototype.target;

/** @type {?function(number, !KeyframeEffect, !Animation)} */
KeyframeEffect.prototype.onsample;
DocumentTimeline.prototype.getAnimations = function() {};


/**
* @param {!Array<!AnimationEffectReadOnly>} children
* @param {AnimationEffectTimingProperties=} opt_timing
* @param {AnimationEffectTimingProperties=} timing
* @constructor
* @implements {AnimationEffectReadOnly}
*/
var SequenceEffect = function(children, opt_timing) {};
var SequenceEffect = function(children, timing) {};

/** @type {!AnimationEffectTiming} */
/** @override */
SequenceEffect.prototype.getComputedTiming = function() {};

/** @override */
SequenceEffect.prototype.timing;

/** @type {!Array<!AnimationEffectReadOnly>} */
Expand All @@ -73,41 +69,17 @@ SequenceEffect.prototype.children;

/**
* @param {!Array<!AnimationEffectReadOnly>} children
* @param {AnimationEffectTimingProperties=} opt_timing
* @param {AnimationEffectTimingProperties=} timing
* @constructor
* @implements {AnimationEffectReadOnly}
*/
var GroupEffect = function(children, opt_timing) {};
var GroupEffect = function(children, timing) {};

/** @override */
GroupEffect.prototype.getComputedTiming = function() {};

/** @type {!AnimationEffectTiming} */
/** @override */
GroupEffect.prototype.timing;

/** @type {!Array<!AnimationEffectReadOnly>} */
GroupEffect.prototype.children;


/**
* @interface
*/
var AnimationTimeline = function() {};

/** @type {?number} */
AnimationTimeline.prototype.currentTime;

/**
* @param {!AnimationEffectReadOnly} effect
* @return {!Animation}
*/
AnimationTimeline.prototype.play = function(effect) {};

/**
* @interface
* @extends {AnimationTimeline}
*/
var DocumentTimeline = function() {};

/** @type {AnimationEffectReadOnly|undefined} */
Animation.prototype.effect;

/** @type {!DocumentTimeline} */
Document.prototype.timeline;
Loading