forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamp.extern.js
839 lines (722 loc) · 20.4 KB
/
amp.extern.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
/**
* Copyright 2016 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** @externs */
/**
* The "init" argument of the Fetch API. Externed due to being passes across
* component/runtime boundary.
*
* Currently, only "credentials: include" is implemented.
*
* Note ampCors === false indicates that __amp_source_origin should not be
* appended to the URL to allow for potential caching or response across pages.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalFetch/fetch
*
* @typedef {{
* body: (!JsonObject|!FormData|!FormDataWrapperInterface|undefined|string),
* cache: (string|undefined),
* credentials: (string|undefined),
* headers: (!JsonObject|undefined),
* method: (string|undefined),
* ampCors: (boolean|undefined),
* prerenderSafe: (boolean|undefined),
* bypassInterceptorForDev: (boolean|undefined)
* }}
*/
var FetchInitDef;
/**
* Externed due to being passed across component/runtime boundary.
* @typedef {{xhrUrl: string, fetchOpt: !FetchInitDef}}
*/
var FetchRequestDef;
/** @constructor */
var FormDataWrapperInterface = function() {};
FormDataWrapperInterface.prototype.entries = function() {};
FormDataWrapperInterface.prototype.getFormData = function() {};
FormData.prototype.entries = function () {};
/**
* A type for Objects that can be JSON serialized or that come from
* JSON serialization. Requires the objects fields to be accessed with
* bracket notation object['name'] to make sure the fields do not get
* obfuscated.
* @constructor
* @dict
*/
function JsonObject() {}
/**
* Force the dataset property to be handled as a JsonObject.
* @type {!JsonObject}
*/
Element.prototype.dataset;
/**
* - n is the name.
* - f is the function body of the extension.
* - p is the priority. Only supported value is "high".
* high means, that the extension is not subject to chunking.
* This should be used for work, that should always happen
* as early as possible. Currently this is primarily used
* for viewer communication setup.
* - v is the release version
* @constructor @struct
*/
function ExtensionPayload() {}
/** @type {string} */
ExtensionPayload.prototype.n;
/** @type {function(!Object,!Object)} */
ExtensionPayload.prototype.f;
/** @type {string|undefined} */
ExtensionPayload.prototype.p;
/** @type {string} */
ExtensionPayload.prototype.v;
/** @type {!Array<string>|string|undefined} */
ExtensionPayload.prototype.i;
/**
* @typedef {?JsonObject|undefined|string|number|!Array<JsonValue>}
*/
var JsonValue;
/**
* @constructor
* @dict
*/
function VideoAnalyticsDetailsDef() {};
/** @type {boolean} */
VideoAnalyticsDetailsDef.prototype.autoplay;
/** @type {number} */
VideoAnalyticsDetailsDef.prototype.currentTime;
/** @type {number} */
VideoAnalyticsDetailsDef.prototype.duration;
/** @type {number} */
VideoAnalyticsDetailsDef.prototype.height;
/** @type {string} */
VideoAnalyticsDetailsDef.prototype.id;
/** @type {string} */
VideoAnalyticsDetailsDef.prototype.playedRangesJson;
/** @type {number} */
VideoAnalyticsDetailsDef.prototype.playedTotal;
/** @type {boolean} */
VideoAnalyticsDetailsDef.prototype.muted;
/** @type {string} */
VideoAnalyticsDetailsDef.prototype.state;
/** @type {number} */
VideoAnalyticsDetailsDef.prototype.width;
// Node.js global
var process = {};
process.env;
process.env.NODE_ENV;
process.env.SERVE_MODE;
/** @type {boolean|undefined} */
window.IS_AMP_ALT;
// Exposed to ads.
// Preserve these filedNames so they can be accessed by 3p code.
window.context = {};
window.context.sentinel;
window.context.clientId;
window.context.initialLayoutRect;
window.context.initialIntersection;
window.context.sourceUrl;
window.context.experimentToggles;
window.context.master;
window.context.isMaster;
window.context.ampcontextVersion;
window.context.ampcontextFilepath
window.context.canary;
window.context.canonicalUrl;
window.context.consentSharedData;
window.context.container;
window.context.domFingerprint;
window.context.hidden;
window.context.initialConsentState;
window.context.initialConsentValue;
window.context.location;
window.context.mode;
window.context.pageViewId;
window.context.referrer;
window.context.sourceUrl;
window.context.startTime;
window.context.tagName;
// Service Holder
window.services;
// Safeframe
// TODO(bradfrizzell) Move to its own extern. Not relevant to all AMP.
/* @type {?Object} */
window.sf_ = {};
/* @type {?Object} */
window.sf_.cfg;
// Exposed to custom ad iframes.
/* @type {!Function} */
window.draw3p;
// AMP's globals
window.AMP_TEST;
window.AMP_TEST_IFRAME;
window.AMP_TAG;
window.AMP = {};
window.AMP._ = {};
window.AMP.push;
window.AMP.title;
window.AMP.canonicalUrl;
window.AMP.extension;
window.AMP.ampdoc;
window.AMP.config;
window.AMP.config.urls;
window.AMP.BaseElement;
window.AMP.BaseTemplate;
window.AMP.registerElement;
window.AMP.registerTemplate;
window.AMP.registerServiceForDoc;
window.AMP.isExperimentOn;
window.AMP.toggleExperiment;
window.AMP.setLogLevel;
window.AMP.setTickFunction;
window.AMP.viewer;
window.AMP.viewport = {};
window.AMP.viewport.getScrollLeft;
window.AMP.viewport.getScrollWidth;
window.AMP.viewport.getWidth;
window.AMP.attachShadowDoc;
window.AMP.attachShadowDocAsStream;
window.__AMP_TOP;
window.__AMP_PARENT;
/** @constructor */
function AmpConfigType() {}
/* @public {string} */
AmpConfigType.prototype.thirdPartyUrl;
/* @public {string} */
AmpConfigType.prototype.thirdParty;
/* @public {string} */
AmpConfigType.prototype.thirdPartyFrameHost;
/* @public {string} */
AmpConfigType.prototype.thirdPartyFrameRegex;
/* @public {string} */
AmpConfigType.prototype.errorReporting;
/* @public {string} */
AmpConfigType.prototype.cdn;
/* @public {string} */
AmpConfigType.prototype.cdnUrl;
/* @public {string} */
AmpConfigType.prototype.errorReportingUrl;
/* @public {string} */
AmpConfigType.prototype.localDev;
/* @public {string} */
AmpConfigType.prototype.v;
/* @public {boolean} */
AmpConfigType.prototype.canary;
/* @public {string} */
AmpConfigType.prototype.runtime;
/* @public {boolean} */
AmpConfigType.prototype.test;
/* @public {string|undefined} */
AmpConfigType.prototype.spt;
/** @type {!AmpConfigType} */
window.AMP_CONFIG;
window.AMP_CONTEXT_DATA;
/** @constructor @struct */
function AmpViewerMessage() {}
/** @public {string} */
AmpViewerMessage.prototype.app;
/** @public {string} */
AmpViewerMessage.prototype.type;
/** @public {number} */
AmpViewerMessage.prototype.requestid;
/** @public {string} */
AmpViewerMessage.prototype.name;
/** @public {*} */
AmpViewerMessage.prototype.data;
/** @public {boolean|undefined} */
AmpViewerMessage.prototype.rsvp;
/** @public {string|undefined} */
AmpViewerMessage.prototype.error;
// AMP-Analytics Cross-domain iframes
let IframeTransportEvent;
/** @constructor @struct */
function IframeTransportContext() {}
IframeTransportContext.onAnalyticsEvent;
IframeTransportContext.sendResponseToCreative;
/** @typedef {function(!JsonObject)} */
let VegaChartFactory;
// amp-viz-vega related externs.
/**
* @typedef {{spec: function(!JsonObject, function(?Error, !VegaChartFactory))}}
*/
let VegaParser;
/**
* @typedef {{parse: VegaParser}}
*/
let VegaObject;
/* @type {!VegaObject} */
window.vg;
// amp-date-picker externs
/**
* @type {function(*)}
*/
let ReactRender = function() {};
let RRule;
/**
* @param {Date} unusedDt
* @param {boolean} unusedInc
* @return {?Date}
*/
RRule.prototype.before = function(unusedDt, unusedInc) {};
/**
* @param {Date} unusedDt
* @param {boolean} unusedInc
* @return {?Date}
*/
RRule.prototype.after = function(unusedDt, unusedInc) {};
/**
* @dict
*/
let PropTypes = {};
/**
* @@dict
*/
let ReactDates = {};
/** @constructor */
ReactDates.DayPickerSingleDateController;
/** @dict */
ReactDates.DayPickerRangeController;
/** @type {function(*):boolean} */
ReactDates.isInclusivelyAfterDay;
/** @type {function(*):boolean} */
ReactDates.isInclusivelyBeforeDay;
/** @type {function(*,*):boolean} */
ReactDates.isSameDay;
/**
* @dict
*/
let ReactDatesConstants = {};
/** @const {string} */
ReactDatesConstants.ANCHOR_LEFT;
/** @const {string} */
ReactDatesConstants.HORIZONTAL_ORIENTATION;
// amp-inputmask externs
/**
* @constructor
*/
var Inputmask = class {};
/** @param {!Object} unusedOpts */
Inputmask.extendAliases = function (unusedOpts) {};
/** @param {!Object} unusedOpts */
Inputmask.extendDefaults = function (unusedOpts) {};
/** @param {!Element} unusedElement */
Inputmask.prototype.mask = function (unusedElement) {};
Inputmask.prototype.remove = function () {};
/** @dict */
window.AMP.dependencies = {};
/**
* @param {!Element} unusedElement
* @return {!Inputmask}
*/
window.AMP.dependencies.inputmaskFactory = function(unusedElement) {};
// Should have been defined in the closure compiler's extern file for
// IntersectionObserverEntry, but appears to have been omitted.
IntersectionObserverEntry.prototype.rootBounds;
// TODO (remove after we update closure compiler externs)
window.PerformancePaintTiming;
window.PerformanceObserver;
Object.prototype.entryTypes
/** @typedef {number} */
var time;
/**
* This type signifies a callback that can be called to remove the listener.
* @typedef {function()}
*/
var UnlistenDef;
/**
* Just an element, but used with AMP custom elements..
* @typedef {!Element}
*/
var AmpElement;
/** @return {!Signals} */
AmpElement.prototype.signals = function() {};
var Signals = class {};
/**
* @param {string} unusedName
* @return {number|!Error|null}
*/
Signals.prototype.get = function(unusedName) {};
/**
* @param {string} unusedName
* @return {!Promise<time>}
*/
Signals.prototype.whenSignal = function(unusedName) {};
/**
* @param {string} unusedName
* @param {time=} unusedOpt_time
*/
Signals.prototype.signal = function(unusedName, unusedOpt_time) {};
/**
* @param {string} unusedName
* @param {!Error} unusedError
*/
Signals.prototype.rejectSignal = function(unusedName, unusedError) {};
/** @param {string} unusedName */
Signals.prototype.reset = function(unusedName) {};
// Temp until we figure out forward declarations
/** @constructor */
var AccessService = function() {};
/** @constructor @struct */
var UserNotificationManager = function() {};
UserNotificationManager.prototype.get;
/** @constructor @struct */
var Cid = function() {};
/** @constructor @struct */
var Activity = function() {};
/** @constructor */
var AmpStoryVariableService = function() {};
// data
var data;
data.tweetid;
data.requestedHeight;
data.requestedWidth;
data.pageHidden;
data.changes;
data._context;
data.inViewport;
data.numposts;
data.orderBy;
data.colorscheme;
data.tabs;
data.hideCover;
data.hideCta;
data.smallHeader;
data.showFacepile;
data.showText;
data.productId;
data.imageUrl;
data.yotpoElementId;
data.backgroudColor;
data.reviewIds;
data.showBottomLine;
data.autoplayEnabled;
data.autoplaySpeed;
data.showNavigation;
data.layoutScroll;
data.spacing;
data.hoverColor;
data.hoverOpacity;
data.hoverIcon;
data.ctaText;
data.ctaColor;
data.appKey;
data.widgetType;
data.layoutRows;
data.demo;
data.uploadButton;
data.reviews;
data.headerText;
data.headerBackgroundColor;
data.bodyBackgroundColor;
data.data.fontColor;
data.width;
data.sitekey;
data.fortesting;
// 3p code
var twttr;
twttr.events;
twttr.events.bind;
twttr.widgets;
twttr.widgets.createTweet;
twttr.widgets.createMoment;
twttr.widgets.createTimeline;
var FB;
FB.init;
var gist;
gist.gistid;
var bodymovin;
bodymovin.loadAnimation;
var animationHandler;
animationHandler.play;
animationHandler.pause;
animationHandler.stop;
animationHandler.goToAndStop;
animationHandler.totalFrames;
var grecaptcha;
grecaptcha.execute;
// Validator
var amp;
amp.validator;
amp.validator.validateUrlAndLog = function(string, doc, filter) {}
// Temporary Access types (delete when amp-access is compiled
// for type checking).
Activity.prototype.getTotalEngagedTime = function() {};
Activity.prototype.getIncrementalEngagedTime = function(name, reset) {};
AccessService.prototype.getAccessReaderId = function() {};
AccessService.prototype.getAuthdataField = function(field) {};
// Same for amp-analytics
/**
* The "get CID" parameters.
* - createCookieIfNotPresent: Whether CID is allowed to create a cookie when.
* Default value is `false`.
* @typedef {{
* scope: string,
* createCookieIfNotPresent: (boolean|undefined),
* }}
*/
var GetCidDef;
/**
* @param {string|!GetCidDef} externalCidScope Name of the fallback cookie
* for the case where this doc is not served by an AMP proxy. GetCidDef
* structure can also instruct CID to create a cookie if one doesn't yet
* exist in a non-proxy case.
* @param {!Promise} consent Promise for when the user has given consent
* (if deemed necessary by the publisher) for use of the client
* identifier.
* @param {!Promise=} opt_persistenceConsent Dedicated promise for when
* it is OK to persist a new tracking identifier. This could be
* supplied ONLY by the code that supplies the actual consent
* cookie.
* If this is given, the consent param should be a resolved promise
* because this call should be only made in order to get consent.
* The consent promise passed to other calls should then itself
* depend on the opt_persistenceConsent promise (and the actual
* consent, of course).
* @return {!Promise<?string>} A client identifier that should be used
* within the current source origin and externalCidScope. Might be
* null if no identifier was found or could be made.
* This promise may take a long time to resolve if consent isn't
* given.
*/
Cid.prototype.get = function(
externalCidScope, consent, opt_persistenceConsent) {}
AmpStoryVariableService.prototype.onStateChange = function(event) {};
AmpStoryVariableService.pageIndex;
AmpStoryVariableService.pageId;
var AMP = {};
window.AMP;
// Externed explicitly because we do not export Class shaped names
// by default.
/**
* This uses the internal name of the type, because there appears to be no
* other way to reference an ES6 type from an extern that is defined in
* the app.
* @constructor @struct
* @extends {BaseElement$$module$src$base_element}
*/
AMP.BaseElement = class {
/** @param {!AmpElement} element */
constructor(element) {}
};
/**
* This uses the internal name of the type, because there appears to be no
* other way to reference an ES6 type from an extern that is defined in
* the app.
* @constructor @struct
* @extends {AmpAdXOriginIframeHandler$$module$extensions$amp_ad$0_1$amp_ad_xorigin_iframe_handler}
*/
AMP.AmpAdXOriginIframeHandler = class {
/**
* @param {!AmpAd3PImpl$$module$extensions$amp_ad$0_1$amp_ad_3p_impl|!AmpA4A$$module$extensions$amp_a4a$0_1$amp_a4a} baseInstance
*/
constructor(baseInstance) {}
};
/**
* This uses the internal name of the type, because there appears to be no
* other way to reference an ES6 type from an extern that is defined in
* the app.
* @constructor @struct
* @extends {AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui}
*/
AMP.AmpAdUIHandler = class {
/**
* @param {!AMP.BaseElement} baseInstance
*/
constructor(baseInstance) {}
};
AMP.BaseTemplate;
AMP.RealTimeConfigManager;
/**
* Actual filled values for this exists in
* extensions/amp-a4a/0.1/real-time-config-manager.js
* @enum {string}
*/
const RTC_ERROR_ENUM = {};
/** @typedef {{
response: (Object|undefined),
rtcTime: number,
callout: string,
error: (RTC_ERROR_ENUM|undefined)}} */
var rtcResponseDef;
/**
* This symbol is exposed by browserify bundles transformed by
* `scoped-require.js` to avoid polluting the global namespace with `require`.
* It allows AMP extensions to consume code injected into their binaries that
* cannot be run through Closure Compiler, e.g. React code with JSX.
* @type {!function(string):?}
*/
AMP.require;
/**
* TransitionDef function that accepts normtime, typically between 0 and 1 and
* performs an arbitrary animation action. Notice that sometimes normtime can
* dip above 1 or below 0. This is an acceptable case for some curves. The
* second argument is a boolean value that equals "true" for the completed
* transition and "false" for ongoing.
* @typedef {function(number, boolean):?|function(number):?}
*/
var TransitionDef;
///////////////////
// amp-bind externs
///////////////////
/**
* @typedef {{method: string, args: !Array, scope: number, id: number}}
*/
let ToWorkerMessageDef;
/**
* @typedef {{method: string, returnValue: *, id: number}}
*/
let FromWorkerMessageDef;
/**
* Structured cloneable representation of an <amp-bind-macro> element.
* @typedef {{id: string, argumentNames: Array<string>, expressionString: string}}
*/
let BindMacroDef;
/**
* Structured cloneable representation of a binding e.g. <p [text]="foo>.
* @typedef {{tagName: string, property: string, expressionString: string}}
*/
let BindBindingDef;
/**
* Structured cloneable representation of a JS error.
* @typedef {{message: string, stack: string}}
*/
let BindEvaluatorErrorDef;
/**
* Possible types of an amp-bind expression result.
* @typedef {(null|boolean|string|number|Array|Object)}
*/
let BindExpressionResultDef;
/**
* Structured cloneable return value for 'bind.evaluateBindings' API.
* @typedef {{results: !Object<string, BindExpressionResultDef>, errors: !Object<string, !BindEvaluatorErrorDef>}}
*/
let BindEvaluateBindingsResultDef;
/**
* Structured cloneable return value for 'bind.evaluateExpression' API.
* @typedef {{result: BindExpressionResultDef, error: ?BindEvaluatorErrorDef}}
*/
let BindEvaluateExpressionResultDef;
/**
* Options for Bind.rescan().
* @typedef {{update: (boolean|undefined), fast: (boolean|undefined), timeout: (number|undefined)}}
*/
let BindRescanOptionsDef;
/////////////////////////////
////// Web Anmomation externs
/////////////////////////////
/**
* @typedef {
* !WebMultiAnimationDef|
* !WebSwitchAnimationDef|
* !WebCompAnimationDef|
* !WebKeyframeAnimationDef
* }
*/
var WebAnimationDef;
/**
* @mixes WebAnimationSelectorDef
* @mixes WebAnimationTimingDef
* @mixes WebAnimationVarsDef
* @mixes WebAnimationConditionalDef
* @typedef {{
* animations: !Array<!WebAnimationDef>,
* }}
*/
var WebMultiAnimationDef;
/**
* @mixes WebAnimationSelectorDef
* @mixes WebAnimationTimingDef
* @mixes WebAnimationVarsDef
* @mixes WebAnimationConditionalDef
* @typedef {{
* switch: !Array<!WebAnimationDef>,
* }}
*/
var WebSwitchAnimationDef;
/**
* @mixes WebAnimationSelectorDef
* @mixes WebAnimationTimingDef
* @mixes WebAnimationVarsDef
* @mixes WebAnimationConditionalDef
* @typedef {{
* animation: string,
* }}
*/
var WebCompAnimationDef;
/**
* @mixes WebAnimationSelectorDef
* @mixes WebAnimationTimingDef
* @mixes WebAnimationVarsDef
* @mixes WebAnimationConditionalDef
* @typedef {{
* keyframes: (string|!WebKeyframesDef),
* }}
*/
var WebKeyframeAnimationDef;
/**
* @typedef {!Object<string, *>|!Array<!Object<string, *>>}
*/
var WebKeyframesDef;
/**
* See https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffectTimingProperties
*
* @mixin
* @typedef {{
* duration: (time|undefined),
* delay: (time|undefined),
* endDelay: (time|undefined),
* iterations: (number|string|undefined),
* iterationStart: (number|undefined),
* easing: (string|undefined),
* direction: (?|undefined),
* fill: (?|undefined),
* }}
*/
var WebAnimationTimingDef;
/**
* Indicates an extension to a type that allows specifying vars. Vars are
* specified as properties with the name in the format of `--varName`.
*
* @mixin
* @typedef {Object}
*/
var WebAnimationVarsDef;
/**
* Defines media parameters for an animation.
*
* @mixin
* @typedef {{
* media: (string|undefined),
* supports: (string|undefined),
* }}
*/
var WebAnimationConditionalDef;
/**
* @typedef {{
* target: (!Element|undefined),
* selector: (string|undefined),
* subtargets: (!Array<!WebAnimationSubtargetDef>|undefined),
* }}
*/
var WebAnimationSelectorDef;
/**
* @mixes WebAnimationTimingDef
* @mixes WebAnimationVarsDef
* @typedef {{
* matcher: (function(!Element, number):boolean|undefined),
* index: (number|undefined),
* selector: (string|undefined),
* }}
*/
var WebAnimationSubtargetDef;