|
| 1 | +/* |
| 2 | + * Copyright 2017 The Closure Compiler Authors. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +/** |
| 18 | + * @fileoverview Externs for jQuery 3.1 |
| 19 | + * |
| 20 | + * Note that some functions use different return types depending on the number |
| 21 | + * of parameters passed in. In these cases, you may need to annotate the type |
| 22 | + * of the result in your code, so the JSCompiler understands which type you're |
| 23 | + * expecting. For example: |
| 24 | + * <code>var elt = /** @type {Element} * / (foo.get(0));</code> |
| 25 | + * |
| 26 | + * @see http://api.jquery.com/ |
| 27 | + * @externs |
| 28 | + */ |
| 29 | + |
| 30 | +/** |
| 31 | + * @typedef {(Window|Document|Element|Array<Element>|string|jQuery| |
| 32 | + * NodeList)} |
| 33 | + */ |
| 34 | +var jQuerySelector; |
| 35 | + |
| 36 | +/** |
| 37 | + * @constructor |
| 38 | + * @param {(jQuerySelector|Object|function())=} arg1 |
| 39 | + * @param {(Element|jQuery|Document| |
| 40 | + * Object<string, (string|function(!jQuery.Event))>)=} arg2 |
| 41 | + * @throws {Error} on invalid selector |
| 42 | + * @return {!jQuery} |
| 43 | + * @implements {Iterable} |
| 44 | + */ |
| 45 | +function jQuery(arg1, arg2) { }; |
| 46 | + |
| 47 | +/** |
| 48 | + * @const |
| 49 | + */ |
| 50 | +var $ = jQuery; |
| 51 | + |
| 52 | +/** |
| 53 | + * @param {(string|jQueryAjaxSettings|Object<string,*>)} arg1 |
| 54 | + * @param {(jQueryAjaxSettings|Object<string, *>)=} settings |
| 55 | + * @return {!jQuery.jqXHR} |
| 56 | + */ |
| 57 | +jQuery.ajax = function (arg1, settings) { }; |
| 58 | + |
| 59 | +/** |
| 60 | + * @param {string} str |
| 61 | + * @return {string} |
| 62 | + * @nosideeffects |
| 63 | + */ |
| 64 | +jQuery.trim = function (str) { }; |
| 65 | + |
0 commit comments