mirror of
https://github.com/github/codeql.git
synced 2026-05-16 04:09:27 +02:00
Compare commits
1 Commits
codeql-cli
...
updateExte
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73e6550fd0 |
@@ -27,26 +27,34 @@
|
||||
|
||||
// START ES6 RETROFIT CODE
|
||||
// symbol, Symbol and Symbol.iterator are actually ES6 types but some
|
||||
// Some types require them to be part of their definition (such as Array).
|
||||
// base types require them to be part of their definition (such as Array).
|
||||
|
||||
|
||||
// TODO(johnlenz): symbol should be a primitive type.
|
||||
/** @typedef {?} */
|
||||
var symbol;
|
||||
|
||||
/**
|
||||
* @param {string=} opt_description
|
||||
* @constructor
|
||||
* @param {*=} opt_description
|
||||
* @return {symbol}
|
||||
* @nosideeffects
|
||||
* Note: calling `new Symbol('x');` will always throw, but we mark this
|
||||
* nosideeffects because the compiler does not promise to preserve all coding
|
||||
* errors.
|
||||
*/
|
||||
function Symbol(opt_description) {}
|
||||
|
||||
|
||||
/**
|
||||
* @const {string|undefined}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/description
|
||||
*/
|
||||
Symbol.prototype.description;
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} sym
|
||||
* @return {symbol|undefined}
|
||||
* @return {symbol}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/for
|
||||
*/
|
||||
Symbol.for;
|
||||
Symbol.for = function(sym) {};
|
||||
|
||||
|
||||
/**
|
||||
@@ -54,18 +62,87 @@ Symbol.for;
|
||||
* @return {string|undefined}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/keyFor
|
||||
*/
|
||||
Symbol.keyFor;
|
||||
Symbol.keyFor = function(sym) {};
|
||||
|
||||
|
||||
// Well known symbols
|
||||
|
||||
/** @const {symbol} */
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator
|
||||
* @const {symbol}
|
||||
*/
|
||||
Symbol.asyncIterator;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance
|
||||
* @const {symbol}
|
||||
*/
|
||||
Symbol.hasInstance;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/isConcatSpreadable
|
||||
* @const {symbol}
|
||||
*/
|
||||
Symbol.isConcatSpreadable;
|
||||
|
||||
/**
|
||||
* @const {symbol}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/iterator
|
||||
*/
|
||||
Symbol.iterator;
|
||||
|
||||
/** @const {symbol} */
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/match
|
||||
* @const {symbol}
|
||||
*/
|
||||
Symbol.match;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/matchAll
|
||||
* @const {symbol}
|
||||
*/
|
||||
Symbol.matchAll;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/replace
|
||||
* @const {symbol}
|
||||
*/
|
||||
Symbol.replace;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search
|
||||
* @const {symbol}
|
||||
*/
|
||||
Symbol.search;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/species
|
||||
* @const {symbol}
|
||||
*/
|
||||
Symbol.species;
|
||||
|
||||
// /**
|
||||
// * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/split
|
||||
// * @const {symbol}
|
||||
// */
|
||||
// Symbol.split;
|
||||
|
||||
/**
|
||||
* @const {symbol}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toPrimitive
|
||||
*/
|
||||
Symbol.toPrimitive;
|
||||
|
||||
/**
|
||||
* @const {symbol}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag
|
||||
*/
|
||||
Symbol.toStringTag;
|
||||
|
||||
/** @const {symbol} */
|
||||
/**
|
||||
* @const {symbol}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables
|
||||
*/
|
||||
Symbol.unscopables;
|
||||
|
||||
|
||||
@@ -89,9 +166,10 @@ IIterableResult.prototype.value;
|
||||
*/
|
||||
function Iterable() {}
|
||||
|
||||
// TODO(johnlenz): remove this when the compiler understands "symbol" natively
|
||||
// TODO(johnlenz): remove the suppression when the compiler understands
|
||||
// "symbol" natively
|
||||
/**
|
||||
* @return {Iterator<VALUE>}
|
||||
* @return {!Iterator<VALUE, ?, *>}
|
||||
* @suppress {externsValidation}
|
||||
*/
|
||||
Iterable.prototype[Symbol.iterator] = function() {};
|
||||
@@ -99,23 +177,26 @@ Iterable.prototype[Symbol.iterator] = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* TODO(b/142881197): UNUSED_RETURN_T and UNUSED_NEXT_T are not yet used for
|
||||
* anything. https://github.com/google/closure-compiler/issues/3489
|
||||
* @interface
|
||||
* @template VALUE
|
||||
* @template VALUE, UNUSED_RETURN_T, UNUSED_NEXT_T
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol
|
||||
*/
|
||||
function Iterator() {}
|
||||
|
||||
/**
|
||||
* @param {VALUE=} value
|
||||
* @param {?=} opt_value
|
||||
* @return {!IIterableResult<VALUE>}
|
||||
*/
|
||||
Iterator.prototype.next;
|
||||
Iterator.prototype.next = function(opt_value) {};
|
||||
|
||||
|
||||
/**
|
||||
* Use this to indicate a type is both an Iterator and an Iterable.
|
||||
*
|
||||
* @interface
|
||||
* @extends {Iterator<T>}
|
||||
* @extends {Iterator<T, ?, *>}
|
||||
* @extends {Iterable<T>}
|
||||
* @template T
|
||||
*/
|
||||
@@ -126,7 +207,7 @@ function IteratorIterable() {}
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @template KEY1, VALUE1
|
||||
* @template IOBJECT_KEY, IOBJECT_VALUE
|
||||
*/
|
||||
function IObject() {}
|
||||
|
||||
@@ -142,8 +223,8 @@ IArrayLike.prototype.length;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {IArrayLike<T>}
|
||||
* @template T
|
||||
* @implements {IArrayLike<?>}
|
||||
* @implements {Iterable<?>}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments
|
||||
*/
|
||||
function Arguments() {}
|
||||
@@ -170,10 +251,12 @@ Arguments.prototype.caller;
|
||||
Arguments.prototype.length;
|
||||
|
||||
/**
|
||||
* Not actually a global variable, but we need it in order for the current type
|
||||
* checker to typecheck the "arguments" variable in a function correctly.
|
||||
* TODO(tbreisacher): When the old type checker is gone, delete this and add
|
||||
* an 'arguments' variable of type Array<string> in the d8 externs.
|
||||
* Not actually a global variable, when running in a browser environment. But
|
||||
* we need it in order for the type checker to typecheck the "arguments"
|
||||
* variable in a function correctly.
|
||||
*
|
||||
* TODO(tbreisacher): There should be a separate 'arguments' variable of type
|
||||
* `Array<string>`, in the d8 externs.
|
||||
*
|
||||
* @type {!Arguments}
|
||||
* @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments
|
||||
@@ -204,7 +287,7 @@ var undefined;
|
||||
/**
|
||||
* @param {string} uri
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
* @throws {URIError} when used wrongly.
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI
|
||||
*/
|
||||
function decodeURI(uri) {}
|
||||
@@ -212,7 +295,7 @@ function decodeURI(uri) {}
|
||||
/**
|
||||
* @param {string} uri
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
* @throws {URIError} when used wrongly.
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent
|
||||
*/
|
||||
function decodeURIComponent(uri) {}
|
||||
@@ -220,7 +303,8 @@ function decodeURIComponent(uri) {}
|
||||
/**
|
||||
* @param {string} uri
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
* @throws {URIError} if one attempts to encode a surrogate which is not part of
|
||||
* a high-low pair.
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI
|
||||
*/
|
||||
function encodeURI(uri) {}
|
||||
@@ -228,7 +312,8 @@ function encodeURI(uri) {}
|
||||
/**
|
||||
* @param {string} uri
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
* @throws {URIError} if one attempts to encode a surrogate which is not part of
|
||||
* a high-low pair.
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
|
||||
*/
|
||||
function encodeURIComponent(uri) {}
|
||||
@@ -278,9 +363,9 @@ function isNaN(num) {}
|
||||
function parseFloat(num) {}
|
||||
|
||||
/**
|
||||
* Parse an integer. Use of {@code parseInt} without {@code base} is strictly
|
||||
* Parse an integer. Use of `parseInt` without `base` is strictly
|
||||
* banned in Google. If you really want to parse octal or hex based on the
|
||||
* leader, then pass {@code undefined} as the base.
|
||||
* leader, then pass `undefined` as the base.
|
||||
*
|
||||
* @param {*} num
|
||||
* @param {number|undefined} base
|
||||
@@ -290,8 +375,23 @@ function parseFloat(num) {}
|
||||
*/
|
||||
function parseInt(num, base) {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} code
|
||||
* Represents a string of JavaScript code that is known to have come from a
|
||||
* trusted source. Part of Trusted Types.
|
||||
*
|
||||
* The main body Trusted Types type definitions reside in the file
|
||||
* `w3c_trusted_types.js`. This definition was placed here so that it would be
|
||||
* accessible to `eval()`.
|
||||
*
|
||||
* @constructor
|
||||
* @see https://w3c.github.io/webappsec-trusted-types/dist/spec/#trusted-script
|
||||
*/
|
||||
function TrustedScript() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {string|!TrustedScript} code
|
||||
* @return {*}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval
|
||||
*/
|
||||
@@ -325,6 +425,7 @@ Object.prototype.constructor = function() {};
|
||||
* @modifies {this}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineGetter
|
||||
* @return {undefined}
|
||||
* @deprecated
|
||||
*/
|
||||
Object.prototype.__defineGetter__ = function(sprop, fun) {};
|
||||
|
||||
@@ -338,6 +439,7 @@ Object.prototype.__defineGetter__ = function(sprop, fun) {};
|
||||
* @modifies {this}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineSetter
|
||||
* @return {undefined}
|
||||
* @deprecated
|
||||
*/
|
||||
Object.prototype.__defineSetter__ = function(sprop, fun) {};
|
||||
|
||||
@@ -369,6 +471,7 @@ Object.prototype.isPrototypeOf = function(other) {};
|
||||
* getter should be returned
|
||||
* @return {Function}
|
||||
* @nosideeffects
|
||||
* @deprecated
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/lookupGetter
|
||||
*/
|
||||
Object.prototype.__lookupGetter__ = function(sprop) {};
|
||||
@@ -381,6 +484,7 @@ Object.prototype.__lookupGetter__ = function(sprop) {};
|
||||
* setter should be returned.
|
||||
* @return {Function}
|
||||
* @nosideeffects
|
||||
* @deprecated
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/lookupSetter
|
||||
*/
|
||||
Object.prototype.__lookupSetter__ = function(sprop) {};
|
||||
@@ -391,6 +495,7 @@ Object.prototype.__lookupSetter__ = function(sprop) {};
|
||||
*
|
||||
* @param {Function} fun
|
||||
* @return {*}
|
||||
* @deprecated
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/noSuchMethod
|
||||
*/
|
||||
Object.prototype.__noSuchMethod__ = function(fun) {};
|
||||
@@ -421,7 +526,7 @@ Object.prototype.__proto__;
|
||||
* for..in loop, with the exception of properties inherited through the
|
||||
* prototype chain.
|
||||
*
|
||||
* @param {string} propertyName
|
||||
* @param {string|symbol} propertyName
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable
|
||||
@@ -455,33 +560,13 @@ Object.prototype.toSource = function() {};
|
||||
Object.prototype.toString = function() {};
|
||||
|
||||
/**
|
||||
* Removes a watchpoint set with the {@see Object.prototype.watch} method.
|
||||
* Mozilla-only.
|
||||
* @param {string} prop The name of a property of the object.
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/unwatch
|
||||
* @return {undefined}
|
||||
*/
|
||||
Object.prototype.unwatch = function(prop) {};
|
||||
|
||||
/**
|
||||
* Returns the object's {@code this} value.
|
||||
* Returns the object's `this` value.
|
||||
* @return {*}
|
||||
* @nosideeffects
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf
|
||||
*/
|
||||
Object.prototype.valueOf = function() {};
|
||||
|
||||
/**
|
||||
* Sets a watchpoint method.
|
||||
* Mozilla-only.
|
||||
* @param {string} prop The name of a property of the object.
|
||||
* @param {Function} handler A function to call.
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch
|
||||
* @return {undefined}
|
||||
*/
|
||||
Object.prototype.watch = function(prop, handler) {};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {...*} var_args
|
||||
@@ -554,7 +639,7 @@ Function.prototype.toString = function() {};
|
||||
* @implements {IArrayLike<T>}
|
||||
* @implements {Iterable<T>}
|
||||
* @param {...*} var_args
|
||||
* @return {!Array<?>}
|
||||
* @return {!Array}
|
||||
* @nosideeffects
|
||||
* @template T
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
|
||||
@@ -605,11 +690,12 @@ Array.prototype.join = function(opt_separator) {};
|
||||
*/
|
||||
Array.prototype.pop = function() {};
|
||||
|
||||
// TODO(bradfordcsmith): remove "undefined" from the var_args of push
|
||||
/**
|
||||
* Mutates an array by appending the given elements and returning the new
|
||||
* length of the array.
|
||||
*
|
||||
* @param {...T} var_args
|
||||
* @param {...(T|undefined)} var_args
|
||||
* @return {number} The new length of the array.
|
||||
* @this {IArrayLike<T>}
|
||||
* @template T
|
||||
@@ -645,9 +731,8 @@ Array.prototype.shift = function() {};
|
||||
/**
|
||||
* Extracts a section of an array and returns a new array.
|
||||
*
|
||||
* @param {*=} opt_begin Zero-based index at which to begin extraction. A
|
||||
* non-number type will be auto-cast by the browser to a number.
|
||||
* @param {*=} opt_end Zero-based index at which to end extraction. slice
|
||||
* @param {?number=} begin Zero-based index at which to begin extraction.
|
||||
* @param {?number=} end Zero-based index at which to end extraction. slice
|
||||
* extracts up to but not including end.
|
||||
* @return {!Array<T>}
|
||||
* @this {IArrayLike<T>|string}
|
||||
@@ -655,12 +740,12 @@ Array.prototype.shift = function() {};
|
||||
* @nosideeffects
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice
|
||||
*/
|
||||
Array.prototype.slice = function(opt_begin, opt_end) {};
|
||||
Array.prototype.slice = function(begin, end) {};
|
||||
|
||||
/**
|
||||
* Sorts the elements of an array in place.
|
||||
*
|
||||
* @param {function(T,T):number=} opt_compareFunction Specifies a function that
|
||||
* @param {function(T,T):number=} opt_compareFn Specifies a function that
|
||||
* defines the sort order.
|
||||
* @this {IArrayLike<T>}
|
||||
* @template T
|
||||
@@ -668,17 +753,16 @@ Array.prototype.slice = function(opt_begin, opt_end) {};
|
||||
* @return {!Array<T>}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
|
||||
*/
|
||||
Array.prototype.sort = function(opt_compareFunction) {};
|
||||
Array.prototype.sort = function(opt_compareFn) {};
|
||||
|
||||
/**
|
||||
* Changes the content of an array, adding new elements while removing old
|
||||
* elements.
|
||||
*
|
||||
* @param {*=} opt_index Index at which to start changing the array. If negative,
|
||||
* will begin that many elements from the end. A non-number type will be
|
||||
* auto-cast by the browser to a number.
|
||||
* @param {*=} opt_howMany An integer indicating the number of old array elements
|
||||
* to remove.
|
||||
* @param {?number=} index Index at which to start changing the array. If
|
||||
* negative, will begin that many elements from the end.
|
||||
* @param {?number=} howMany An integer indicating the number of old array
|
||||
* elements to remove.
|
||||
* @param {...T} var_args
|
||||
* @return {!Array<T>}
|
||||
* @this {IArrayLike<T>}
|
||||
@@ -686,7 +770,7 @@ Array.prototype.sort = function(opt_compareFunction) {};
|
||||
* @template T
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice
|
||||
*/
|
||||
Array.prototype.splice = function(opt_index, opt_howMany, var_args) {};
|
||||
Array.prototype.splice = function(index, howMany, var_args) {};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
@@ -839,75 +923,6 @@ Array.prototype.input;
|
||||
*/
|
||||
Array.prototype.length;
|
||||
|
||||
/**
|
||||
* @param {IArrayLike<T>} arr
|
||||
* @param {?function(this:S, T, number, ?) : ?} callback
|
||||
* @param {S=} opt_context
|
||||
* @return {boolean}
|
||||
* @template T,S
|
||||
*/
|
||||
Array.every = function(arr, callback, opt_context) {};
|
||||
|
||||
/**
|
||||
* @param {IArrayLike<T>} arr
|
||||
* @param {?function(this:S, T, number, ?) : ?} callback
|
||||
* @param {S=} opt_context
|
||||
* @return {!Array<T>}
|
||||
* @template T,S
|
||||
*/
|
||||
Array.filter = function(arr, callback, opt_context) {};
|
||||
|
||||
/**
|
||||
* @param {IArrayLike<T>} arr
|
||||
* @param {?function(this:S, T, number, ?) : ?} callback
|
||||
* @param {S=} opt_context
|
||||
* @template T,S
|
||||
* @return {undefined}
|
||||
*/
|
||||
Array.forEach = function(arr, callback, opt_context) {};
|
||||
|
||||
/**
|
||||
* Mozilla 1.6+ only.
|
||||
* @param {IArrayLike<T>} arr
|
||||
* @param {T} obj
|
||||
* @param {number=} opt_fromIndex
|
||||
* @return {number}
|
||||
* @template T
|
||||
* @nosideeffects
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
|
||||
*/
|
||||
Array.indexOf = function(arr, obj, opt_fromIndex) {};
|
||||
|
||||
/**
|
||||
* Mozilla 1.6+ only.
|
||||
* @param {IArrayLike<T>} arr
|
||||
* @param {T} obj
|
||||
* @param {number=} opt_fromIndex
|
||||
* @return {number}
|
||||
* @template T
|
||||
* @nosideeffects
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf
|
||||
*/
|
||||
Array.lastIndexOf = function(arr, obj, opt_fromIndex) {};
|
||||
|
||||
/**
|
||||
* @param {IArrayLike<T>} arr
|
||||
* @param {?function(this:S, T, number, !Array<T>): R} callback
|
||||
* @param {S=} opt_context
|
||||
* @return {!Array<R>}
|
||||
* @template T,S,R
|
||||
*/
|
||||
Array.map = function(arr, callback, opt_context) {};
|
||||
|
||||
/**
|
||||
* @param {IArrayLike<T>} arr
|
||||
* @param {?function(this:S, T, number, ?) : ?} callback
|
||||
* @param {S=} opt_context
|
||||
* @return {boolean}
|
||||
* @template T,S
|
||||
*/
|
||||
Array.some = function(arr, callback, opt_context) {};
|
||||
|
||||
/**
|
||||
* Introduced in 1.8.5.
|
||||
* @param {*} arr
|
||||
@@ -999,35 +1014,97 @@ Number.prototype.toString = function(opt_radix) {};
|
||||
|
||||
// Properties.
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE
|
||||
*/
|
||||
Number.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE
|
||||
*/
|
||||
Number.MIN_VALUE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN
|
||||
*/
|
||||
Number.NaN;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY
|
||||
*/
|
||||
Number.NEGATIVE_INFINITY;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY
|
||||
*/
|
||||
Number.POSITIVE_INFINITY;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {number|string|bigint} arg
|
||||
* @return {bigint}
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
|
||||
*/
|
||||
function BigInt(arg) {}
|
||||
|
||||
/**
|
||||
* Wraps a BigInt value to a signed integer between -2^(width-1) and
|
||||
* 2^(width-1)-1.
|
||||
* @param {number} width
|
||||
* @param {bigint} bigint
|
||||
* @return {bigint}
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt/asIntN
|
||||
*/
|
||||
BigInt.asIntN = function(width, bigint) {};
|
||||
|
||||
/**
|
||||
* Wraps a BigInt value to an unsigned integer between 0 and (2^width)-1.
|
||||
* @param {number} width
|
||||
* @param {bigint} bigint
|
||||
* @return {bigint}
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt/asUintN
|
||||
*/
|
||||
BigInt.asUintN = function(width, bigint) {};
|
||||
|
||||
/**
|
||||
* Returns a string with a language-sensitive representation of this BigInt.
|
||||
* @param {string|!Array<string>=} locales
|
||||
* @param {Object=} options
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt/toLocaleString
|
||||
* @override
|
||||
*/
|
||||
BigInt.prototype.toLocaleString = function(locales, options) {};
|
||||
|
||||
/**
|
||||
* Returns a string representing the specified BigInt object. The trailing "n"
|
||||
* is not part of the string.
|
||||
* @this {BigInt|bigint}
|
||||
* @param {number=} radix
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt/toString
|
||||
* @override
|
||||
*/
|
||||
BigInt.prototype.toString = function(radix) {};
|
||||
|
||||
/**
|
||||
* Returns the wrapped primitive value of a BigInt object.
|
||||
* @return {bigint}
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt/valueOf
|
||||
* @override
|
||||
*/
|
||||
BigInt.prototype.valueOf = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
@@ -1190,49 +1267,49 @@ Math.toSource = function() {};
|
||||
// Properties:
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/E
|
||||
*/
|
||||
Math.E;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN2
|
||||
*/
|
||||
Math.LN2;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN10
|
||||
*/
|
||||
Math.LN10;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG2E
|
||||
*/
|
||||
Math.LOG2E;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG10E
|
||||
*/
|
||||
Math.LOG10E;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/PI
|
||||
*/
|
||||
Math.PI;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2
|
||||
*/
|
||||
Math.SQRT1_2;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT2
|
||||
*/
|
||||
Math.SQRT2;
|
||||
@@ -1696,6 +1773,7 @@ Date.prototype.valueOf;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Iterable<string>}
|
||||
* @param {*=} opt_str
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
@@ -1891,24 +1969,23 @@ String.prototype.quote = function() {};
|
||||
* This may have side-effects if the replacement function has side-effects.
|
||||
*
|
||||
* @this {String|string}
|
||||
* @param {RegExp|string} regex
|
||||
* @param {string|Function} str
|
||||
* @param {string=} opt_flags
|
||||
* @param {RegExp|string} pattern
|
||||
* @param {?string|function(string, ...?):*} replacement
|
||||
* @return {string}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace
|
||||
*/
|
||||
String.prototype.replace = function(regex, str, opt_flags) {};
|
||||
String.prototype.replace = function(pattern, replacement) {};
|
||||
|
||||
/**
|
||||
* Executes the search for a match between a regular expression and this String
|
||||
* object.
|
||||
*
|
||||
* @this {String|string}
|
||||
* @param {RegExp|string} regexp
|
||||
* @param {RegExp|string} pattern
|
||||
* @return {number}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/search
|
||||
*/
|
||||
String.prototype.search = function(regexp) {};
|
||||
String.prototype.search = function(pattern) {};
|
||||
|
||||
/**
|
||||
* @this {String|string}
|
||||
@@ -1983,19 +2060,21 @@ String.prototype.sup = function() {};
|
||||
|
||||
/**
|
||||
* @this {String|string}
|
||||
* @param {(string|Array<string>)=} opt_locales
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase
|
||||
*/
|
||||
String.prototype.toLocaleUpperCase = function() {};
|
||||
String.prototype.toLocaleUpperCase = function(opt_locales) {};
|
||||
|
||||
/**
|
||||
* @this {String|string}
|
||||
* @param {(string|Array<string>)=} opt_locales
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase
|
||||
*/
|
||||
String.prototype.toLocaleLowerCase = function() {};
|
||||
String.prototype.toLocaleLowerCase = function(opt_locales) {};
|
||||
|
||||
/**
|
||||
* @this {String|string}
|
||||
@@ -2047,7 +2126,7 @@ String.prototype.length;
|
||||
* @param {*=} opt_pattern
|
||||
* @param {*=} opt_flags
|
||||
* @return {!RegExp}
|
||||
* @nosideeffects
|
||||
* @throws {SyntaxError} if opt_pattern is an invalid pattern.
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
|
||||
*/
|
||||
function RegExp(opt_pattern, opt_flags) {}
|
||||
@@ -2065,9 +2144,7 @@ RegExp.prototype.compile = function(pattern, opt_flags) {};
|
||||
|
||||
/**
|
||||
* @param {*} str The string to search.
|
||||
* @return {Array<string>} This should really return an Array with a few
|
||||
* special properties, but we do not have a good way to model this in
|
||||
* our type system. Also see String.prototype.match.
|
||||
* @return {?RegExpResult}
|
||||
* @see http://msdn.microsoft.com/en-us/library/z908hy33(VS.85).aspx
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec
|
||||
*/
|
||||
@@ -2088,6 +2165,34 @@ RegExp.prototype.test = function(str) {};
|
||||
*/
|
||||
RegExp.prototype.toString = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Array<string>}
|
||||
*/
|
||||
var RegExpResult = function() {};
|
||||
|
||||
|
||||
/** @type {number} */
|
||||
RegExpResult.prototype.index;
|
||||
|
||||
|
||||
/** @type {string} */
|
||||
RegExpResult.prototype.input;
|
||||
|
||||
|
||||
/** @type {number} */
|
||||
RegExpResult.prototype.length;
|
||||
|
||||
|
||||
/**
|
||||
* Not actually part of ES3; was added in 2018.
|
||||
* https://github.com/tc39/proposal-regexp-named-groups
|
||||
*
|
||||
* @type {!Object<string, string>}
|
||||
*/
|
||||
RegExpResult.prototype.groups;
|
||||
|
||||
|
||||
// Constructor properties:
|
||||
|
||||
/**
|
||||
@@ -2195,6 +2300,13 @@ RegExp.prototype.ignoreCase;
|
||||
*/
|
||||
RegExp.prototype.lastIndex;
|
||||
|
||||
/**
|
||||
* Whether or not the regular expression uses lastIndex.
|
||||
* @type {boolean}
|
||||
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky
|
||||
*/
|
||||
RegExp.prototype.sticky;
|
||||
|
||||
/**
|
||||
* Whether or not to search in strings across multiple lines.
|
||||
* @type {boolean}
|
||||
@@ -2209,6 +2321,12 @@ RegExp.prototype.multiline;
|
||||
*/
|
||||
RegExp.prototype.source;
|
||||
|
||||
/**
|
||||
* The flags the regex was created with.
|
||||
* @type {string}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags
|
||||
*/
|
||||
RegExp.prototype.flags;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -2359,40 +2477,12 @@ function TypeError(opt_message, opt_file, opt_line) {}
|
||||
*/
|
||||
function URIError(opt_message, opt_file, opt_line) {}
|
||||
|
||||
|
||||
// JScript extensions.
|
||||
// @see http://msdn.microsoft.com/en-us/library/894hfyb4(VS.80).aspx
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/7sw4ddf8.aspx
|
||||
* @type {function(new:?, string, string=)}
|
||||
* @deprecated
|
||||
*/
|
||||
function ActiveXObject(progId, opt_location) {}
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
* @see http://msdn.microsoft.com/en-us/library/9k34bww2(VS.80).aspx
|
||||
*/
|
||||
function ScriptEngine() {}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
* @nosideeffects
|
||||
* @see http://msdn.microsoft.com/en-us/library/yf25ky07(VS.80).aspx
|
||||
*/
|
||||
function ScriptEngineMajorVersion() {}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
* @nosideeffects
|
||||
* @see http://msdn.microsoft.com/en-us/library/wx3812cz(VS.80).aspx
|
||||
*/
|
||||
function ScriptEngineMinorVersion() {}
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
* @nosideeffects
|
||||
* @see http://msdn.microsoft.com/en-us/library/e98hsk2f(VS.80).aspx
|
||||
*/
|
||||
function ScriptEngineBuildVersion() {}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
|
||||
|
||||
/**
|
||||
* @param {Object|undefined} selfObj Specifies the object to which |this| should
|
||||
* point when the function is run. If the value is null or undefined, it
|
||||
* will default to the global object.
|
||||
* @param {?Object|undefined} selfObj Specifies the object to which |this|
|
||||
* should point when the function is run. If the value is null or undefined,
|
||||
* it will default to the global object.
|
||||
* @param {...*} var_args Additional arguments that are partially
|
||||
* applied to fn.
|
||||
* @return {!Function} A partially-applied form of the Function on which
|
||||
@@ -66,13 +66,12 @@ String.prototype.trimRight = function() {};
|
||||
* A object property descriptor used by Object.create, Object.defineProperty,
|
||||
* Object.defineProperties, Object.getOwnPropertyDescriptor.
|
||||
*
|
||||
* Note: not a real constructor.
|
||||
* @constructor
|
||||
* @record
|
||||
* @template THIS
|
||||
*/
|
||||
function ObjectPropertyDescriptor() {}
|
||||
|
||||
/** @type {*} */
|
||||
/** @type {(*|undefined)} */
|
||||
ObjectPropertyDescriptor.prototype.value;
|
||||
|
||||
/** @type {(function(this: THIS):?)|undefined} */
|
||||
@@ -92,29 +91,33 @@ ObjectPropertyDescriptor.prototype.configurable;
|
||||
|
||||
|
||||
/**
|
||||
* @param {Object} proto
|
||||
* @param {Object=} opt_properties A map of ObjectPropertyDescriptors.
|
||||
* @param {?Object} proto
|
||||
* @param {?Object<string|symbol, !ObjectPropertyDescriptor<?>>=} properties
|
||||
* A map of ObjectPropertyDescriptors.
|
||||
* @return {!Object}
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/create
|
||||
*/
|
||||
Object.create = function(proto, opt_properties) {};
|
||||
Object.create = function(proto, properties) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Object} obj
|
||||
* @param {string} prop
|
||||
* @param {!Object} descriptor A ObjectPropertyDescriptor.
|
||||
* @return {!Object}
|
||||
* @template T
|
||||
* @param {T} obj
|
||||
* @param {string|symbol} prop
|
||||
* @param {!ObjectPropertyDescriptor<T>} descriptor A ObjectPropertyDescriptor.
|
||||
* @return {T}
|
||||
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperty
|
||||
*/
|
||||
Object.defineProperty = function(obj, prop, descriptor) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Object} obj
|
||||
* @param {!Object} props A map of ObjectPropertyDescriptors.
|
||||
* @return {!Object}
|
||||
* @template T
|
||||
* @param {T} obj
|
||||
* @param {!Object<string|symbol, !ObjectPropertyDescriptor<T>>} props A map of
|
||||
* ObjectPropertyDescriptors.
|
||||
* @return {T}
|
||||
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperties
|
||||
*/
|
||||
Object.defineProperties = function(obj, props) {};
|
||||
@@ -122,7 +125,7 @@ Object.defineProperties = function(obj, props) {};
|
||||
|
||||
/**
|
||||
* @param {T} obj
|
||||
* @param {string} prop
|
||||
* @param {string|symbol} prop
|
||||
* @return {!ObjectPropertyDescriptor<T>|undefined}
|
||||
* @nosideeffects
|
||||
* @template T
|
||||
@@ -213,10 +216,20 @@ Object.isFrozen = function(obj) {};
|
||||
|
||||
|
||||
/**
|
||||
* We acknowledge that this function does not exist on the `Object.prototype`
|
||||
* and is declared in this file for other reasons.
|
||||
*
|
||||
* When `toJSON` is defined as a property on an object it can be used in
|
||||
* conjunction with the JSON.stringify() function.
|
||||
*
|
||||
* It is defined here to:
|
||||
* (1) Prevent the compiler from renaming the property on internal classes.
|
||||
* (2) Enforce that the signature is correct for users defining it.
|
||||
*
|
||||
* @param {string=} opt_key The JSON key for this object.
|
||||
* @return {*} The serializable representation of this object. Note that this
|
||||
* need not be a string. See http://goo.gl/PEUvs.
|
||||
* @see https://es5.github.io/#x15.12.3
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior
|
||||
*/
|
||||
Object.prototype.toJSON = function(opt_key) {};
|
||||
|
||||
@@ -238,7 +251,7 @@ Date.prototype.toJSON = function(opt_ignoredKey) {};
|
||||
|
||||
/**
|
||||
* @param {string} jsonStr The string to parse.
|
||||
* @param {(function(string, *) : *)=} opt_reviver
|
||||
* @param {(function(this:?, string, *) : *)=} opt_reviver
|
||||
* @return {*} The JSON object.
|
||||
* @throws {Error}
|
||||
*/
|
||||
@@ -247,7 +260,7 @@ JSON.parse = function(jsonStr, opt_reviver) {};
|
||||
|
||||
/**
|
||||
* @param {*} jsonObj Input object.
|
||||
* @param {(Array<string>|(function(string, *) : *)|null)=} opt_replacer
|
||||
* @param {(Array<string>|(function(this:?, string, *) : *)|null)=} opt_replacer
|
||||
* @param {(number|string)=} opt_space
|
||||
* @return {string} JSON string which represents jsonObj.
|
||||
* @throws {Error}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -27,24 +27,25 @@
|
||||
* @param {Iterable<!Array<KEY|VALUE>>|!Array<!Array<KEY|VALUE>>=} opt_iterable
|
||||
* @implements {Iterable<!Array<KEY|VALUE>>}
|
||||
* @template KEY, VALUE
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
|
||||
*/
|
||||
function Map(opt_iterable) {}
|
||||
|
||||
/** @return {void} */
|
||||
Map.prototype.clear;
|
||||
Map.prototype.clear = function() {};
|
||||
|
||||
/**
|
||||
* @param {KEY} key
|
||||
* @return {boolean}
|
||||
*/
|
||||
Map.prototype.delete;
|
||||
Map.prototype.delete = function(key) {};
|
||||
|
||||
/**
|
||||
* @return {!IteratorIterable<!Array<KEY|VALUE>>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Map.prototype.entries;
|
||||
Map.prototype.entries = function() {};
|
||||
|
||||
/**
|
||||
* @param {function(this:THIS, VALUE, KEY, MAP)} callback
|
||||
@@ -52,26 +53,27 @@ Map.prototype.entries;
|
||||
* @this {MAP}
|
||||
* @template MAP,THIS
|
||||
*/
|
||||
Map.prototype.forEach;
|
||||
Map.prototype.forEach = function(callback, opt_thisArg) {};
|
||||
|
||||
/**
|
||||
* @param {KEY} key
|
||||
* @return {VALUE}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Map.prototype.get;
|
||||
Map.prototype.get = function(key) {};
|
||||
|
||||
/**
|
||||
* @param {KEY} key
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Map.prototype.has;
|
||||
Map.prototype.has = function(key) {};
|
||||
|
||||
/**
|
||||
* @return {!IteratorIterable<KEY>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Map.prototype.keys;
|
||||
Map.prototype.keys = function() {};
|
||||
|
||||
/**
|
||||
* @param {KEY} key
|
||||
@@ -80,7 +82,7 @@ Map.prototype.keys;
|
||||
* @this {THIS}
|
||||
* @template THIS
|
||||
*/
|
||||
Map.prototype.set;
|
||||
Map.prototype.set = function(key, value) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -92,7 +94,7 @@ Map.prototype.size;
|
||||
* @return {!IteratorIterable<VALUE>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Map.prototype.values;
|
||||
Map.prototype.values = function() {};
|
||||
|
||||
/**
|
||||
* @return {!Iterator<!Array<KEY|VALUE>>}
|
||||
@@ -104,32 +106,33 @@ Map.prototype[Symbol.iterator] = function() {};
|
||||
* @constructor @struct
|
||||
* @param {Iterable<!Array<KEY|VALUE>>|!Array<!Array<KEY|VALUE>>=} opt_iterable
|
||||
* @template KEY, VALUE
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
|
||||
*/
|
||||
function WeakMap(opt_iterable) {}
|
||||
|
||||
/** @return {void} */
|
||||
WeakMap.prototype.clear;
|
||||
WeakMap.prototype.clear = function() {};
|
||||
|
||||
/**
|
||||
* @param {KEY} key
|
||||
* @return {boolean}
|
||||
*/
|
||||
WeakMap.prototype.delete;
|
||||
WeakMap.prototype.delete = function(key) {};
|
||||
|
||||
/**
|
||||
* @param {KEY} key
|
||||
* @return {VALUE}
|
||||
* @nosideeffects
|
||||
*/
|
||||
WeakMap.prototype.get;
|
||||
WeakMap.prototype.get = function(key) {};
|
||||
|
||||
/**
|
||||
* @param {KEY} key
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
*/
|
||||
WeakMap.prototype.has;
|
||||
WeakMap.prototype.has = function(key) {};
|
||||
|
||||
/**
|
||||
* @param {KEY} key
|
||||
@@ -138,15 +141,14 @@ WeakMap.prototype.has;
|
||||
* @this {THIS}
|
||||
* @template THIS
|
||||
*/
|
||||
WeakMap.prototype.set;
|
||||
|
||||
|
||||
WeakMap.prototype.set = function(key, value) {};
|
||||
|
||||
/**
|
||||
* @constructor @struct
|
||||
* @param {Iterable<VALUE>|Array<VALUE>=} opt_iterable
|
||||
* @implements {Iterable<VALUE>}
|
||||
* @template VALUE
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
||||
*/
|
||||
function Set(opt_iterable) {}
|
||||
@@ -157,25 +159,25 @@ function Set(opt_iterable) {}
|
||||
* @this {THIS}
|
||||
* @template THIS
|
||||
*/
|
||||
Set.prototype.add;
|
||||
Set.prototype.add = function(value) {};
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
Set.prototype.clear;
|
||||
Set.prototype.clear = function() {};
|
||||
|
||||
/**
|
||||
* @param {VALUE} value
|
||||
* @return {boolean}
|
||||
*/
|
||||
Set.prototype.delete;
|
||||
Set.prototype.delete = function(value) {};
|
||||
|
||||
/**
|
||||
* @return {!IteratorIterable<!Array<VALUE>>} Where each array has two entries:
|
||||
* [value, value]
|
||||
* @nosideeffects
|
||||
*/
|
||||
Set.prototype.entries;
|
||||
Set.prototype.entries = function() {};
|
||||
|
||||
/**
|
||||
* @param {function(this: THIS, VALUE, VALUE, SET)} callback
|
||||
@@ -183,14 +185,14 @@ Set.prototype.entries;
|
||||
* @this {SET}
|
||||
* @template SET,THIS
|
||||
*/
|
||||
Set.prototype.forEach;
|
||||
Set.prototype.forEach = function(callback, opt_thisArg) {};
|
||||
|
||||
/**
|
||||
* @param {VALUE} value
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Set.prototype.has;
|
||||
Set.prototype.has = function(value) {};
|
||||
|
||||
/**
|
||||
* @type {number} (readonly)
|
||||
@@ -201,13 +203,13 @@ Set.prototype.size;
|
||||
* @return {!IteratorIterable<VALUE>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Set.prototype.keys;
|
||||
Set.prototype.keys = function() {};
|
||||
|
||||
/**
|
||||
* @return {!IteratorIterable<VALUE>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Set.prototype.values;
|
||||
Set.prototype.values = function() {};
|
||||
|
||||
/**
|
||||
* @return {!Iterator<VALUE>}
|
||||
@@ -220,6 +222,7 @@ Set.prototype[Symbol.iterator] = function() {};
|
||||
* @constructor @struct
|
||||
* @param {Iterable<VALUE>|Array<VALUE>=} opt_iterable
|
||||
* @template VALUE
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
||||
*/
|
||||
function WeakSet(opt_iterable) {}
|
||||
@@ -230,22 +233,22 @@ function WeakSet(opt_iterable) {}
|
||||
* @this {THIS}
|
||||
* @template THIS
|
||||
*/
|
||||
WeakSet.prototype.add;
|
||||
WeakSet.prototype.add = function(value) {};
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
WeakSet.prototype.clear;
|
||||
WeakSet.prototype.clear = function() {};
|
||||
|
||||
/**
|
||||
* @param {VALUE} value
|
||||
* @return {boolean}
|
||||
*/
|
||||
WeakSet.prototype.delete;
|
||||
WeakSet.prototype.delete = function(value) {};
|
||||
|
||||
/**
|
||||
* @param {VALUE} value
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
*/
|
||||
WeakSet.prototype.has;
|
||||
WeakSet.prototype.has = function(value) {};
|
||||
|
||||
@@ -26,7 +26,7 @@ var Intl = {};
|
||||
|
||||
/**
|
||||
* NOTE: this API is not from ecma402 and is subject to change.
|
||||
* @param {string|Array.<string>=} opt_locales
|
||||
* @param {string|Array<string>=} opt_locales
|
||||
* @param {{type: (string|undefined)}=}
|
||||
* opt_options
|
||||
* @constructor
|
||||
@@ -35,6 +35,7 @@ Intl.v8BreakIterator = function(opt_locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {string} text
|
||||
* @return {undefined}
|
||||
*/
|
||||
Intl.v8BreakIterator.prototype.adoptText = function(text) {};
|
||||
|
||||
@@ -60,7 +61,7 @@ Intl.v8BreakIterator.prototype.next = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string|Array.<string>=} opt_locales
|
||||
* @param {string|Array<string>=} opt_locales
|
||||
* @param {{usage: (string|undefined), localeMatcher: (string|undefined),
|
||||
* sensitivity: (string|undefined), ignorePunctuation: (boolean|undefined),
|
||||
* numeric: (boolean|undefined), caseFirst: (string|undefined)}=}
|
||||
@@ -69,8 +70,9 @@ Intl.v8BreakIterator.prototype.next = function() {};
|
||||
Intl.Collator = function(opt_locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {Array.<string>} locales
|
||||
* @param {Array<string>} locales
|
||||
* @param {{localeMatcher: (string|undefined)}=} opt_options
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
Intl.Collator.supportedLocalesOf = function(locales, opt_options) {};
|
||||
|
||||
@@ -90,7 +92,7 @@ Intl.Collator.prototype.resolvedOptions = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string|Array.<string>=} opt_locales
|
||||
* @param {string|Array<string>=} opt_locales
|
||||
* @param {{localeMatcher: (string|undefined), useGrouping: (boolean|undefined),
|
||||
* numberingSystem: (string|undefined), style: (string|undefined),
|
||||
* currency: (string|undefined), currencyDisplay: (string|undefined),
|
||||
@@ -104,8 +106,9 @@ Intl.Collator.prototype.resolvedOptions = function() {};
|
||||
Intl.NumberFormat = function(opt_locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {Array.<string>} locales
|
||||
* @param {Array<string>} locales
|
||||
* @param {{localeMatcher: (string|undefined)}=} opt_options
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
Intl.NumberFormat.supportedLocalesOf = function(locales, opt_options) {};
|
||||
|
||||
@@ -115,6 +118,13 @@ Intl.NumberFormat.supportedLocalesOf = function(locales, opt_options) {};
|
||||
*/
|
||||
Intl.NumberFormat.prototype.format = function(num) {};
|
||||
|
||||
/**
|
||||
* @param {number} num
|
||||
* @return {!Array<{type: string, value: string}>}
|
||||
* @see http://www.ecma-international.org/ecma-402/#sec-intl.numberformat.prototype.formattoparts
|
||||
*/
|
||||
Intl.NumberFormat.prototype.formatToParts = function(num) {};
|
||||
|
||||
/**
|
||||
* @return {{locale: string, numberingSystem: string, style: string,
|
||||
* currency: (string|undefined), currencyDisplay: (string|undefined),
|
||||
@@ -126,7 +136,7 @@ Intl.NumberFormat.prototype.resolvedOptions = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string|Array.<string>=} opt_locales
|
||||
* @param {string|Array<string>=} opt_locales
|
||||
* @param {{localeMatcher: (string|undefined),
|
||||
* formatMatcher: (string|undefined), calendar: (string|undefined),
|
||||
* numberingSystem: (string|undefined), tz: (string|undefined),
|
||||
@@ -140,17 +150,24 @@ Intl.NumberFormat.prototype.resolvedOptions = function() {};
|
||||
Intl.DateTimeFormat = function(opt_locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {Array.<string>} locales
|
||||
* @param {Array<string>} locales
|
||||
* @param {{localeMatcher: string}=} opt_options
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
Intl.DateTimeFormat.supportedLocalesOf = function(locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {number} date
|
||||
* @param {(!Date|number)=} date
|
||||
* @return {string}
|
||||
*/
|
||||
Intl.DateTimeFormat.prototype.format = function(date) {};
|
||||
|
||||
/**
|
||||
* @param {(!Date|number)=} date
|
||||
* @return {Array<{type: string, value: string}>}
|
||||
*/
|
||||
Intl.DateTimeFormat.prototype.formatToParts = function(date) {};
|
||||
|
||||
/**
|
||||
* @return {{locale: string, calendar: string, numberingSystem: string,
|
||||
* timeZone: (string|undefined), weekday: (string|undefined),
|
||||
@@ -161,3 +178,74 @@ Intl.DateTimeFormat.prototype.format = function(date) {};
|
||||
* hour12: (boolean|undefined)}}
|
||||
*/
|
||||
Intl.DateTimeFormat.prototype.resolvedOptions = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules#Syntax
|
||||
* @param {string|Array<string>=} opt_locales
|
||||
* @param {{localeMatcher: (string|undefined), type: (string|undefined)}=}
|
||||
* opt_options
|
||||
*/
|
||||
Intl.PluralRules = function(opt_locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules/supportedLocalesOf#Syntax
|
||||
* @param {Array<string>} locales
|
||||
* @param {{localeMatcher: string}=} opt_options
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
Intl.PluralRules.supportedLocalesOf = function(locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules/resolvedOptions#Syntax
|
||||
* @return {{locale: string, pluralCategories: Array<string>, type: string}}
|
||||
*/
|
||||
Intl.PluralRules.prototype.resolvedOptions = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules/select#Syntax
|
||||
* @param {number} number
|
||||
* @return {string}
|
||||
*/
|
||||
Intl.PluralRules.prototype.select = function(number) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat#Syntax
|
||||
* @param {string|Array<string>=} opt_locales
|
||||
* @param {{localeMatcher: (string|undefined),
|
||||
* numeric: (string|undefined),
|
||||
* style: (string|undefined)}=}
|
||||
* opt_options
|
||||
*/
|
||||
Intl.RelativeTimeFormat = function(opt_locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat/supportedLocalesOf#Syntax
|
||||
* @param {Array<string>} locales
|
||||
* @param {{localeMatcher: string}=} opt_options
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
Intl.RelativeTimeFormat.supportedLocalesOf = function(locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat/format#Syntax
|
||||
* @param {number} value
|
||||
* @param {string} unit
|
||||
* @return {string}
|
||||
*/
|
||||
Intl.RelativeTimeFormat.prototype.format = function(value, unit) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat/formatToParts#Syntax
|
||||
* @param {number} value
|
||||
* @param {string} unit
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
Intl.RelativeTimeFormat.prototype.formatToParts = function(value, unit) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat/resolvedOptions#Syntax
|
||||
* @return {{locale: string, pluralCategories: Array<string>, type: string}}
|
||||
*/
|
||||
Intl.RelativeTimeFormat.prototype.resolvedOptions = function() {};
|
||||
|
||||
60
javascript/externs/lib/jquery-3.2.js
vendored
60
javascript/externs/lib/jquery-3.2.js
vendored
@@ -200,7 +200,7 @@ jQuery.prototype.add = function(arg1, context) {};
|
||||
jQuery.prototype.addBack = function(arg1) {};
|
||||
|
||||
/**
|
||||
* @param {(string|function(number,String))} arg1
|
||||
* @param {(string|Array<string>|function(number,String))} arg1
|
||||
* @return {!jQuery}
|
||||
*/
|
||||
jQuery.prototype.addClass = function(arg1) {};
|
||||
@@ -305,8 +305,16 @@ jQuery.prototype.append = function(arg1, content) {};
|
||||
jQuery.prototype.appendTo = function(target) {};
|
||||
|
||||
/**
|
||||
* @param {(string|Object<string,*>)} arg1
|
||||
* @param {(string|number|boolean|function(number,string))=} arg2
|
||||
* Only call this method with the following combinations of arguments:
|
||||
* function(string, (string|number|undefined))
|
||||
* function(!Object<string, (string|number)>)
|
||||
* function(string, function(this:Element number,string):(string|number))
|
||||
*
|
||||
* See https://api.jquery.com/attr/#attr2
|
||||
*
|
||||
* @param {(string|!Object<string,(string|number)>)} arg1
|
||||
* @param {(string|number|function(this:Element,number,string):(string|number))=}
|
||||
* arg2
|
||||
* @return {(string|!jQuery)}
|
||||
*/
|
||||
jQuery.prototype.attr = function(arg1, arg2) {};
|
||||
@@ -331,6 +339,7 @@ jQuery.prototype.bind = function(arg1, eventData, arg3) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "blur", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.blur = function(arg1, handler) {};
|
||||
|
||||
@@ -408,6 +417,7 @@ jQuery.callbacks.prototype.remove = function(callbacks) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "change", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.change = function(arg1, handler) {};
|
||||
|
||||
@@ -428,6 +438,7 @@ jQuery.prototype.clearQueue = function(queueName) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "click", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.click = function(arg1, handler) {};
|
||||
|
||||
@@ -461,6 +472,14 @@ jQuery.contains = function(container, contained) {};
|
||||
*/
|
||||
jQuery.prototype.contents = function() {};
|
||||
|
||||
/**
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "contextmenu", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.contextmenu = function(arg1, handler) {};
|
||||
|
||||
/**
|
||||
* @param {(string|Object<string,*>)} arg1
|
||||
* @param {(string|number|function(number,*))=} arg2
|
||||
@@ -491,6 +510,7 @@ jQuery.prototype.data = function(arg1, value) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "dblclick", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.dblclick = function(arg1, handler) {};
|
||||
|
||||
@@ -845,7 +865,7 @@ jQuery.Event.prototype.type;
|
||||
/** @type {Window} */
|
||||
jQuery.Event.prototype.view;
|
||||
|
||||
/** @type {number} */
|
||||
/** @type {number} @deprecated */
|
||||
jQuery.Event.prototype.which;
|
||||
|
||||
/**
|
||||
@@ -922,6 +942,7 @@ jQuery.fn = jQuery.prototype;
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "focus", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.focus = function(arg1, handler) {};
|
||||
|
||||
@@ -929,6 +950,7 @@ jQuery.prototype.focus = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "focusin", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.focusin = function(arg1, handler) {};
|
||||
|
||||
@@ -936,6 +958,7 @@ jQuery.prototype.focusin = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "focusout", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.focusout = function(arg1, handler) {};
|
||||
|
||||
@@ -1040,6 +1063,7 @@ jQuery.holdReady = function(hold) {};
|
||||
* @param {function(!jQuery.Event)} arg1
|
||||
* @param {function(!jQuery.Event)=} handlerOut
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "mouseenter", handler ) and .on( "mouseleave", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.hover = function(arg1, handlerOut) {};
|
||||
|
||||
@@ -1121,6 +1145,7 @@ jQuery.isEmptyObject = function(obj) {};
|
||||
* @param {*} obj
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
* @deprecated
|
||||
*/
|
||||
jQuery.isFunction = function(obj) {};
|
||||
|
||||
@@ -1128,6 +1153,7 @@ jQuery.isFunction = function(obj) {};
|
||||
* @param {*} value
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
* @deprecated
|
||||
*/
|
||||
jQuery.isNumeric = function(value) {};
|
||||
|
||||
@@ -1142,6 +1168,7 @@ jQuery.isPlainObject = function(obj) {};
|
||||
* @param {*} obj
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
* @deprecated
|
||||
*/
|
||||
jQuery.isWindow = function(obj) {};
|
||||
|
||||
@@ -1262,6 +1289,7 @@ jQuery.jqXHR.prototype.then =
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "keydown", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.keydown = function(arg1, handler) {};
|
||||
|
||||
@@ -1269,6 +1297,7 @@ jQuery.prototype.keydown = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "keypress", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.keypress = function(arg1, handler) {};
|
||||
|
||||
@@ -1276,6 +1305,7 @@ jQuery.prototype.keypress = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "keyup", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.keyup = function(arg1, handler) {};
|
||||
|
||||
@@ -1290,7 +1320,7 @@ jQuery.prototype.length;
|
||||
|
||||
/**
|
||||
* @param {*} obj
|
||||
* @return {Array<*>}
|
||||
* @return {!Array<*>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
jQuery.makeArray = function(obj) {};
|
||||
@@ -1320,6 +1350,7 @@ jQuery.merge = function(first, second) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "mousedown", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.mousedown = function(arg1, handler) {};
|
||||
|
||||
@@ -1327,6 +1358,7 @@ jQuery.prototype.mousedown = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "mousenter", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.mouseenter = function(arg1, handler) {};
|
||||
|
||||
@@ -1334,6 +1366,7 @@ jQuery.prototype.mouseenter = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "mouseleave", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.mouseleave = function(arg1, handler) {};
|
||||
|
||||
@@ -1341,6 +1374,7 @@ jQuery.prototype.mouseleave = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "mousemove", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.mousemove = function(arg1, handler) {};
|
||||
|
||||
@@ -1348,6 +1382,7 @@ jQuery.prototype.mousemove = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "mouseout", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.mouseout = function(arg1, handler) {};
|
||||
|
||||
@@ -1355,6 +1390,7 @@ jQuery.prototype.mouseout = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "mouseover", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.mouseover = function(arg1, handler) {};
|
||||
|
||||
@@ -1362,6 +1398,7 @@ jQuery.prototype.mouseover = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "mouseup", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.mouseup = function(arg1, handler) {};
|
||||
|
||||
@@ -1389,7 +1426,7 @@ jQuery.prototype.nextUntil = function(arg1, filter) {};
|
||||
|
||||
/**
|
||||
* @param {boolean=} removeAll
|
||||
* @return {Object}
|
||||
* @return {!typeof jQuery}
|
||||
*/
|
||||
jQuery.noConflict = function(removeAll) {};
|
||||
|
||||
@@ -1408,6 +1445,7 @@ jQuery.prototype.not = function(arg1) {};
|
||||
/**
|
||||
* @return {number}
|
||||
* @nosideeffects
|
||||
* @deprecated
|
||||
*/
|
||||
jQuery.now = function() {};
|
||||
|
||||
@@ -1655,6 +1693,7 @@ jQuery.prototype.prop = function(arg1, arg2) {};
|
||||
/**
|
||||
* @param {...*} var_args
|
||||
* @return {function()}
|
||||
* @deprecated
|
||||
*/
|
||||
jQuery.proxy = function(var_args) {};
|
||||
|
||||
@@ -1709,7 +1748,7 @@ jQuery.prototype.remove = function(selector) {};
|
||||
jQuery.prototype.removeAttr = function(attributeName) {};
|
||||
|
||||
/**
|
||||
* @param {(string|function(number,string))=} arg1
|
||||
* @param {(string|Array<string>|function(number,string))=} arg1
|
||||
* @return {!jQuery}
|
||||
*/
|
||||
jQuery.prototype.removeClass = function(arg1) {};
|
||||
@@ -1749,6 +1788,7 @@ jQuery.prototype.replaceWith = function(arg1) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "resize", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.resize = function(arg1, handler) {};
|
||||
|
||||
@@ -1756,6 +1796,7 @@ jQuery.prototype.resize = function(arg1, handler) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "scroll", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.scroll = function(arg1, handler) {};
|
||||
|
||||
@@ -1775,6 +1816,7 @@ jQuery.prototype.scrollTop = function(value) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "select", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.select = function(arg1, handler) {};
|
||||
|
||||
@@ -1859,6 +1901,7 @@ jQuery.prototype.stop = function(arg1, arg2, jumpToEnd) {};
|
||||
* @param {(function(!jQuery.Event)|Object<string, *>)=} arg1
|
||||
* @param {function(!jQuery.Event)=} handler
|
||||
* @return {!jQuery}
|
||||
* @deprecated Please use .on( "submit", handler ) instead.
|
||||
*/
|
||||
jQuery.prototype.submit = function(arg1, handler) {};
|
||||
|
||||
@@ -1932,7 +1975,7 @@ jQuery.prototype.toArray = function() {};
|
||||
jQuery.prototype.toggle = function(arg1, arg2, arg3) {};
|
||||
|
||||
/**
|
||||
* @param {(string|function(number,string,boolean))} arg1
|
||||
* @param {(string|Array<string>|function(number,string,boolean))} arg1
|
||||
* @param {boolean=} flag
|
||||
* @return {!jQuery}
|
||||
*/
|
||||
@@ -1963,6 +2006,7 @@ jQuery.trim = function(str) {};
|
||||
* @param {*} obj
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
* @deprecated
|
||||
*/
|
||||
jQuery.type = function(obj) {};
|
||||
|
||||
|
||||
@@ -1,87 +1,52 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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
|
||||
* @fileoverview Definitions for module "assert"
|
||||
* @fileoverview Definitions for node's assert module
|
||||
* @see http://nodejs.org/api/assert.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/assert.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {*} value
|
||||
* @param {string} message
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
var assert = function(value, message) {};
|
||||
|
||||
/**
|
||||
* @param {{message: string, actual: *, expected: *, operator: string}} options
|
||||
* @constructor
|
||||
* @extends Error
|
||||
*/
|
||||
assert.AssertionError = function(options) {};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
assert.AssertionError.prototype.toString;
|
||||
|
||||
/**
|
||||
* @param {*} value
|
||||
* @param {string=} message
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
var internal = function(value, message) {};
|
||||
|
||||
var internal = internal || {};
|
||||
|
||||
/**
|
||||
* @param {{message: string, actual: *, expected: *, operator: string, stackStartFunction: Function}=} options
|
||||
* @return {internal.AssertionError}
|
||||
* @constructor
|
||||
*/
|
||||
internal.AssertionError = function(options) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
internal.AssertionError.prototype.name;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
internal.AssertionError.prototype.message;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
internal.AssertionError.prototype.actual;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
internal.AssertionError.prototype.expected;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
internal.AssertionError.prototype.operator;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
internal.AssertionError.prototype.generatedMessage;
|
||||
assert.ok;
|
||||
|
||||
/**
|
||||
* @param {*} actual
|
||||
@@ -89,96 +54,89 @@ internal.AssertionError.prototype.generatedMessage;
|
||||
* @param {string} message
|
||||
* @param {string} operator
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
internal.fail = function(actual, expected, message, operator) {};
|
||||
|
||||
/**
|
||||
* @param {*} value
|
||||
* @param {string=} message
|
||||
* @return {void}
|
||||
*/
|
||||
internal.ok = function(value, message) {};
|
||||
assert.fail;
|
||||
|
||||
/**
|
||||
* @param {*} actual
|
||||
* @param {*} expected
|
||||
* @param {string=} message
|
||||
* @param {string} message
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
internal.equal = function(actual, expected, message) {};
|
||||
assert.equal;
|
||||
|
||||
/**
|
||||
* @param {*} actual
|
||||
* @param {*} expected
|
||||
* @param {string=} message
|
||||
* @param {string} message
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
internal.notEqual = function(actual, expected, message) {};
|
||||
assert.notEqual;
|
||||
|
||||
/**
|
||||
* @param {*} actual
|
||||
* @param {*} expected
|
||||
* @param {string=} message
|
||||
* @param {string} message
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
internal.deepEqual = function(actual, expected, message) {};
|
||||
|
||||
/**
|
||||
* @param {*} acutal
|
||||
* @param {*} expected
|
||||
* @param {string=} message
|
||||
* @return {void}
|
||||
*/
|
||||
internal.notDeepEqual = function(acutal, expected, message) {};
|
||||
assert.deepEqual;
|
||||
|
||||
/**
|
||||
* @param {*} actual
|
||||
* @param {*} expected
|
||||
* @param {string=} message
|
||||
* @param {string} message
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
internal.strictEqual = function(actual, expected, message) {};
|
||||
assert.notDeepEqual;
|
||||
|
||||
/**
|
||||
* @param {*} actual
|
||||
* @param {*} expected
|
||||
* @param {string=} message
|
||||
* @param {string} message
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
internal.notStrictEqual = function(actual, expected, message) {};
|
||||
assert.strictEqual;
|
||||
|
||||
/**
|
||||
* @param {*} actual
|
||||
* @param {*} expected
|
||||
* @param {string} message
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
assert.notStrictEqual;
|
||||
|
||||
/**
|
||||
* @name assert.throws
|
||||
* @function
|
||||
* @param {function()} block
|
||||
* @param {Function|RegExp|function(*)} error
|
||||
* @param {string=} message
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
internal.deepStrictEqual = function(actual, expected, message) {};
|
||||
assert.throws;
|
||||
|
||||
/**
|
||||
* @param {*} actual
|
||||
* @param {*} expected
|
||||
* @param {function()} block
|
||||
* @param {Function|RegExp|function(*)} error
|
||||
* @param {string=} message
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
internal.notDeepStrictEqual = function(actual, expected, message) {};
|
||||
|
||||
/**
|
||||
* @type {(function(Function, string=): void)|(function(Function, Function, string=): void)|(function(Function, RegExp, string=): void)|(function(Function, (function(*): boolean), string=): void)}
|
||||
*/
|
||||
internal.throws;
|
||||
|
||||
/**
|
||||
* @type {(function(Function, string=): void)|(function(Function, Function, string=): void)|(function(Function, RegExp, string=): void)|(function(Function, (function(*): boolean), string=): void)}
|
||||
*/
|
||||
internal.doesNotThrow;
|
||||
assert.doesNotThrow;
|
||||
|
||||
/**
|
||||
* @param {*} value
|
||||
* @return {void}
|
||||
* @throws {assert.AssertionError}
|
||||
*/
|
||||
internal.ifError = function(value) {};
|
||||
|
||||
|
||||
module.exports = internal;
|
||||
assert.ifError;
|
||||
|
||||
module.exports = assert;
|
||||
|
||||
@@ -1,196 +1,65 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "buffer"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's buffer module.
|
||||
* @see http://nodejs.org/api/buffer.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/buffer.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var buffer = {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
buffer.INSPECT_MAX_BYTES;
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @return {Buffer}
|
||||
* @constructor
|
||||
*/
|
||||
var BuffType = function(str, encoding) {};
|
||||
/** @const {function(new:Buffer, ...?)} */
|
||||
buffer.Buffer;
|
||||
|
||||
/**
|
||||
* @param {number} size
|
||||
* @return {Buffer}
|
||||
* @constructor
|
||||
*/
|
||||
var BuffType = function(size) {};
|
||||
buffer.SlowBuffer = function(size) {};
|
||||
|
||||
/**
|
||||
* @param {Uint8Array} array
|
||||
*
|
||||
* @param {string} string
|
||||
* @param {number|string} offset
|
||||
* @param {number|string=} length
|
||||
* @param {number|string=} encoding
|
||||
* @return {*}
|
||||
*/
|
||||
buffer.SlowBuffer.prototype.write;
|
||||
|
||||
/**
|
||||
* @param {number} start
|
||||
* @param {number} end
|
||||
* @return {Buffer}
|
||||
* @constructor
|
||||
*/
|
||||
var BuffType = function(array) {};
|
||||
buffer.SlowBuffer.prototype.slice;
|
||||
|
||||
/**
|
||||
* @param {ArrayBuffer} arrayBuffer
|
||||
* @return {Buffer}
|
||||
* @constructor
|
||||
* @return {string}
|
||||
*/
|
||||
var BuffType = function(arrayBuffer) {};
|
||||
|
||||
/**
|
||||
* @param {Array<*>} array
|
||||
* @return {Buffer}
|
||||
* @constructor
|
||||
*/
|
||||
var BuffType = function(array) {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @return {Buffer}
|
||||
* @constructor
|
||||
*/
|
||||
var BuffType = function(buffer) {};
|
||||
|
||||
/**
|
||||
* @type {Buffer}
|
||||
*/
|
||||
BuffType.prototype;
|
||||
|
||||
/**
|
||||
* @type {(function(Array<*>): Buffer)|(function(ArrayBuffer, number=, number=): Buffer)|(function(Buffer): Buffer)|(function(string, string=): Buffer)}
|
||||
*/
|
||||
BuffType.from;
|
||||
|
||||
/**
|
||||
* @type {(function(*): boolean)}
|
||||
*/
|
||||
BuffType.isBuffer;
|
||||
|
||||
/**
|
||||
* @type {(function(string): boolean)}
|
||||
*/
|
||||
BuffType.isEncoding;
|
||||
|
||||
/**
|
||||
* @type {(function(string, string=): number)}
|
||||
*/
|
||||
BuffType.byteLength;
|
||||
|
||||
/**
|
||||
* @type {(function(Array<Buffer>, number=): Buffer)}
|
||||
*/
|
||||
BuffType.concat;
|
||||
|
||||
/**
|
||||
* @type {(function(Buffer, Buffer): number)}
|
||||
*/
|
||||
BuffType.compare;
|
||||
|
||||
/**
|
||||
* @type {(function(number, (string|Buffer|number)=, string=): Buffer)}
|
||||
*/
|
||||
BuffType.alloc;
|
||||
|
||||
/**
|
||||
* @type {(function(number): Buffer)}
|
||||
*/
|
||||
BuffType.allocUnsafe;
|
||||
|
||||
/**
|
||||
* @type {(function(number): Buffer)}
|
||||
*/
|
||||
BuffType.allocUnsafeSlow;
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @return {Buffer}
|
||||
* @constructor
|
||||
*/
|
||||
var SlowBuffType = function(str, encoding) {};
|
||||
buffer.SlowBuffer.prototype.toString;
|
||||
|
||||
/**
|
||||
* @param {number} size
|
||||
* @return {Buffer}
|
||||
* @constructor
|
||||
* @param {(string|!Buffer|number)=} fill
|
||||
* @param {string=} encoding
|
||||
* @return {!Buffer}
|
||||
*/
|
||||
var SlowBuffType = function(size) {};
|
||||
|
||||
/**
|
||||
* @param {Uint8Array} size
|
||||
* @return {Buffer}
|
||||
* @constructor
|
||||
*/
|
||||
var SlowBuffType = function(size) {};
|
||||
|
||||
/**
|
||||
* @param {Array<*>} array
|
||||
* @return {Buffer}
|
||||
* @constructor
|
||||
*/
|
||||
var SlowBuffType = function(array) {};
|
||||
|
||||
/**
|
||||
* @type {Buffer}
|
||||
*/
|
||||
SlowBuffType.prototype;
|
||||
|
||||
/**
|
||||
* @type {(function(*): boolean)}
|
||||
*/
|
||||
SlowBuffType.isBuffer;
|
||||
|
||||
/**
|
||||
* @type {(function(string, string=): number)}
|
||||
*/
|
||||
SlowBuffType.byteLength;
|
||||
|
||||
/**
|
||||
* @type {(function(Array<Buffer>, number=): Buffer)}
|
||||
*/
|
||||
SlowBuffType.concat;
|
||||
|
||||
|
||||
module.exports.Buffer = BuffType;
|
||||
|
||||
module.exports.SlowBuffer = SlowBuffType;
|
||||
|
||||
module.exports.INSPECT_MAX_BYTES = buffer.INSPECT_MAX_BYTES;
|
||||
|
||||
buffer.Buffer.alloc;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,238 +1,109 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "dgram"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's dgram module. Depends on the events module.
|
||||
* @see http://nodejs.org/api/dgram.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/dgram.js
|
||||
*/
|
||||
|
||||
var events = require('events');
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var dgram = {};
|
||||
|
||||
var events = require("events");
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
function RemoteInfo() {}
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
RemoteInfo.prototype.address;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
RemoteInfo.prototype.port;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
RemoteInfo.prototype.size;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
function AddressInfo() {}
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
AddressInfo.prototype.address;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
AddressInfo.prototype.family;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
AddressInfo.prototype.port;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
function BindOptions() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
BindOptions.prototype.port;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
BindOptions.prototype.address;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
BindOptions.prototype.exclusive;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
function SocketOptions() {}
|
||||
|
||||
/**
|
||||
* @type {(string)}
|
||||
*/
|
||||
SocketOptions.prototype.type;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
SocketOptions.prototype.reuseAddr;
|
||||
|
||||
/**
|
||||
* @param {string} type
|
||||
* @param {(function(Buffer, dgram.RemoteInfo): void)=} callback
|
||||
* @param {function(...)=} callback
|
||||
* @return {dgram.Socket}
|
||||
*/
|
||||
dgram.createSocket = function(type, callback) {};
|
||||
dgram.createSocket;
|
||||
|
||||
/**
|
||||
* @param {dgram.SocketOptions} options
|
||||
* @param {(function(Buffer, dgram.RemoteInfo): void)=} callback
|
||||
* @return {dgram.Socket}
|
||||
*/
|
||||
dgram.createSocket = function(options, callback) {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {events.EventEmitter}
|
||||
* @constructor
|
||||
* @extends events.EventEmitter
|
||||
*/
|
||||
dgram.Socket = function() {};
|
||||
|
||||
/**
|
||||
* @param {(Buffer|String|Array<*>)} msg
|
||||
* @param {number} port
|
||||
* @param {string} address
|
||||
* @param {(function(Error, number): void)=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
dgram.Socket.prototype.send = function(msg, port, address, callback) {};
|
||||
|
||||
/**
|
||||
* @param {(Buffer|String|Array<*>)} msg
|
||||
* @param {Buffer} buf
|
||||
* @param {number} offset
|
||||
* @param {number} length
|
||||
* @param {number} port
|
||||
* @param {string} address
|
||||
* @param {(function(Error, number): void)=} callback
|
||||
* @param {function(...)=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
dgram.Socket.prototype.send = function(msg, offset, length, port, address, callback) {};
|
||||
dgram.Socket.prototype.send;
|
||||
|
||||
/**
|
||||
* @param {number=} port
|
||||
* @param {number} port
|
||||
* @param {string=} address
|
||||
* @param {(function(): void)=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
dgram.Socket.prototype.bind = function(port, address, callback) {};
|
||||
dgram.Socket.prototype.bind;
|
||||
|
||||
/**
|
||||
* @param {dgram.BindOptions} options
|
||||
* @param {Function=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
dgram.Socket.prototype.bind = function(options, callback) {};
|
||||
dgram.Socket.prototype.close;
|
||||
|
||||
/**
|
||||
* @param {*=} callback
|
||||
* @return {void}
|
||||
* @return {string}
|
||||
*/
|
||||
dgram.Socket.prototype.close = function(callback) {};
|
||||
|
||||
/**
|
||||
* @return {dgram.AddressInfo}
|
||||
*/
|
||||
dgram.Socket.prototype.address = function() {};
|
||||
dgram.Socket.prototype.address;
|
||||
|
||||
/**
|
||||
* @param {boolean} flag
|
||||
* @return {void}
|
||||
*/
|
||||
dgram.Socket.prototype.setBroadcast = function(flag) {};
|
||||
dgram.Socket.prototype.setBroadcast;
|
||||
|
||||
/**
|
||||
* @param {number} ttl
|
||||
* @return {void}
|
||||
* @return {number}
|
||||
*/
|
||||
dgram.Socket.prototype.setTTL = function(ttl) {};
|
||||
dgram.Socket.prototype.setTTL;
|
||||
|
||||
/**
|
||||
* @param {number} ttl
|
||||
* @return {void}
|
||||
* @return {number}
|
||||
*/
|
||||
dgram.Socket.prototype.setMulticastTTL = function(ttl) {};
|
||||
dgram.Socket.prototype.setMulticastTTL;
|
||||
|
||||
/**
|
||||
* @param {boolean} flag
|
||||
* @return {void}
|
||||
*/
|
||||
dgram.Socket.prototype.setMulticastLoopback = function(flag) {};
|
||||
dgram.Socket.prototype.setMulticastLoopback;
|
||||
|
||||
/**
|
||||
* @param {string} multicastAddress
|
||||
* @param {string=} multicastInterface
|
||||
* @return {void}
|
||||
*/
|
||||
dgram.Socket.prototype.addMembership = function(multicastAddress, multicastInterface) {};
|
||||
dgram.Socket.prototype.addMembership;
|
||||
|
||||
/**
|
||||
* @param {string} multicastAddress
|
||||
* @param {string=} multicastInterface
|
||||
* @return {void}
|
||||
*/
|
||||
dgram.Socket.prototype.dropMembership = function(multicastAddress, multicastInterface) {};
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
dgram.Socket.prototype.ref = function() {};
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
dgram.Socket.prototype.unref = function() {};
|
||||
|
||||
module.exports.createSocket = dgram.createSocket;
|
||||
|
||||
module.exports.createSocket = dgram.createSocket;
|
||||
|
||||
module.exports.Socket = dgram.Socket;
|
||||
dgram.Socket.prototype.dropMembership;
|
||||
|
||||
module.exports = dgram;
|
||||
|
||||
@@ -1,344 +1,244 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "dns"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's dns module.
|
||||
* @see http://nodejs.org/api/dns.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/dns.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var dns = {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @param {string} domain
|
||||
* @param {string|function(Error,string,string)} family
|
||||
* @param {function(?Error,string,string)=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
dns.MxRecord = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
dns.MxRecord.prototype.exchange;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
dns.MxRecord.prototype.priority;
|
||||
dns.lookup;
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {number} family
|
||||
* @param {(function(Error, string, number): void)} callback
|
||||
* @return {string}
|
||||
* @param {string|function(?Error,Array)} rrtype
|
||||
* @param {function(?Error,Array)=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
dns.lookup = function(domain, family, callback) {};
|
||||
dns.resolve;
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {(function(Error, string, number): void)} callback
|
||||
* @return {string}
|
||||
* @param {function(?Error,Array)} callback
|
||||
* @return {void}
|
||||
*/
|
||||
dns.lookup = function(domain, callback) {};
|
||||
dns.resolve4;
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {string} rrtype
|
||||
* @param {(function(Error, Array<string>): void)} callback
|
||||
* @return {Array<string>}
|
||||
* @param {function(?Error,Array)} callback
|
||||
* @return {void}
|
||||
*/
|
||||
dns.resolve = function(domain, rrtype, callback) {};
|
||||
dns.resolve6;
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {(function(Error, Array<string>): void)} callback
|
||||
* @return {Array<string>}
|
||||
* @param {function(?Error,Array)}callback
|
||||
* @return {void}
|
||||
*/
|
||||
dns.resolve = function(domain, callback) {};
|
||||
dns.resolveMx;
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {(function(Error, Array<string>): void)} callback
|
||||
* @return {Array<string>}
|
||||
* @param {function(?Error,Array)}callback
|
||||
* @return {void}
|
||||
*/
|
||||
dns.resolve4 = function(domain, callback) {};
|
||||
dns.resolveTxt;
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {(function(Error, Array<string>): void)} callback
|
||||
* @return {Array<string>}
|
||||
* @param {function(?Error,Array)}callback
|
||||
* @return {void}
|
||||
*/
|
||||
dns.resolve6 = function(domain, callback) {};
|
||||
dns.resolveSrv;
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {(function(Error, Array<dns.MxRecord>): void)} callback
|
||||
* @return {Array<string>}
|
||||
* @param {function(?Error,Array)}callback
|
||||
* @return {void}
|
||||
*/
|
||||
dns.resolveMx = function(domain, callback) {};
|
||||
dns.resolveNs;
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {(function(Error, Array<string>): void)} callback
|
||||
* @return {Array<string>}
|
||||
* @param {function(?Error,Array)}callback
|
||||
* @return {void}
|
||||
*/
|
||||
dns.resolveTxt = function(domain, callback) {};
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {(function(Error, Array<string>): void)} callback
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
dns.resolveSrv = function(domain, callback) {};
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {(function(Error, Array<string>): void)} callback
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
dns.resolveNs = function(domain, callback) {};
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @param {(function(Error, Array<string>): void)} callback
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
dns.resolveCname = function(domain, callback) {};
|
||||
dns.resolveCname;
|
||||
|
||||
/**
|
||||
* @param {string} ip
|
||||
* @param {(function(Error, Array<string>): void)} callback
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
dns.reverse = function(ip, callback) {};
|
||||
|
||||
/**
|
||||
* @param {Array<string>} servers
|
||||
* @param {function(?Error,Array)}callback
|
||||
* @return {void}
|
||||
*/
|
||||
dns.setServers = function(servers) {};
|
||||
dns.reverse;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.NODATA;
|
||||
dns.NODATA = 'ENODATA';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.FORMERR;
|
||||
dns.FORMERR = 'EFORMERR';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.SERVFAIL;
|
||||
dns.SERVFAIL = 'ESERVFAIL';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.NOTFOUND;
|
||||
dns.NOTFOUND = 'ENOTFOUND';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.NOTIMP;
|
||||
dns.NOTIMP = 'ENOTIMP';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.REFUSED;
|
||||
dns.REFUSED = 'EREFUSED';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.BADQUERY;
|
||||
dns.BADQUERY = 'EBADQUERY';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.BADNAME;
|
||||
dns.BADNAME = 'EBADNAME';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.BADFAMILY;
|
||||
dns.BADFAMILY = 'EBADFAMILY';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.BADRESP;
|
||||
dns.BADRESP = 'EBADRESP';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.CONNREFUSED;
|
||||
dns.CONNREFUSED = 'ECONNREFUSED';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.TIMEOUT;
|
||||
dns.TIMEOUT = 'ETIMEOUT';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.EOF;
|
||||
dns.EOF = 'EOF';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.FILE;
|
||||
dns.FILE = 'EFILE';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.NOMEM;
|
||||
dns.NOMEM = 'ENOMEM';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.DESTRUCTION;
|
||||
dns.DESTRUCTION = 'EDESTRUCTION';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.BADSTR;
|
||||
dns.BADSTR = 'EBADSTR';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.BADFLAGS;
|
||||
dns.BADFLAGS = 'EBADFLAGS';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.NONAME;
|
||||
dns.NONAME = 'ENONAME';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.BADHINTS;
|
||||
dns.BADHINTS = 'EBADHINTS';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.NOTINITIALIZED;
|
||||
dns.NOTINITIALIZED = 'ENOTINITIALIZED';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.LOADIPHLPAPI;
|
||||
dns.LOADIPHLPAPI = 'ELOADIPHLPAPI';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.ADDRGETNETWORKPARAMS;
|
||||
dns.ADDRGETNETWORKPARAMS = 'EADDRGETNETWORKPARAMS';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @const
|
||||
*/
|
||||
dns.CANCELLED;
|
||||
|
||||
module.exports.MxRecord = dns.MxRecord;
|
||||
|
||||
module.exports.lookup = dns.lookup;
|
||||
|
||||
module.exports.lookup = dns.lookup;
|
||||
|
||||
module.exports.resolve = dns.resolve;
|
||||
|
||||
module.exports.resolve = dns.resolve;
|
||||
|
||||
module.exports.resolve4 = dns.resolve4;
|
||||
|
||||
module.exports.resolve6 = dns.resolve6;
|
||||
|
||||
module.exports.resolveMx = dns.resolveMx;
|
||||
|
||||
module.exports.resolveTxt = dns.resolveTxt;
|
||||
|
||||
module.exports.resolveSrv = dns.resolveSrv;
|
||||
|
||||
module.exports.resolveNs = dns.resolveNs;
|
||||
|
||||
module.exports.resolveCname = dns.resolveCname;
|
||||
|
||||
module.exports.reverse = dns.reverse;
|
||||
|
||||
module.exports.setServers = dns.setServers;
|
||||
|
||||
module.exports.NODATA = dns.NODATA;
|
||||
|
||||
module.exports.FORMERR = dns.FORMERR;
|
||||
|
||||
module.exports.SERVFAIL = dns.SERVFAIL;
|
||||
|
||||
module.exports.NOTFOUND = dns.NOTFOUND;
|
||||
|
||||
module.exports.NOTIMP = dns.NOTIMP;
|
||||
|
||||
module.exports.REFUSED = dns.REFUSED;
|
||||
|
||||
module.exports.BADQUERY = dns.BADQUERY;
|
||||
|
||||
module.exports.BADNAME = dns.BADNAME;
|
||||
|
||||
module.exports.BADFAMILY = dns.BADFAMILY;
|
||||
|
||||
module.exports.BADRESP = dns.BADRESP;
|
||||
|
||||
module.exports.CONNREFUSED = dns.CONNREFUSED;
|
||||
|
||||
module.exports.TIMEOUT = dns.TIMEOUT;
|
||||
|
||||
module.exports.EOF = dns.EOF;
|
||||
|
||||
module.exports.FILE = dns.FILE;
|
||||
|
||||
module.exports.NOMEM = dns.NOMEM;
|
||||
|
||||
module.exports.DESTRUCTION = dns.DESTRUCTION;
|
||||
|
||||
module.exports.BADSTR = dns.BADSTR;
|
||||
|
||||
module.exports.BADFLAGS = dns.BADFLAGS;
|
||||
|
||||
module.exports.NONAME = dns.NONAME;
|
||||
|
||||
module.exports.BADHINTS = dns.BADHINTS;
|
||||
|
||||
module.exports.NOTINITIALIZED = dns.NOTINITIALIZED;
|
||||
|
||||
module.exports.LOADIPHLPAPI = dns.LOADIPHLPAPI;
|
||||
|
||||
module.exports.ADDRGETNETWORKPARAMS = dns.ADDRGETNETWORKPARAMS;
|
||||
|
||||
module.exports.CANCELLED = dns.CANCELLED;
|
||||
dns.CANCELLED = 'ECANCELLED';
|
||||
|
||||
module.exports = dns;
|
||||
|
||||
@@ -1,116 +1,97 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "domain"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's domain module. Depends on the events module.
|
||||
* @see http://nodejs.org/api/domain.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/domain.js
|
||||
*/
|
||||
|
||||
var events = require('events');
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var domain = {};
|
||||
|
||||
var events = require("events");
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {events.EventEmitter}
|
||||
* @implements {NodeJS.Domain}
|
||||
*/
|
||||
domain.Domain;
|
||||
|
||||
/**
|
||||
* @param {Function} fn
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.run = function(fn) {};
|
||||
|
||||
/**
|
||||
* @param {events.EventEmitter} emitter
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.add = function(emitter) {};
|
||||
|
||||
/**
|
||||
* @param {events.EventEmitter} emitter
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.remove = function(emitter) {};
|
||||
|
||||
/**
|
||||
* @param {(function(Error, *): *)} cb
|
||||
* @return {*}
|
||||
*/
|
||||
domain.Domain.prototype.bind = function(cb) {};
|
||||
|
||||
/**
|
||||
* @param {(function(*): *)} cb
|
||||
* @return {*}
|
||||
*/
|
||||
domain.Domain.prototype.intercept = function(cb) {};
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.dispose = function() {};
|
||||
|
||||
/**
|
||||
* @type {Array<*>}
|
||||
*/
|
||||
domain.Domain.prototype.members;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.enter = function() {};
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.exit = function() {};
|
||||
|
||||
/**
|
||||
* @return {domain.Domain}
|
||||
*/
|
||||
domain.create = function() {};
|
||||
|
||||
module.exports.Domain = domain.Domain;
|
||||
|
||||
module.exports.create = domain.create;
|
||||
|
||||
/**
|
||||
* @type {domain.Domain}
|
||||
*/
|
||||
domain.active;
|
||||
|
||||
module.exports.active = domain.active;
|
||||
/**
|
||||
* @return {domain.Domain}
|
||||
*/
|
||||
domain.create;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends events.EventEmitter
|
||||
*/
|
||||
domain.Domain = function () {};
|
||||
|
||||
/**
|
||||
* @param {function()} fn
|
||||
*/
|
||||
domain.Domain.prototype.run;
|
||||
|
||||
/**
|
||||
* @type {Array}
|
||||
*/
|
||||
domain.Domain.prototype.members;
|
||||
|
||||
/**
|
||||
* @param {events.EventEmitter} emitter
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.add;
|
||||
|
||||
/**
|
||||
* @param {events.EventEmitter} emitter
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.remove;
|
||||
|
||||
/**
|
||||
* @param {function(...*)} callback
|
||||
* @return {function(...*)}
|
||||
*/
|
||||
domain.Domain.prototype.bind;
|
||||
|
||||
/**
|
||||
* @param {function(...*)} callback
|
||||
* @return {function(...*)}
|
||||
*/
|
||||
domain.Domain.prototype.intercept;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.dispose;
|
||||
|
||||
// Undocumented
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.enter;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
domain.Domain.prototype.exit;
|
||||
|
||||
module.exports = domain;
|
||||
|
||||
@@ -1,149 +1,100 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "events"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
var events = function() {};
|
||||
/**
|
||||
* @fileoverview Definitions for node's "events" module.
|
||||
* @externs
|
||||
*
|
||||
* @see http://nodejs.org/api/events.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/events.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var events = {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {NodeJS.EventEmitter}
|
||||
*/
|
||||
events.EventEmitter;
|
||||
|
||||
/**
|
||||
* @type {events.EventEmitter}
|
||||
*/
|
||||
events.EventEmitter.EventEmitter;
|
||||
|
||||
/**
|
||||
* @param {events.EventEmitter} emitter
|
||||
* @param {string} event
|
||||
* @return {number}
|
||||
*/
|
||||
events.EventEmitter.listenerCount = function(emitter, event) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
events.EventEmitter.defaultMaxListeners;
|
||||
events.EventEmitter = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} event
|
||||
* @param {Function} listener
|
||||
* @return {*}
|
||||
* @param {function(...)} listener
|
||||
* @return {events.EventEmitter}
|
||||
*/
|
||||
events.EventEmitter.prototype.addListener = function(event, listener) {};
|
||||
events.EventEmitter.prototype.addListener;
|
||||
|
||||
/**
|
||||
* @param {string} event
|
||||
* @param {Function} listener
|
||||
* @return {*}
|
||||
* @param {function(...)} listener
|
||||
* @return {events.EventEmitter}
|
||||
*/
|
||||
events.EventEmitter.prototype.on = function(event, listener) {};
|
||||
events.EventEmitter.prototype.on;
|
||||
|
||||
/**
|
||||
* @param {string} event
|
||||
* @param {Function} listener
|
||||
* @return {*}
|
||||
* @param {function(...)} listener
|
||||
* @return {events.EventEmitter}
|
||||
*/
|
||||
events.EventEmitter.prototype.once = function(event, listener) {};
|
||||
events.EventEmitter.prototype.once;
|
||||
|
||||
/**
|
||||
* @param {string} event
|
||||
* @param {Function} listener
|
||||
* @return {*}
|
||||
* @param {function(...)} listener
|
||||
* @return {events.EventEmitter}
|
||||
*/
|
||||
events.EventEmitter.prototype.prependListener = function(event, listener) {};
|
||||
|
||||
/**
|
||||
* @param {string} event
|
||||
* @param {Function} listener
|
||||
* @return {*}
|
||||
*/
|
||||
events.EventEmitter.prototype.prependOnceListener = function(event, listener) {};
|
||||
|
||||
/**
|
||||
* @param {string} event
|
||||
* @param {Function} listener
|
||||
* @return {*}
|
||||
*/
|
||||
events.EventEmitter.prototype.removeListener = function(event, listener) {};
|
||||
events.EventEmitter.prototype.removeListener;
|
||||
|
||||
/**
|
||||
* @param {string=} event
|
||||
* @return {*}
|
||||
* @return {events.EventEmitter}
|
||||
*/
|
||||
events.EventEmitter.prototype.removeAllListeners = function(event) {};
|
||||
events.EventEmitter.prototype.removeAllListeners;
|
||||
|
||||
/**
|
||||
* @param {number} n
|
||||
* @return {*}
|
||||
* @return {void}
|
||||
*/
|
||||
events.EventEmitter.prototype.setMaxListeners = function(n) {};
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
events.EventEmitter.prototype.getMaxListeners = function() {};
|
||||
events.EventEmitter.prototype.setMaxListeners;
|
||||
|
||||
/**
|
||||
* @param {string} event
|
||||
* @return {Array<Function>}
|
||||
* @return {Array.<function(...)>}
|
||||
*/
|
||||
events.EventEmitter.prototype.listeners = function(event) {};
|
||||
events.EventEmitter.prototype.listeners;
|
||||
|
||||
/**
|
||||
* @param {string} event
|
||||
* @param {...*} args
|
||||
* @param {...*} var_args
|
||||
* @return {boolean}
|
||||
*/
|
||||
events.EventEmitter.prototype.emit = function(event, args) {};
|
||||
events.EventEmitter.prototype.emit;
|
||||
|
||||
// Undocumented
|
||||
|
||||
/**
|
||||
* @return {Array<string>}
|
||||
* @type {boolean}
|
||||
*/
|
||||
events.EventEmitter.prototype.eventNames = function() {};
|
||||
events.usingDomains;
|
||||
|
||||
/**
|
||||
* @param {events.EventEmitter} emitter
|
||||
* @param {string} type
|
||||
* @return {number}
|
||||
* @return {void}
|
||||
*/
|
||||
events.EventEmitter.prototype.listenerCount = function(type) {};
|
||||
|
||||
module.exports = events;
|
||||
|
||||
events.EventEmitter.listenerCount;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,447 +1,88 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "http"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's http module. Depends on the events module.
|
||||
* @see http://nodejs.org/api/http.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/http.js
|
||||
*/
|
||||
|
||||
var events = require('events');
|
||||
var net = require('net');
|
||||
var stream = require('stream');
|
||||
|
||||
/** @const */
|
||||
var http = {};
|
||||
|
||||
var net = require("net");
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @typedef {function(http.IncomingMessage, http.ServerResponse)}
|
||||
*/
|
||||
http.RequestOptions = function() {};
|
||||
http.requestListener;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @param {http.requestListener=} listener
|
||||
* @return {http.Server}
|
||||
*/
|
||||
http.RequestOptions.prototype.protocol;
|
||||
http.createServer;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @param {http.requestListener=} listener
|
||||
* @constructor
|
||||
* @extends events.EventEmitter
|
||||
*/
|
||||
http.RequestOptions.prototype.host;
|
||||
http.Server = function(listener) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
http.RequestOptions.prototype.hostname;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
http.RequestOptions.prototype.family;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
http.RequestOptions.prototype.port;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
http.RequestOptions.prototype.localAddress;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
http.RequestOptions.prototype.socketPath;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
http.RequestOptions.prototype.method;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
http.RequestOptions.prototype.path;
|
||||
|
||||
http.RequestOptions.prototype.headers;
|
||||
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
http.RequestOptions.prototype.auth;
|
||||
|
||||
/**
|
||||
* @type {(http.Agent|boolean)}
|
||||
*/
|
||||
http.RequestOptions.prototype.agent;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {net.Server}
|
||||
*/
|
||||
http.Server = function() {};
|
||||
|
||||
/**
|
||||
* @param {number} msecs
|
||||
* @param {Function} callback
|
||||
* @return {void}
|
||||
*/
|
||||
http.Server.prototype.setTimeout = function(msecs, callback) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
http.Server.prototype.maxHeadersCount;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
http.Server.prototype.timeout;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
http.Server.prototype.listening;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {http.IncomingMessage}
|
||||
*/
|
||||
http.ServerRequest = function() {};
|
||||
|
||||
/**
|
||||
* @type {net.Socket}
|
||||
*/
|
||||
http.ServerRequest.prototype.connection;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Writable}
|
||||
*/
|
||||
http.ServerResponse = function() {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @return {boolean}
|
||||
*/
|
||||
http.ServerResponse.prototype.write = function(buffer) {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @param {Function=} cb
|
||||
* @return {boolean}
|
||||
*/
|
||||
http.ServerResponse.prototype.write = function(buffer, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {Function=} cb
|
||||
* @return {boolean}
|
||||
*/
|
||||
http.ServerResponse.prototype.write = function(str, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @param {Function=} cb
|
||||
* @return {boolean}
|
||||
*/
|
||||
http.ServerResponse.prototype.write = function(str, encoding, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @param {string=} fd
|
||||
* @return {boolean}
|
||||
*/
|
||||
http.ServerResponse.prototype.write = function(str, encoding, fd) {};
|
||||
|
||||
/**
|
||||
* @param {*} chunk
|
||||
* @param {string=} encoding
|
||||
* @return {*}
|
||||
*/
|
||||
http.ServerResponse.prototype.write = function(chunk, encoding) {};
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.writeContinue = function() {};
|
||||
|
||||
/**
|
||||
* @param {number} statusCode
|
||||
* @param {string=} reasonPhrase
|
||||
* @param {*=} headers
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.writeHead = function(statusCode, reasonPhrase, headers) {};
|
||||
|
||||
/**
|
||||
* @param {number} statusCode
|
||||
* @param {*=} headers
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.writeHead = function(statusCode, headers) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
http.ServerResponse.prototype.statusCode;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
http.ServerResponse.prototype.statusMessage;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
http.ServerResponse.prototype.headersSent;
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {(string|Array<string>)} value
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.setHeader = function(name, value) {};
|
||||
|
||||
/**
|
||||
* @param {number} msecs
|
||||
* @param {Function} callback
|
||||
* @return {http.ServerResponse}
|
||||
*/
|
||||
http.ServerResponse.prototype.setTimeout = function(msecs, callback) {};
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
http.ServerResponse.prototype.sendDate;
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {string}
|
||||
*/
|
||||
http.ServerResponse.prototype.getHeader = function(name) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.removeHeader = function(name) {};
|
||||
|
||||
/**
|
||||
* @param {*} headers
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.addTrailers = function(headers) {};
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
http.ServerResponse.prototype.finished;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.end = function() {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @param {Function=} cb
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.end = function(buffer, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {Function=} cb
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.end = function(str, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @param {Function=} cb
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.end = function(str, encoding, cb) {};
|
||||
|
||||
/**
|
||||
* @param {*=} data
|
||||
* @param {string=} encoding
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.end = function(data, encoding) {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Writable}
|
||||
*/
|
||||
http.ClientRequest = function() {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @return {boolean}
|
||||
*/
|
||||
http.ClientRequest.prototype.write = function(buffer) {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @param {Function=} cb
|
||||
* @return {boolean}
|
||||
*/
|
||||
http.ClientRequest.prototype.write = function(buffer, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {Function=} cb
|
||||
* @return {boolean}
|
||||
*/
|
||||
http.ClientRequest.prototype.write = function(str, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @param {Function=} cb
|
||||
* @return {boolean}
|
||||
*/
|
||||
http.ClientRequest.prototype.write = function(str, encoding, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @param {string=} fd
|
||||
* @return {boolean}
|
||||
*/
|
||||
http.ClientRequest.prototype.write = function(str, encoding, fd) {};
|
||||
|
||||
/**
|
||||
* @param {*} chunk
|
||||
* @param {string=} encoding
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.write = function(chunk, encoding) {};
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.abort = function() {};
|
||||
|
||||
/**
|
||||
* @param {number} timeout
|
||||
* @param {(number|string)} portOrPath
|
||||
* @param {(string|Function)=} hostnameOrCallback
|
||||
* @param {Function=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.setTimeout = function(timeout, callback) {};
|
||||
|
||||
/**
|
||||
* @param {boolean=} noDelay
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.setNoDelay = function(noDelay) {};
|
||||
|
||||
/**
|
||||
* @param {boolean=} enable
|
||||
* @param {number=} initialDelay
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.setSocketKeepAlive = function(enable, initialDelay) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {(string|Array<string>)} value
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.setHeader = function(name, value) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {string}
|
||||
*/
|
||||
http.ClientRequest.prototype.getHeader = function(name) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.removeHeader = function(name) {};
|
||||
|
||||
/**
|
||||
* @param {*} headers
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.addTrailers = function(headers) {};
|
||||
http.Server.prototype.listen;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.end = function() {};
|
||||
http.Server.prototype.close;
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @param {Function=} cb
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.end = function(buffer, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {Function=} cb
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.end = function(str, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @param {Function=} cb
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.end = function(str, encoding, cb) {};
|
||||
|
||||
/**
|
||||
* @param {*=} data
|
||||
* @param {string=} encoding
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.end = function(data, encoding) {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Readable}
|
||||
* @constructor
|
||||
* @extends stream.Readable
|
||||
*/
|
||||
http.IncomingMessage = function() {};
|
||||
|
||||
/**
|
||||
* @type {?string}
|
||||
* */
|
||||
http.IncomingMessage.prototype.method;
|
||||
|
||||
/**
|
||||
* @type {?string}
|
||||
*/
|
||||
http.IncomingMessage.prototype.url;
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
* */
|
||||
http.IncomingMessage.prototype.headers;
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
* */
|
||||
http.IncomingMessage.prototype.trailers;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
@@ -458,105 +99,135 @@ http.IncomingMessage.prototype.httpVersionMajor;
|
||||
http.IncomingMessage.prototype.httpVersionMinor;
|
||||
|
||||
/**
|
||||
* @type {net.Socket}
|
||||
* @type {*}
|
||||
*/
|
||||
http.IncomingMessage.prototype.connection;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
http.IncomingMessage.prototype.headers;
|
||||
|
||||
/**
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
http.IncomingMessage.prototype.rawHeaders;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
http.IncomingMessage.prototype.trailers;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
http.IncomingMessage.prototype.rawTrailers;
|
||||
|
||||
/**
|
||||
* @param {number} msecs
|
||||
* @param {Function} callback
|
||||
* @return {NodeJS.Timer}
|
||||
*/
|
||||
http.IncomingMessage.prototype.setTimeout = function(msecs, callback) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
http.IncomingMessage.prototype.method;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
http.IncomingMessage.prototype.url;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @type {?number}
|
||||
*/
|
||||
http.IncomingMessage.prototype.statusCode;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
http.IncomingMessage.prototype.statusMessage;
|
||||
|
||||
/**
|
||||
* @type {net.Socket}
|
||||
*/
|
||||
http.IncomingMessage.prototype.socket;
|
||||
|
||||
/**
|
||||
* @param {Error=} error
|
||||
* @param {number} msecs
|
||||
* @param {function()} callback
|
||||
* @return {void}
|
||||
*/
|
||||
http.IncomingMessage.prototype.destroy = function(error) {};
|
||||
http.IncomingMessage.prototype.setTimeout;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {http.IncomingMessage}
|
||||
*/
|
||||
http.ClientResponse = function() {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
http.AgentOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
http.AgentOptions.prototype.keepAlive;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
http.AgentOptions.prototype.keepAliveMsecs;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
http.AgentOptions.prototype.maxSockets;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
http.AgentOptions.prototype.maxFreeSockets;
|
||||
|
||||
/**
|
||||
* @param {http.AgentOptions=} opts
|
||||
* @return {http.Agent}
|
||||
* @constructor
|
||||
* @extends events.EventEmitter
|
||||
* @private
|
||||
*/
|
||||
http.Agent = function(opts) {};
|
||||
http.ServerResponse = function() {};
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.writeContinue;
|
||||
|
||||
/**
|
||||
* @param {number} statusCode
|
||||
* @param {*=} reasonPhrase
|
||||
* @param {*=} headers
|
||||
*/
|
||||
http.ServerResponse.prototype.writeHead;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
http.ServerResponse.prototype.statusCode;
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {string} value
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.setHeader;
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {string|undefined} value
|
||||
*/
|
||||
http.ServerResponse.prototype.getHeader;
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.removeHeader;
|
||||
|
||||
/**
|
||||
* @param {string|Array|Buffer} chunk
|
||||
* @param {string=} encoding
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.write;
|
||||
|
||||
/**
|
||||
* @param {Object} headers
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.addTrailers;
|
||||
|
||||
/**
|
||||
* @param {(string|Array|Buffer)=} data
|
||||
* @param {string=} encoding
|
||||
* @return {void}
|
||||
*/
|
||||
http.ServerResponse.prototype.end;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends events.EventEmitter
|
||||
* @private
|
||||
*/
|
||||
http.ClientRequest = function() {};
|
||||
|
||||
/**
|
||||
* @param {string|Array|Buffer} chunk
|
||||
* @param {string=} encoding
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.write;
|
||||
|
||||
/**
|
||||
* @param {(string|Array|Buffer)=} data
|
||||
* @param {string=} encoding
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.end;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
http.ClientRequest.prototype.abort;
|
||||
|
||||
/**
|
||||
* @param {Object} options
|
||||
* @param {function(http.IncomingMessage)} callback
|
||||
* @return {http.ClientRequest}
|
||||
*/
|
||||
http.request;
|
||||
|
||||
/**
|
||||
* @param {Object} options
|
||||
* @param {function(http.IncomingMessage)} callback
|
||||
* @return {http.ClientRequest}
|
||||
*/
|
||||
http.get;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends events.EventEmitter
|
||||
*/
|
||||
http.Agent = function() {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -564,89 +235,18 @@ http.Agent = function(opts) {};
|
||||
http.Agent.prototype.maxSockets;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
* @type {number}
|
||||
*/
|
||||
http.Agent.prototype.sockets;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
* @type {Array.<http.ClientRequest>}
|
||||
*/
|
||||
http.Agent.prototype.requests;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
http.Agent.prototype.destroy = function() {};
|
||||
|
||||
/**
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
http.METHODS;
|
||||
|
||||
http.STATUS_CODES;
|
||||
|
||||
|
||||
/**
|
||||
* @param {(function(http.IncomingMessage, http.ServerResponse): void)=} requestListener
|
||||
* @return {http.Server}
|
||||
*/
|
||||
http.createServer = function(requestListener) {};
|
||||
|
||||
/**
|
||||
* @param {number=} port
|
||||
* @param {string=} host
|
||||
* @return {*}
|
||||
*/
|
||||
http.createClient = function(port, host) {};
|
||||
|
||||
/**
|
||||
* @param {http.RequestOptions} options
|
||||
* @param {(function(http.IncomingMessage): void)=} callback
|
||||
* @return {http.ClientRequest}
|
||||
*/
|
||||
http.request = function(options, callback) {};
|
||||
|
||||
/**
|
||||
* @param {*} options
|
||||
* @param {(function(http.IncomingMessage): void)=} callback
|
||||
* @return {http.ClientRequest}
|
||||
*/
|
||||
http.get = function(options, callback) {};
|
||||
|
||||
/**
|
||||
* @type {http.Agent}
|
||||
*/
|
||||
http.globalAgent;
|
||||
|
||||
module.exports.RequestOptions = http.RequestOptions;
|
||||
|
||||
module.exports.Server = http.Server;
|
||||
|
||||
module.exports.ServerRequest = http.ServerRequest;
|
||||
|
||||
module.exports.ServerResponse = http.ServerResponse;
|
||||
|
||||
module.exports.ClientRequest = http.ClientRequest;
|
||||
|
||||
module.exports.IncomingMessage = http.IncomingMessage;
|
||||
|
||||
module.exports.ClientResponse = http.ClientResponse;
|
||||
|
||||
module.exports.AgentOptions = http.AgentOptions;
|
||||
|
||||
module.exports.Agent = http.Agent;
|
||||
|
||||
module.exports.METHODS = http.METHODS;
|
||||
|
||||
module.exports.STATUS_CODES = http.STATUS_CODES;
|
||||
|
||||
module.exports.createServer = http.createServer;
|
||||
|
||||
module.exports.createClient = http.createClient;
|
||||
|
||||
module.exports.request = http.request;
|
||||
|
||||
module.exports.get = http.get;
|
||||
|
||||
module.exports.globalAgent = http.globalAgent;
|
||||
|
||||
module.exports = http;
|
||||
|
||||
@@ -1,270 +1,84 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "https"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's https module. Depends on the tls module.
|
||||
* @see http://nodejs.org/api/https.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/https.js
|
||||
*/
|
||||
|
||||
var http = require('http');
|
||||
var tls = require('tls');
|
||||
|
||||
/** @const */
|
||||
var https = {};
|
||||
|
||||
var tls = require("tls");
|
||||
|
||||
var http = require("http");
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
https.ServerOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.ServerOptions.prototype.pfx;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.ServerOptions.prototype.key;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
https.ServerOptions.prototype.passphrase;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.ServerOptions.prototype.cert;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.ServerOptions.prototype.ca;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.ServerOptions.prototype.crl;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
https.ServerOptions.prototype.ciphers;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
https.ServerOptions.prototype.honorCipherOrder;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
https.ServerOptions.prototype.requestCert;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
https.ServerOptions.prototype.rejectUnauthorized;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.ServerOptions.prototype.NPNProtocols;
|
||||
|
||||
/**
|
||||
* @type {(function(string, (function(Error, tls.SecureContext): *)): *)}
|
||||
*/
|
||||
https.ServerOptions.prototype.SNICallback;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {http.RequestOptions}
|
||||
*/
|
||||
https.RequestOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.RequestOptions.prototype.pfx;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.RequestOptions.prototype.key;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
https.RequestOptions.prototype.passphrase;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.RequestOptions.prototype.cert;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.RequestOptions.prototype.ca;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
https.RequestOptions.prototype.ciphers;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
https.RequestOptions.prototype.rejectUnauthorized;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
https.RequestOptions.prototype.secureProtocol;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {http.Agent}
|
||||
*/
|
||||
https.Agent = function() {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {http.AgentOptions}
|
||||
*/
|
||||
https.AgentOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.AgentOptions.prototype.pfx;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.AgentOptions.prototype.key;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
https.AgentOptions.prototype.passphrase;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.AgentOptions.prototype.cert;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
https.AgentOptions.prototype.ca;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
https.AgentOptions.prototype.ciphers;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
https.AgentOptions.prototype.rejectUnauthorized;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
https.AgentOptions.prototype.secureProtocol;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
https.AgentOptions.prototype.maxCachedSessions;
|
||||
|
||||
/**
|
||||
* @type {(function(new: https.Agent, https.AgentOptions=))}
|
||||
*/
|
||||
https.Agent;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {tls.Server}
|
||||
* @constructor
|
||||
* @extends tls.Server
|
||||
*/
|
||||
https.Server = function() {};
|
||||
|
||||
/**
|
||||
* @param {https.ServerOptions} options
|
||||
* @param {Function=} requestListener
|
||||
* @return {https.Server}
|
||||
* @param {...*} var_args
|
||||
* @return {void}
|
||||
*/
|
||||
https.createServer = function(options, requestListener) {};
|
||||
https.Server.prototype.listen;
|
||||
|
||||
/**
|
||||
* @param {https.RequestOptions} options
|
||||
* @param {(function(http.IncomingMessage): void)=} callback
|
||||
* @return {http.ClientRequest}
|
||||
* @param {function()=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
https.request = function(options, callback) {};
|
||||
https.Server.prototype.close;
|
||||
|
||||
/**
|
||||
* @param {https.RequestOptions} options
|
||||
* @param {(function(http.IncomingMessage): void)=} callback
|
||||
* @param {tls.CreateOptions} options
|
||||
* @param {function(http.IncomingMessage, http.ServerResponse)=} requestListener
|
||||
* @return {!https.Server}
|
||||
*/
|
||||
https.createServer;
|
||||
|
||||
/**
|
||||
* @typedef {{host: ?string, hostname: ?string, port: ?number, method: ?string, path: ?string, headers: ?Object.<string,string>, auth: ?string, agent: ?(https.Agent|boolean), pfx: ?(string|Buffer), key: ?(string|Buffer), passphrase: ?string, cert: ?(string|Buffer), ca: ?Array.<string>, ciphers: ?string, rejectUnauthorized: ?boolean}}
|
||||
*/
|
||||
https.ConnectOptions;
|
||||
|
||||
/**
|
||||
* @param {https.ConnectOptions|string} options
|
||||
* @param {function(http.IncomingMessage)} callback
|
||||
* @return {http.ClientRequest}
|
||||
*/
|
||||
https.get = function(options, callback) {};
|
||||
https.request;
|
||||
|
||||
/**
|
||||
* @param {https.ConnectOptions|string} options
|
||||
* @param {function(http.IncomingMessage)} callback
|
||||
* @return {http.ClientRequest}
|
||||
*/
|
||||
https.get;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends http.Agent
|
||||
*/
|
||||
https.Agent = function() {};
|
||||
|
||||
/**
|
||||
* @type {https.Agent}
|
||||
*/
|
||||
https.globalAgent;
|
||||
|
||||
module.exports.ServerOptions = https.ServerOptions;
|
||||
|
||||
module.exports.RequestOptions = https.RequestOptions;
|
||||
|
||||
module.exports.Agent = https.Agent;
|
||||
|
||||
module.exports.AgentOptions = https.AgentOptions;
|
||||
|
||||
module.exports.Agent = https.Agent;
|
||||
|
||||
module.exports.Server = https.Server;
|
||||
|
||||
module.exports.createServer = https.createServer;
|
||||
|
||||
module.exports.request = https.request;
|
||||
|
||||
module.exports.get = https.get;
|
||||
|
||||
module.exports.globalAgent = https.globalAgent;
|
||||
|
||||
module.exports = https;
|
||||
|
||||
@@ -1,108 +1,116 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "net"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's net module. Depends on the events and buffer modules.
|
||||
* @see http://nodejs.org/api/net.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/net.js
|
||||
*/
|
||||
|
||||
var events = require('events');
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var net = {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Duplex}
|
||||
* @typedef {{allowHalfOpen: ?boolean}}
|
||||
*/
|
||||
net.Socket = function() {};
|
||||
net.CreateOptions;
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @return {boolean}
|
||||
* @param {(net.CreateOptions|function(...))=} options
|
||||
* @param {function(...)=} connectionListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Socket.prototype.write = function(buffer) {};
|
||||
net.createServer;
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @param {Function=} cb
|
||||
* @return {boolean}
|
||||
* @typedef {{port: ?number, host: ?string, localAddress: ?string, path: ?string, allowHalfOpen: ?boolean}}
|
||||
*/
|
||||
net.Socket.prototype.write = function(buffer, cb) {};
|
||||
net.ConnectOptions;
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {Function=} cb
|
||||
* @return {boolean}
|
||||
*/
|
||||
net.Socket.prototype.write = function(str, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @param {Function=} cb
|
||||
* @return {boolean}
|
||||
*/
|
||||
net.Socket.prototype.write = function(str, encoding, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @param {string=} fd
|
||||
* @return {boolean}
|
||||
*/
|
||||
net.Socket.prototype.write = function(str, encoding, fd) {};
|
||||
|
||||
/**
|
||||
* @param {*} data
|
||||
* @param {string=} encoding
|
||||
* @param {Function=} callback
|
||||
* @param {net.ConnectOptions|number|string} arg1
|
||||
* @param {(function(...)|string)=} arg2
|
||||
* @param {function(...)=} arg3
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.write = function(data, encoding, callback) {};
|
||||
net.connect;
|
||||
|
||||
/**
|
||||
* @param {number} port
|
||||
* @param {string=} host
|
||||
* @param {Function=} connectionListener
|
||||
* @param {net.ConnectOptions|number|string} arg1
|
||||
* @param {(function(...)|string)=} arg2
|
||||
* @param {function(...)=} arg3
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.connect = function(port, host, connectionListener) {};
|
||||
net.createConnection;
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @param {Function=} connectionListener
|
||||
* @constructor
|
||||
* @extends events.EventEmitter
|
||||
*/
|
||||
net.Server = function() {};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {number|*} port
|
||||
* @param {(string|number|function(...))=} host
|
||||
* @param {(number|function(...))=} backlog
|
||||
* @param {function(...)=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.connect = function(path, connectionListener) {};
|
||||
net.Server.prototype.listen;
|
||||
|
||||
/**
|
||||
* @param {function(...)=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
net.Server.prototype.close;
|
||||
|
||||
/**
|
||||
* @return {{port: number, family: string, address: string}}
|
||||
*/
|
||||
net.Server.prototype.address;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
net.Server.prototype.maxConnectinos;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
net.Server.prototype.connections;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {{fd: ?*, type: ?string, allowHalfOpen: ?boolean}=} options
|
||||
* @extends events.EventEmitter
|
||||
*/
|
||||
net.Socket = function(options) {};
|
||||
|
||||
/**
|
||||
* @param {number|string|function(...)} port
|
||||
* @param {(string|function(...))=} host
|
||||
* @param {function(...)=} connectListener
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.connect;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -110,10 +118,25 @@ net.Socket.prototype.connect = function(path, connectionListener) {};
|
||||
net.Socket.prototype.bufferSize;
|
||||
|
||||
/**
|
||||
* @param {?string=} encoding
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.setEncoding;
|
||||
|
||||
/**
|
||||
* @param {string|Buffer} data
|
||||
* @param {(string|function(...))=}encoding
|
||||
* @param {function(...)=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.write;
|
||||
|
||||
/**
|
||||
* @param {(string|Buffer)=}data
|
||||
* @param {string=} encoding
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.setEncoding = function(encoding) {};
|
||||
net.Socket.prototype.end;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
@@ -121,75 +144,50 @@ net.Socket.prototype.setEncoding = function(encoding) {};
|
||||
net.Socket.prototype.destroy = function() {};
|
||||
|
||||
/**
|
||||
* @return {net.Socket}
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.pause = function() {};
|
||||
|
||||
/**
|
||||
* @return {net.Socket}
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.resume = function() {};
|
||||
net.Socket.prototype.resume;
|
||||
|
||||
/**
|
||||
* @param {number} timeout
|
||||
* @param {Function=} callback
|
||||
* @param {function(...)=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.setTimeout = function(timeout, callback) {};
|
||||
net.Socket.prototype.setTimeout;
|
||||
|
||||
/**
|
||||
* @param {boolean=} noDelay
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.setNoDelay = function(noDelay) {};
|
||||
net.Socket.prototype.setNoDelay;
|
||||
|
||||
/**
|
||||
* @param {boolean=} enable
|
||||
* @param {(boolean|number)=} enable
|
||||
* @param {number=} initialDelay
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.setKeepAlive = function(enable, initialDelay) {};
|
||||
net.Socket.prototype.setKeepAlive;
|
||||
|
||||
/**
|
||||
* @return {{port: number, family: string, address: string}}
|
||||
* @return {string}
|
||||
*/
|
||||
net.Socket.prototype.address = function() {};
|
||||
net.Socket.prototype.address;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.unref = function() {};
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.ref = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @type {?string}
|
||||
*/
|
||||
net.Socket.prototype.remoteAddress;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
net.Socket.prototype.remoteFamily;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @type {?number}
|
||||
*/
|
||||
net.Socket.prototype.remotePort;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
net.Socket.prototype.localAddress;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
net.Socket.prototype.localPort;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
@@ -201,288 +199,21 @@ net.Socket.prototype.bytesRead;
|
||||
net.Socket.prototype.bytesWritten;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.end = function() {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @param {Function=} cb
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.end = function(buffer, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {Function=} cb
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.end = function(str, cb) {};
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} encoding
|
||||
* @param {Function=} cb
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.end = function(str, encoding, cb) {};
|
||||
|
||||
/**
|
||||
* @param {*=} data
|
||||
* @param {string=} encoding
|
||||
* @return {void}
|
||||
*/
|
||||
net.Socket.prototype.end = function(data, encoding) {};
|
||||
|
||||
/**
|
||||
* @type {(function(new: net.Socket, {fd: string, type: string, allowHalfOpen: boolean}=))}
|
||||
*/
|
||||
net.Socket;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
net.ListenOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
net.ListenOptions.prototype.port;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
net.ListenOptions.prototype.host;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
net.ListenOptions.prototype.backlog;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
net.ListenOptions.prototype.path;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
net.ListenOptions.prototype.exclusive;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {net.Socket}
|
||||
*/
|
||||
net.Server = function() {};
|
||||
|
||||
/**
|
||||
* @param {number} port
|
||||
* @param {string=} hostname
|
||||
* @param {number=} backlog
|
||||
* @param {Function=} listeningListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.listen = function(port, hostname, backlog, listeningListener) {};
|
||||
|
||||
/**
|
||||
* @param {number} port
|
||||
* @param {string=} hostname
|
||||
* @param {Function=} listeningListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.listen = function(port, hostname, listeningListener) {};
|
||||
|
||||
/**
|
||||
* @param {number} port
|
||||
* @param {number=} backlog
|
||||
* @param {Function=} listeningListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.listen = function(port, backlog, listeningListener) {};
|
||||
|
||||
/**
|
||||
* @param {number} port
|
||||
* @param {Function=} listeningListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.listen = function(port, listeningListener) {};
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @param {number=} backlog
|
||||
* @param {Function=} listeningListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.listen = function(path, backlog, listeningListener) {};
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @param {Function=} listeningListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.listen = function(path, listeningListener) {};
|
||||
|
||||
/**
|
||||
* @param {*} handle
|
||||
* @param {number=} backlog
|
||||
* @param {Function=} listeningListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.listen = function(handle, backlog, listeningListener) {};
|
||||
|
||||
/**
|
||||
* @param {*} handle
|
||||
* @param {Function=} listeningListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.listen = function(handle, listeningListener) {};
|
||||
|
||||
/**
|
||||
* @param {net.ListenOptions} options
|
||||
* @param {Function=} listeningListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.listen = function(options, listeningListener) {};
|
||||
|
||||
/**
|
||||
* @param {Function=} callback
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.close = function(callback) {};
|
||||
|
||||
/**
|
||||
* @return {{port: number, family: string, address: string}}
|
||||
*/
|
||||
net.Server.prototype.address = function() {};
|
||||
|
||||
/**
|
||||
* @param {(function(Error, number): void)} cb
|
||||
* @return {void}
|
||||
*/
|
||||
net.Server.prototype.getConnections = function(cb) {};
|
||||
|
||||
/**
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.ref = function() {};
|
||||
|
||||
/**
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.Server.prototype.unref = function() {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
net.Server.prototype.maxConnections;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
net.Server.prototype.connections;
|
||||
|
||||
/**
|
||||
* @param {(function(net.Socket): void)=} connectionListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.createServer = function(connectionListener) {};
|
||||
|
||||
/**
|
||||
* @param {{allowHalfOpen: boolean}=} options
|
||||
* @param {(function(net.Socket): void)=} connectionListener
|
||||
* @return {net.Server}
|
||||
*/
|
||||
net.createServer = function(options, connectionListener) {};
|
||||
|
||||
/**
|
||||
* @param {{port: number, host: string, localAddress: string, localPort: string, family: number, allowHalfOpen: boolean}} options
|
||||
* @param {Function=} connectionListener
|
||||
* @return {net.Socket}
|
||||
*/
|
||||
net.connect = function(options, connectionListener) {};
|
||||
|
||||
/**
|
||||
* @param {number} port
|
||||
* @param {string=} host
|
||||
* @param {Function=} connectionListener
|
||||
* @return {net.Socket}
|
||||
*/
|
||||
net.connect = function(port, host, connectionListener) {};
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @param {Function=} connectionListener
|
||||
* @return {net.Socket}
|
||||
*/
|
||||
net.connect = function(path, connectionListener) {};
|
||||
|
||||
/**
|
||||
* @param {{port: number, host: string, localAddress: string, localPort: string, family: number, allowHalfOpen: boolean}} options
|
||||
* @param {Function=} connectionListener
|
||||
* @return {net.Socket}
|
||||
*/
|
||||
net.createConnection = function(options, connectionListener) {};
|
||||
|
||||
/**
|
||||
* @param {number} port
|
||||
* @param {string=} host
|
||||
* @param {Function=} connectionListener
|
||||
* @return {net.Socket}
|
||||
*/
|
||||
net.createConnection = function(port, host, connectionListener) {};
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @param {Function=} connectionListener
|
||||
* @return {net.Socket}
|
||||
*/
|
||||
net.createConnection = function(path, connectionListener) {};
|
||||
|
||||
/**
|
||||
* @param {string} input
|
||||
* @param {*} input
|
||||
* @return {number}
|
||||
*/
|
||||
net.isIP = function(input) {};
|
||||
net.isIP;
|
||||
|
||||
/**
|
||||
* @param {string} input
|
||||
* @param {*} input
|
||||
* @return {boolean}
|
||||
*/
|
||||
net.isIPv4 = function(input) {};
|
||||
net.isIPv4;
|
||||
|
||||
/**
|
||||
* @param {string} input
|
||||
* @param {*} input
|
||||
* @return {boolean}
|
||||
*/
|
||||
net.isIPv6 = function(input) {};
|
||||
|
||||
module.exports.Socket = net.Socket;
|
||||
|
||||
module.exports.Socket = net.Socket;
|
||||
|
||||
module.exports.ListenOptions = net.ListenOptions;
|
||||
|
||||
module.exports.Server = net.Server;
|
||||
|
||||
module.exports.createServer = net.createServer;
|
||||
|
||||
module.exports.createServer = net.createServer;
|
||||
|
||||
module.exports.connect = net.connect;
|
||||
|
||||
module.exports.connect = net.connect;
|
||||
|
||||
module.exports.connect = net.connect;
|
||||
|
||||
module.exports.createConnection = net.createConnection;
|
||||
|
||||
module.exports.createConnection = net.createConnection;
|
||||
|
||||
module.exports.createConnection = net.createConnection;
|
||||
|
||||
module.exports.isIP = net.isIP;
|
||||
|
||||
module.exports.isIPv4 = net.isIPv4;
|
||||
|
||||
module.exports.isIPv6 = net.isIPv6;
|
||||
net.isIPv6;
|
||||
|
||||
module.exports = net;
|
||||
|
||||
@@ -1,258 +1,113 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "os"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's os module.
|
||||
* @see http://nodejs.org/api/os.html
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/** @const */
|
||||
var os = {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.CpuInfo = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
os.CpuInfo.prototype.model;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
os.CpuInfo.prototype.speed;
|
||||
|
||||
os.CpuInfo.prototype.times;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
os.CpuInfo.prototype.times.user;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
os.CpuInfo.prototype.times.nice;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
os.CpuInfo.prototype.times.sys;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
os.CpuInfo.prototype.times.idle;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
os.CpuInfo.prototype.times.irq;
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
os.NetworkInterfaceInfo = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
os.NetworkInterfaceInfo.prototype.address;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
os.NetworkInterfaceInfo.prototype.netmask;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
os.NetworkInterfaceInfo.prototype.family;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
os.NetworkInterfaceInfo.prototype.mac;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
os.NetworkInterfaceInfo.prototype.internal;
|
||||
os.tmpdir;
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.hostname = function() {};
|
||||
os.hostname;
|
||||
|
||||
/**
|
||||
* @return {Array<number>}
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.loadavg = function() {};
|
||||
os.type;
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.platform;
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.arch;
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.release;
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.uptime = function() {};
|
||||
os.uptime;
|
||||
|
||||
/**
|
||||
* @return {Array.<number>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.loadavg;
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.freemem = function() {};
|
||||
os.totalmem;
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.totalmem = function() {};
|
||||
os.freemem;
|
||||
|
||||
/**
|
||||
* @return {Array<os.CpuInfo>}
|
||||
* @typedef {{model: string, speed: number, times: {user: number, nice: number, sys: number, idle: number, irg: number}}}
|
||||
*/
|
||||
os.cpus = function() {};
|
||||
var osCpusInfo;
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
* @return {Array.<osCpusInfo>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.type = function() {};
|
||||
os.cpus;
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
* @typedef {{address: string, family: string, internal: boolean}}
|
||||
*/
|
||||
os.release = function() {};
|
||||
var osNetworkInterfacesInfo;
|
||||
|
||||
/**
|
||||
* @return {Object<string,Array<os.NetworkInterfaceInfo>>}
|
||||
* @return {Object.<string,osNetworkInterfacesInfo>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
os.networkInterfaces = function() {};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
os.homedir = function() {};
|
||||
|
||||
/**
|
||||
* @param {{encoding: string}=} options
|
||||
* @return {{username: string, uid: number, gid: number, shell: *, homedir: string}}
|
||||
*/
|
||||
os.userInfo = function(options) {};
|
||||
|
||||
os.constants;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
os.constants.UV_UDP_REUSEADDR;
|
||||
|
||||
/**
|
||||
* @type {{SIGHUP: number, SIGINT: number, SIGQUIT: number, SIGILL: number, SIGTRAP: number, SIGABRT: number, SIGIOT: number, SIGBUS: number, SIGFPE: number, SIGKILL: number, SIGUSR1: number, SIGSEGV: number, SIGUSR2: number, SIGPIPE: number, SIGALRM: number, SIGTERM: number, SIGCHLD: number, SIGSTKFLT: number, SIGCONT: number, SIGSTOP: number, SIGTSTP: number, SIGTTIN: number, SIGTTOU: number, SIGURG: number, SIGXCPU: number, SIGXFSZ: number, SIGVTALRM: number, SIGPROF: number, SIGWINCH: number, SIGIO: number, SIGPOLL: number, SIGPWR: number, SIGSYS: number, SIGUNUSED: number}}
|
||||
*/
|
||||
os.constants.errno;
|
||||
|
||||
/**
|
||||
* @type {{E2BIG: number, EACCES: number, EADDRINUSE: number, EADDRNOTAVAIL: number, EAFNOSUPPORT: number, EAGAIN: number, EALREADY: number, EBADF: number, EBADMSG: number, EBUSY: number, ECANCELED: number, ECHILD: number, ECONNABORTED: number, ECONNREFUSED: number, ECONNRESET: number, EDEADLK: number, EDESTADDRREQ: number, EDOM: number, EDQUOT: number, EEXIST: number, EFAULT: number, EFBIG: number, EHOSTUNREACH: number, EIDRM: number, EILSEQ: number, EINPROGRESS: number, EINTR: number, EINVAL: number, EIO: number, EISCONN: number, EISDIR: number, ELOOP: number, EMFILE: number, EMLINK: number, EMSGSIZE: number, EMULTIHOP: number, ENAMETOOLONG: number, ENETDOWN: number, ENETRESET: number, ENETUNREACH: number, ENFILE: number, ENOBUFS: number, ENODATA: number, ENODEV: number, ENOENT: number, ENOEXEC: number, ENOLCK: number, ENOLINK: number, ENOMEM: number, ENOMSG: number, ENOPROTOOPT: number, ENOSPC: number, ENOSR: number, ENOSTR: number, ENOSYS: number, ENOTCONN: number, ENOTDIR: number, ENOTEMPTY: number, ENOTSOCK: number, ENOTSUP: number, ENOTTY: number, ENXIO: number, EOPNOTSUPP: number, EOVERFLOW: number, EPERM: number, EPIPE: number, EPROTO: number, EPROTONOSUPPORT: number, EPROTOTYPE: number, ERANGE: number, EROFS: number, ESPIPE: number, ESRCH: number, ESTALE: number, ETIME: number, ETIMEDOUT: number, ETXTBSY: number, EWOULDBLOCK: number, EXDEV: number}}
|
||||
*/
|
||||
os.constants.signals;
|
||||
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
os.arch = function() {};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
os.platform = function() {};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
os.tmpdir = function() {};
|
||||
os.networkInterfaces;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
os.EOL;
|
||||
|
||||
/**
|
||||
* @return {(string)}
|
||||
*/
|
||||
os.endianness = function() {};
|
||||
|
||||
module.exports.CpuInfo = os.CpuInfo;
|
||||
|
||||
module.exports.NetworkInterfaceInfo = os.NetworkInterfaceInfo;
|
||||
|
||||
module.exports.hostname = os.hostname;
|
||||
|
||||
module.exports.loadavg = os.loadavg;
|
||||
|
||||
module.exports.uptime = os.uptime;
|
||||
|
||||
module.exports.freemem = os.freemem;
|
||||
|
||||
module.exports.totalmem = os.totalmem;
|
||||
|
||||
module.exports.cpus = os.cpus;
|
||||
|
||||
module.exports.type = os.type;
|
||||
|
||||
module.exports.release = os.release;
|
||||
|
||||
module.exports.networkInterfaces = os.networkInterfaces;
|
||||
|
||||
module.exports.homedir = os.homedir;
|
||||
|
||||
module.exports.userInfo = os.userInfo;
|
||||
|
||||
module.exports.constants = os.constants;
|
||||
|
||||
module.exports.arch = os.arch;
|
||||
|
||||
module.exports.platform = os.platform;
|
||||
|
||||
module.exports.tmpdir = os.tmpdir;
|
||||
|
||||
module.exports.EOL = os.EOL;
|
||||
|
||||
module.exports.endianness = os.endianness;
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
os.tmpDir = function() {};
|
||||
|
||||
module.exports.tmpDir = os.tmpDir;
|
||||
|
||||
module.exports = os;
|
||||
|
||||
@@ -1,129 +1,88 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's path module.
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "path"
|
||||
* @see http://nodejs.org/api/path.html
|
||||
*/
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var path = {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
path.ParsedPath = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
path.ParsedPath.prototype.root;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
path.ParsedPath.prototype.dir;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
path.ParsedPath.prototype.base;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
path.ParsedPath.prototype.ext;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
path.ParsedPath.prototype.name;
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
path.normalize = function(p) {};
|
||||
path.normalize;
|
||||
|
||||
/**
|
||||
* @param {...*} paths
|
||||
* @param {...string} var_args
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
path.join = function(paths) {};
|
||||
path.join;
|
||||
|
||||
/**
|
||||
* @param {...string} paths
|
||||
* @param {string} from
|
||||
* @param {string=} to
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
path.join = function(paths) {};
|
||||
|
||||
/**
|
||||
* @param {...*} pathSegments
|
||||
* @return {string}
|
||||
*/
|
||||
path.resolve = function(pathSegments) {};
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @return {boolean}
|
||||
*/
|
||||
path.isAbsolute = function(path) {};
|
||||
path.resolve;
|
||||
|
||||
/**
|
||||
* @param {string} from
|
||||
* @param {string} to
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
path.relative = function(from, to) {};
|
||||
path.relative;
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
path.dirname = function(p) {};
|
||||
path.dirname;
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @param {string=} ext
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
path.basename = function(p, ext) {};
|
||||
path.basename;
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
path.extname = function(p) {};
|
||||
path.extname;
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
*/
|
||||
path.isAbsolute;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
@@ -135,222 +94,4 @@ path.sep;
|
||||
*/
|
||||
path.delimiter;
|
||||
|
||||
/**
|
||||
* @param {string} pathString
|
||||
* @return {path.ParsedPath}
|
||||
*/
|
||||
path.parse = function(pathString) {};
|
||||
|
||||
/**
|
||||
* @param {path.ParsedPath} pathObject
|
||||
* @return {string}
|
||||
*/
|
||||
path.format = function(pathObject) {};
|
||||
|
||||
path.posix = path.posix || {};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {string}
|
||||
*/
|
||||
path.posix.normalize = function(p) {};
|
||||
|
||||
/**
|
||||
* @param {...*} paths
|
||||
* @return {string}
|
||||
*/
|
||||
path.posix.join = function(paths) {};
|
||||
|
||||
/**
|
||||
* @param {...*} pathSegments
|
||||
* @return {string}
|
||||
*/
|
||||
path.posix.resolve = function(pathSegments) {};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {boolean}
|
||||
*/
|
||||
path.posix.isAbsolute = function(p) {};
|
||||
|
||||
/**
|
||||
* @param {string} from
|
||||
* @param {string} to
|
||||
* @return {string}
|
||||
*/
|
||||
path.posix.relative = function(from, to) {};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {string}
|
||||
*/
|
||||
path.posix.dirname = function(p) {};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @param {string=} ext
|
||||
* @return {string}
|
||||
*/
|
||||
path.posix.basename = function(p, ext) {};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {string}
|
||||
*/
|
||||
path.posix.extname = function(p) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
path.posix.sep;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
path.posix.delimiter;
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {path.ParsedPath}
|
||||
*/
|
||||
path.posix.parse = function(p) {};
|
||||
|
||||
/**
|
||||
* @param {path.ParsedPath} pP
|
||||
* @return {string}
|
||||
*/
|
||||
path.posix.format = function(pP) {};
|
||||
|
||||
|
||||
path.win32 = path.win32 || {};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {string}
|
||||
*/
|
||||
path.win32.normalize = function(p) {};
|
||||
|
||||
/**
|
||||
* @param {...*} paths
|
||||
* @return {string}
|
||||
*/
|
||||
path.win32.join = function(paths) {};
|
||||
|
||||
/**
|
||||
* @param {...*} pathSegments
|
||||
* @return {string}
|
||||
*/
|
||||
path.win32.resolve = function(pathSegments) {};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {boolean}
|
||||
*/
|
||||
path.win32.isAbsolute = function(p) {};
|
||||
|
||||
/**
|
||||
* @param {string} from
|
||||
* @param {string} to
|
||||
* @return {string}
|
||||
*/
|
||||
path.win32.relative = function(from, to) {};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {string}
|
||||
*/
|
||||
path.win32.dirname = function(p) {};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @param {string=} ext
|
||||
* @return {string}
|
||||
*/
|
||||
path.win32.basename = function(p, ext) {};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {string}
|
||||
*/
|
||||
path.win32.extname = function(p) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
path.win32.sep;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
path.win32.delimiter;
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {path.ParsedPath}
|
||||
*/
|
||||
path.win32.parse = function(p) {};
|
||||
|
||||
/**
|
||||
* @param {path.ParsedPath} pP
|
||||
* @return {string}
|
||||
*/
|
||||
path.win32.format = function(pP) {};
|
||||
|
||||
|
||||
module.exports.ParsedPath = path.ParsedPath;
|
||||
|
||||
module.exports.normalize = path.normalize;
|
||||
|
||||
module.exports.join = path.join;
|
||||
|
||||
module.exports.join = path.join;
|
||||
|
||||
module.exports.resolve = path.resolve;
|
||||
|
||||
module.exports.isAbsolute = path.isAbsolute;
|
||||
|
||||
module.exports.relative = path.relative;
|
||||
|
||||
module.exports.dirname = path.dirname;
|
||||
|
||||
module.exports.basename = path.basename;
|
||||
|
||||
module.exports.extname = path.extname;
|
||||
|
||||
module.exports.sep = path.sep;
|
||||
|
||||
module.exports.delimiter = path.delimiter;
|
||||
|
||||
module.exports.parse = path.parse;
|
||||
|
||||
module.exports.format = path.format;
|
||||
|
||||
module.exports.posix = path.posix;
|
||||
|
||||
module.exports.win32 = path.win32;
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @return {string}
|
||||
*/
|
||||
path._makeLong = function(path) {};
|
||||
|
||||
module.exports._makeLong = path._makeLong;
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @param {(function(boolean): *)} callback
|
||||
* @return {boolean}
|
||||
*/
|
||||
path.exists = function(path, callback) {};
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @return {boolean}
|
||||
*/
|
||||
path.existsSync = function(path) {};
|
||||
|
||||
module.exports.exists = path.exists;
|
||||
|
||||
module.exports.existsSync = path.existsSync;
|
||||
|
||||
module.exports = path;
|
||||
|
||||
@@ -1,104 +1,74 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "punycode"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's punycode module.
|
||||
* @see http://nodejs.org/api/punycode.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/punycode.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var punycode = {};
|
||||
|
||||
/**
|
||||
* @param {string} string
|
||||
* @return {string}
|
||||
*/
|
||||
punycode.decode = function(string) {};
|
||||
punycode.decode;
|
||||
|
||||
/**
|
||||
* @param {string} string
|
||||
* @return {string}
|
||||
*/
|
||||
punycode.encode = function(string) {};
|
||||
punycode.encode;
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @return {string}
|
||||
*/
|
||||
punycode.toUnicode = function(domain) {};
|
||||
punycode.toUnicode;
|
||||
|
||||
/**
|
||||
* @param {string} domain
|
||||
* @return {string}
|
||||
*/
|
||||
punycode.toASCII = function(domain) {};
|
||||
punycode.toASCII;
|
||||
|
||||
/**
|
||||
* @type {punycode.ucs2}
|
||||
* @type {Object.<string,*>}
|
||||
*/
|
||||
punycode.ucs2;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
function ucs2() {}
|
||||
punycode.ucs2 = {};
|
||||
|
||||
/**
|
||||
* @param {string} string
|
||||
* @return {Array<number>}
|
||||
* @return {Array.<number>}
|
||||
*/
|
||||
ucs2.prototype.decode = function(string) {};
|
||||
punycode.ucs2.decode;
|
||||
|
||||
/**
|
||||
* @param {Array<number>} codePoints
|
||||
* @param {Array.<number>} codePoints
|
||||
* @return {string}
|
||||
*/
|
||||
ucs2.prototype.encode = function(codePoints) {};
|
||||
punycode.ucs2.encode;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
* @type {string}
|
||||
*/
|
||||
punycode.version;
|
||||
|
||||
module.exports.decode = punycode.decode;
|
||||
|
||||
module.exports.encode = punycode.encode;
|
||||
|
||||
module.exports.toUnicode = punycode.toUnicode;
|
||||
|
||||
module.exports.toASCII = punycode.toASCII;
|
||||
|
||||
module.exports.ucs2 = punycode.ucs2;
|
||||
|
||||
module.exports.version = punycode.version;
|
||||
|
||||
module.exports = punycode;
|
||||
|
||||
@@ -1,130 +1,66 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "querystring"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's querystring module.
|
||||
* @see http://nodejs.org/api/querystring.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/querystring.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var querystring = {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
querystring.StringifyOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {Function}
|
||||
*/
|
||||
querystring.StringifyOptions.prototype.encodeURIComponent;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
querystring.ParseOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
querystring.ParseOptions.prototype.maxKeys;
|
||||
|
||||
/**
|
||||
* @type {Function}
|
||||
*/
|
||||
querystring.ParseOptions.prototype.decodeURIComponent;
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @param {T} obj
|
||||
* @param {Object.<string,*>} obj
|
||||
* @param {string=} sep
|
||||
* @param {string=} eq
|
||||
* @param {querystring.StringifyOptions=} options
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
querystring.stringify = function(obj, sep, eq, options) {};
|
||||
querystring.stringify;
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {string=} sep
|
||||
* @param {string=} eq
|
||||
* @param {querystring.ParseOptions=} options
|
||||
* @return {*}
|
||||
* @param {*=} options
|
||||
* @return {Object.<string|!Array.<string>>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
querystring.parse = function(str, sep, eq, options) {};
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @param {string} str
|
||||
* @param {string=} sep
|
||||
* @param {string=} eq
|
||||
* @param {querystring.ParseOptions=} options
|
||||
* @return {T}
|
||||
*/
|
||||
querystring.parse = function(str, sep, eq, options) {};
|
||||
querystring.parse;
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @return {string}
|
||||
*/
|
||||
querystring.escape = function(str) {};
|
||||
querystring.escape;
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @return {string}
|
||||
*/
|
||||
querystring.unescape = function(str) {};
|
||||
|
||||
module.exports.StringifyOptions = querystring.StringifyOptions;
|
||||
|
||||
module.exports.ParseOptions = querystring.ParseOptions;
|
||||
|
||||
module.exports.stringify = querystring.stringify;
|
||||
|
||||
module.exports.parse = querystring.parse;
|
||||
|
||||
module.exports.parse = querystring.parse;
|
||||
|
||||
module.exports.escape = querystring.escape;
|
||||
|
||||
module.exports.unescape = querystring.unescape;
|
||||
querystring.unescape;
|
||||
|
||||
/**
|
||||
* @param {Buffer} s
|
||||
* @param {boolean} decodeSpaces
|
||||
* @return {void}
|
||||
*/
|
||||
querystring.unescapeBuffer = function(s, decodeSpaces) {};
|
||||
|
||||
module.exports.unescapeBuffer = querystring.unescapeBuffer;
|
||||
querystring.unescapeBuffer;
|
||||
|
||||
module.exports = querystring;
|
||||
|
||||
@@ -1,247 +1,84 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "readline"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's readline module. Depends on the events module.
|
||||
* @see http://nodejs.org/api/readline.html
|
||||
*/
|
||||
|
||||
var events = require('events');
|
||||
var stream = require('stream');
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var readline = {};
|
||||
|
||||
var events = require("events");
|
||||
|
||||
var stream = require("stream");
|
||||
/**
|
||||
* @param {{input: stream.ReadableStream, output: stream.WritableStream, completer: function(string, function(*, Array)=), terminal: boolean}} options
|
||||
* @return {readline.Interface}
|
||||
*/
|
||||
readline.createInterface;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @constructor
|
||||
* @extends events.EventEmitter
|
||||
*/
|
||||
readline.Key = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
readline.Key.prototype.sequence;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
readline.Key.prototype.name;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
readline.Key.prototype.ctrl;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
readline.Key.prototype.meta;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
readline.Key.prototype.shift;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {events.EventEmitter}
|
||||
*/
|
||||
readline.ReadLine = function() {};
|
||||
readline.Interface = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} prompt
|
||||
* @param {number} length
|
||||
* @return {void}
|
||||
*/
|
||||
readline.ReadLine.prototype.setPrompt = function(prompt) {};
|
||||
readline.Interface.prototype.setPrompt;
|
||||
|
||||
/**
|
||||
* @param {boolean=} preserveCursor
|
||||
* @return {void}
|
||||
*/
|
||||
readline.ReadLine.prototype.prompt = function(preserveCursor) {};
|
||||
readline.Interface.prototype.prompt;
|
||||
|
||||
/**
|
||||
* @param {string} query
|
||||
* @param {(function(string): void)} callback
|
||||
* @param {function(string)} callback
|
||||
* @return {void}
|
||||
*/
|
||||
readline.ReadLine.prototype.question = function(query, callback) {};
|
||||
|
||||
/**
|
||||
* @return {readline.ReadLine}
|
||||
*/
|
||||
readline.ReadLine.prototype.pause = function() {};
|
||||
|
||||
/**
|
||||
* @return {readline.ReadLine}
|
||||
*/
|
||||
readline.ReadLine.prototype.resume = function() {};
|
||||
readline.Interface.prototype.question;
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
readline.ReadLine.prototype.close = function() {};
|
||||
readline.Interface.prototype.pause;
|
||||
|
||||
/**
|
||||
* @param {(string|Buffer)} data
|
||||
* @param {readline.Key=} key
|
||||
* @return {void}
|
||||
*/
|
||||
readline.ReadLine.prototype.write = function(data, key) {};
|
||||
readline.Interface.prototype.resume;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @type {((function(string): readline.CompleterResult)|(function(string, (function(*, readline.CompleterResult): void)): *))}
|
||||
*/
|
||||
readline.Completer = function() {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
readline.CompleterResult = function() {};
|
||||
|
||||
/**
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
readline.CompleterResult.prototype.completions;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
readline.CompleterResult.prototype.line;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
readline.ReadLineOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {NodeJS.ReadableStream}
|
||||
*/
|
||||
readline.ReadLineOptions.prototype.input;
|
||||
|
||||
/**
|
||||
* @type {NodeJS.WritableStream}
|
||||
*/
|
||||
readline.ReadLineOptions.prototype.output;
|
||||
|
||||
/**
|
||||
* @type {readline.Completer}
|
||||
*/
|
||||
readline.ReadLineOptions.prototype.completer;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
readline.ReadLineOptions.prototype.terminal;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
readline.ReadLineOptions.prototype.historySize;
|
||||
|
||||
/**
|
||||
* @param {NodeJS.ReadableStream} input
|
||||
* @param {NodeJS.WritableStream=} output
|
||||
* @param {readline.Completer=} completer
|
||||
* @param {boolean=} terminal
|
||||
* @return {readline.ReadLine}
|
||||
*/
|
||||
readline.createInterface = function(input, output, completer, terminal) {};
|
||||
|
||||
/**
|
||||
* @param {readline.ReadLineOptions} options
|
||||
* @return {readline.ReadLine}
|
||||
*/
|
||||
readline.createInterface = function(options) {};
|
||||
|
||||
/**
|
||||
* @param {NodeJS.WritableStream} stream
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @return {void}
|
||||
*/
|
||||
readline.cursorTo = function(stream, x, y) {};
|
||||
readline.Interface.prototype.close;
|
||||
|
||||
/**
|
||||
* @param {NodeJS.WritableStream} stream
|
||||
* @param {(number|string)} dx
|
||||
* @param {(number|string)} dy
|
||||
* @param {string} data
|
||||
* @param {Object.<string,*>=} key
|
||||
* @return {void}
|
||||
*/
|
||||
readline.moveCursor = function(stream, dx, dy) {};
|
||||
|
||||
/**
|
||||
* @param {NodeJS.WritableStream} stream
|
||||
* @param {number} dir
|
||||
* @return {void}
|
||||
*/
|
||||
readline.clearLine = function(stream, dir) {};
|
||||
|
||||
/**
|
||||
* @param {NodeJS.WritableStream} stream
|
||||
* @return {void}
|
||||
*/
|
||||
readline.clearScreenDown = function(stream) {};
|
||||
|
||||
module.exports.Key = readline.Key;
|
||||
|
||||
module.exports.ReadLine = readline.ReadLine;
|
||||
|
||||
module.exports.Completer = readline.Completer;
|
||||
|
||||
module.exports.CompleterResult = readline.CompleterResult;
|
||||
|
||||
module.exports.ReadLineOptions = readline.ReadLineOptions;
|
||||
|
||||
module.exports.createInterface = readline.createInterface;
|
||||
|
||||
module.exports.createInterface = readline.createInterface;
|
||||
|
||||
module.exports.cursorTo = readline.cursorTo;
|
||||
|
||||
module.exports.moveCursor = readline.moveCursor;
|
||||
|
||||
module.exports.clearLine = readline.clearLine;
|
||||
|
||||
module.exports.clearScreenDown = readline.clearScreenDown;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {readline.ReadLine}
|
||||
*/
|
||||
readline.Interface = function() {};
|
||||
|
||||
module.exports.Interface = readline.Interface;
|
||||
readline.Interface.prototype.write;
|
||||
|
||||
module.exports = readline;
|
||||
|
||||
@@ -1,149 +1,48 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "repl"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's repl module. Depends on the events and stream modules.
|
||||
* @see http://nodejs.org/api/repl.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/repl.js
|
||||
*/
|
||||
|
||||
var events = require('events');
|
||||
var stream = require('stream');
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var repl = {};
|
||||
|
||||
var readline = require("readline");
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
repl.ReplOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
repl.ReplOptions.prototype.prompt;
|
||||
|
||||
/**
|
||||
* @type {NodeJS.ReadableStream}
|
||||
*/
|
||||
repl.ReplOptions.prototype.input;
|
||||
|
||||
/**
|
||||
* @type {NodeJS.WritableStream}
|
||||
*/
|
||||
repl.ReplOptions.prototype.output;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
repl.ReplOptions.prototype.terminal;
|
||||
|
||||
/**
|
||||
* @type {Function}
|
||||
*/
|
||||
repl.ReplOptions.prototype.eval;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
repl.ReplOptions.prototype.useColors;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
repl.ReplOptions.prototype.useGlobal;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
repl.ReplOptions.prototype.ignoreUndefined;
|
||||
|
||||
/**
|
||||
* @type {Function}
|
||||
*/
|
||||
repl.ReplOptions.prototype.writer;
|
||||
|
||||
/**
|
||||
* @type {Function}
|
||||
*/
|
||||
repl.ReplOptions.prototype.completer;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
repl.ReplOptions.prototype.replMode;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
repl.ReplOptions.prototype.breakEvalOnSigint;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {readline.ReadLine}
|
||||
*/
|
||||
repl.REPLServer = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} keyword
|
||||
* @param {(Function|{help: string, action: Function})} cmd
|
||||
* @return {void}
|
||||
*/
|
||||
repl.REPLServer.prototype.defineCommand = function(keyword, cmd) {};
|
||||
|
||||
/**
|
||||
* @param {boolean=} preserveCursor
|
||||
* @return {void}
|
||||
*/
|
||||
repl.REPLServer.prototype.displayPrompt = function(preserveCursor) {};
|
||||
|
||||
/**
|
||||
* @param {repl.ReplOptions} options
|
||||
* @param {{prompt: ?string, input: ?stream.Readable, output: ?stream.Writable, terminal: ?boolean, eval: ?function(string), useColors: ?boolean, useGlobal: ?boolean, ignoreUndefined: ?boolean, writer: ?function(string)}} options
|
||||
* @return {repl.REPLServer}
|
||||
*/
|
||||
repl.start = function(options) {};
|
||||
|
||||
module.exports.ReplOptions = repl.ReplOptions;
|
||||
|
||||
module.exports.REPLServer = repl.REPLServer;
|
||||
|
||||
module.exports.start = repl.start;
|
||||
repl.start;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @constructor
|
||||
* @extends events.EventEmitter
|
||||
*/
|
||||
repl.REPLServer = function() {};
|
||||
|
||||
/**
|
||||
* @type {Object.<string,*>}
|
||||
*/
|
||||
repl.REPLServer.prototype.context;
|
||||
|
||||
|
||||
module.exports.REPLServer = repl.REPLServer;
|
||||
|
||||
module.exports = repl;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,80 +1,52 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "string_decoder"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
var string_decoder = {};
|
||||
/**
|
||||
* @fileoverview Definitions for node's string_decoder module. Depends on the buffer module.
|
||||
* @see http://nodejs.org/api/string_decoder.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/string_decoder.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @param {string} encoding
|
||||
* @constructor
|
||||
*/
|
||||
string_decoder.NodeStringDecoder = function() {};
|
||||
var StringDecoder = function(encoding) {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @return {string}
|
||||
*/
|
||||
string_decoder.NodeStringDecoder.prototype.write = function(buffer) {};
|
||||
StringDecoder.prototype.write;
|
||||
|
||||
/**
|
||||
* @param {Buffer=} buffer
|
||||
* @return {string}
|
||||
*/
|
||||
string_decoder.NodeStringDecoder.prototype.end = function(buffer) {};
|
||||
|
||||
/**
|
||||
* @type {(function(new: string_decoder.NodeStringDecoder, string=))}
|
||||
*/
|
||||
string_decoder.StringDecoder;
|
||||
|
||||
module.exports.NodeStringDecoder = string_decoder.NodeStringDecoder;
|
||||
|
||||
module.exports.StringDecoder = string_decoder.StringDecoder;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
string_decoder.NodeStringDecoder = function() {};
|
||||
StringDecoder.prototype.toString;
|
||||
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @return {number}
|
||||
*/
|
||||
string_decoder.NodeStringDecoder.prototype.detectIncompleteChar = function(buffer) {};
|
||||
StringDecoder.prototype.detectIncompleteChar;
|
||||
|
||||
module.exports.NodeStringDecoder = string_decoder.NodeStringDecoder;
|
||||
/**
|
||||
* @param {Buffer} buffer
|
||||
* @return {string}
|
||||
*/
|
||||
StringDecoder.prototype.end;
|
||||
|
||||
module.exports = StringDecoder;
|
||||
|
||||
@@ -1,598 +1,80 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "tls"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's tls module. Depends on the stream module.
|
||||
* @see http://nodejs.org/api/tls.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/tls.js
|
||||
*/
|
||||
|
||||
var crypto = require('crypto');
|
||||
var events = require('events');
|
||||
var net = require('net');
|
||||
var stream = require('stream');
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var tls = {};
|
||||
|
||||
var crypto = require("crypto");
|
||||
|
||||
var net = require("net");
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
var CLIENT_RENEG_LIMIT;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
var CLIENT_RENEG_WINDOW;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
tls.Certificate = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.Certificate.prototype.C;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.Certificate.prototype.ST;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.Certificate.prototype.L;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.Certificate.prototype.O;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.Certificate.prototype.OU;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.Certificate.prototype.CN;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
tls.CipherNameAndProtocol = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.CipherNameAndProtocol.prototype.name;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.CipherNameAndProtocol.prototype.version;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {internal.Duplex}
|
||||
*/
|
||||
tls.TLSSocket;
|
||||
|
||||
/**
|
||||
* @return {{port: number, family: string, address: string}}
|
||||
*/
|
||||
tls.TLSSocket.prototype.address = function() {};
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tls.TLSSocket.prototype.authorized;
|
||||
|
||||
/**
|
||||
* @type {Error}
|
||||
*/
|
||||
tls.TLSSocket.prototype.authorizationError;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tls.TLSSocket.prototype.encrypted;
|
||||
|
||||
/**
|
||||
* @return {tls.CipherNameAndProtocol}
|
||||
*/
|
||||
tls.TLSSocket.prototype.getCipher = function() {};
|
||||
|
||||
/**
|
||||
* @param {boolean=} detailed
|
||||
* @return {{subject: tls.Certificate, issuerInfo: tls.Certificate, issuer: tls.Certificate, raw: *, valid_from: string, valid_to: string, fingerprint: string, serialNumber: string}}
|
||||
*/
|
||||
tls.TLSSocket.prototype.getPeerCertificate = function(detailed) {};
|
||||
|
||||
/**
|
||||
* @return {*}
|
||||
*/
|
||||
tls.TLSSocket.prototype.getSession = function() {};
|
||||
|
||||
/**
|
||||
* @return {*}
|
||||
*/
|
||||
tls.TLSSocket.prototype.getTLSTicket = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.TLSSocket.prototype.localAddress;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.TLSSocket.prototype.localPort;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.TLSSocket.prototype.remoteAddress;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.TLSSocket.prototype.remoteFamily;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.TLSSocket.prototype.remotePort;
|
||||
|
||||
/**
|
||||
* @param {tls.TlsOptions} options
|
||||
* @param {(function(Error): *)} callback
|
||||
* @return {*}
|
||||
*/
|
||||
tls.TLSSocket.prototype.renegotiate = function(options, callback) {};
|
||||
|
||||
/**
|
||||
* @param {number} size
|
||||
* @return {boolean}
|
||||
*/
|
||||
tls.TLSSocket.prototype.setMaxSendFragment = function(size) {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
tls.TlsOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.TlsOptions.prototype.host;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.TlsOptions.prototype.port;
|
||||
|
||||
/**
|
||||
* @type {(string|Array<Buffer>)}
|
||||
*/
|
||||
tls.TlsOptions.prototype.pfx;
|
||||
|
||||
/**
|
||||
* @type {(string|Array<string>|Buffer|Array<*>)}
|
||||
*/
|
||||
tls.TlsOptions.prototype.key;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.TlsOptions.prototype.passphrase;
|
||||
|
||||
/**
|
||||
* @type {(string|Array<string>|Buffer|Array<Buffer>)}
|
||||
*/
|
||||
tls.TlsOptions.prototype.cert;
|
||||
|
||||
/**
|
||||
* @type {(string|Array<string>|Buffer|Array<Buffer>)}
|
||||
*/
|
||||
tls.TlsOptions.prototype.ca;
|
||||
|
||||
/**
|
||||
* @type {(string|Array<string>)}
|
||||
*/
|
||||
tls.TlsOptions.prototype.crl;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.TlsOptions.prototype.ciphers;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tls.TlsOptions.prototype.honorCipherOrder;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tls.TlsOptions.prototype.requestCert;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tls.TlsOptions.prototype.rejectUnauthorized;
|
||||
|
||||
/**
|
||||
* @type {(Array<string>|Buffer)}
|
||||
*/
|
||||
tls.TlsOptions.prototype.NPNProtocols;
|
||||
|
||||
/**
|
||||
* @type {(function(string, (function(Error, tls.SecureContext): *)): *)}
|
||||
*/
|
||||
tls.TlsOptions.prototype.SNICallback;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.TlsOptions.prototype.ecdhCurve;
|
||||
|
||||
/**
|
||||
* @type {(string|Buffer)}
|
||||
*/
|
||||
tls.TlsOptions.prototype.dhparam;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.TlsOptions.prototype.handshakeTimeout;
|
||||
|
||||
/**
|
||||
* @type {(Array<string>|Buffer)}
|
||||
*/
|
||||
tls.TlsOptions.prototype.ALPNProtocols;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.TlsOptions.prototype.sessionTimeout;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
tls.TlsOptions.prototype.ticketKeys;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.TlsOptions.prototype.sessionIdContext;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.TlsOptions.prototype.secureProtocol;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
tls.ConnectionOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.host;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.port;
|
||||
|
||||
/**
|
||||
* @type {net.Socket}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.socket;
|
||||
|
||||
/**
|
||||
* @type {(string|Buffer)}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.pfx;
|
||||
|
||||
/**
|
||||
* @type {(string|Array<string>|Buffer|Array<Buffer>)}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.key;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.passphrase;
|
||||
|
||||
/**
|
||||
* @type {(string|Array<string>|Buffer|Array<Buffer>)}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.cert;
|
||||
|
||||
/**
|
||||
* @type {(string|Buffer|Array<(string|Buffer)>)}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.ca;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.rejectUnauthorized;
|
||||
|
||||
/**
|
||||
* @type {Array<(string|Buffer)>}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.NPNProtocols;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.servername;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.path;
|
||||
|
||||
/**
|
||||
* @type {Array<(string|Buffer)>}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.ALPNProtocols;
|
||||
|
||||
/**
|
||||
* @type {(function(string, (string|Buffer|Array<(string|Buffer)>)): *)}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.checkServerIdentity;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.secureProtocol;
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.secureContext;
|
||||
|
||||
/**
|
||||
* @type {Buffer}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.session;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.ConnectionOptions.prototype.minDHSize;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {net.Server}
|
||||
*/
|
||||
tls.Server = function() {};
|
||||
tls.CreateOptions = function () {};
|
||||
|
||||
/** @type {boolean} */
|
||||
tls.CreateOptions.prototype.honorCipherOrder;
|
||||
|
||||
/** @type {boolean} */
|
||||
tls.CreateOptions.prototype.requestCert;
|
||||
|
||||
/** @type {boolean} */
|
||||
tls.CreateOptions.prototype.rejectUnauthorized;
|
||||
|
||||
/** @type {Array|Buffer} */
|
||||
tls.CreateOptions.prototype.NPNProtocols;
|
||||
|
||||
/** @type {function(string)} */
|
||||
tls.CreateOptions.prototype.SNICallback;
|
||||
|
||||
/** @type {string} */
|
||||
tls.CreateOptions.prototype.sessionIdContext;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {tls.CreateOptions} options
|
||||
* @param {function(...)=} secureConnectionListener
|
||||
* @return {tls.Server}
|
||||
*/
|
||||
tls.Server.prototype.close = function() {};
|
||||
tls.createServer;
|
||||
|
||||
/**
|
||||
* @return {{port: number, family: string, address: string}}
|
||||
* @typedef {{host: string, port: number, socket: *, pfx: (string|Buffer), key: (string|Buffer), passphrase: string, cert: (string|Buffer), ca: Array.<string>, rejectUnauthorized: boolean, NPNProtocols: Array.<string|Buffer>, servername: string}}
|
||||
*/
|
||||
tls.Server.prototype.address = function() {};
|
||||
tls.ConnectOptions;
|
||||
|
||||
/**
|
||||
* @param {string} hostName
|
||||
* @param {{key: string, cert: string, ca: string}} credentials
|
||||
*
|
||||
* @param {number|tls.ConnectOptions} port
|
||||
* @param {(string|tls.ConnectOptions|function(...))=} host
|
||||
* @param {(tls.ConnectOptions|function(...))=} options
|
||||
* @param {function(...)=} callback
|
||||
* @return {void}
|
||||
*/
|
||||
tls.Server.prototype.addContext = function(hostName, credentials) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.Server.prototype.maxConnections;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.Server.prototype.connections;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Duplex}
|
||||
*/
|
||||
tls.ClearTextStream = function() {};
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tls.ClearTextStream.prototype.authorized;
|
||||
|
||||
/**
|
||||
* @type {Error}
|
||||
*/
|
||||
tls.ClearTextStream.prototype.authorizationError;
|
||||
|
||||
/**
|
||||
* @return {*}
|
||||
*/
|
||||
tls.ClearTextStream.prototype.getPeerCertificate = function() {};
|
||||
|
||||
tls.ClearTextStream.prototype.getCipher;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.ClearTextStream.prototype.getCipher.name;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.ClearTextStream.prototype.getCipher.version;
|
||||
|
||||
|
||||
tls.ClearTextStream.prototype.address;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.ClearTextStream.prototype.address.port;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.ClearTextStream.prototype.address.family;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.ClearTextStream.prototype.address.address;
|
||||
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.ClearTextStream.prototype.remoteAddress;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.ClearTextStream.prototype.remotePort;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
tls.SecurePair = function() {};
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
tls.SecurePair.prototype.encrypted;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
tls.SecurePair.prototype.cleartext;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
tls.SecureContextOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {(string|Buffer)}
|
||||
*/
|
||||
tls.SecureContextOptions.prototype.pfx;
|
||||
|
||||
/**
|
||||
* @type {(string|Buffer)}
|
||||
*/
|
||||
tls.SecureContextOptions.prototype.key;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.SecureContextOptions.prototype.passphrase;
|
||||
|
||||
/**
|
||||
* @type {(string|Buffer)}
|
||||
*/
|
||||
tls.SecureContextOptions.prototype.cert;
|
||||
|
||||
/**
|
||||
* @type {(string|Buffer)}
|
||||
*/
|
||||
tls.SecureContextOptions.prototype.ca;
|
||||
|
||||
/**
|
||||
* @type {(string|Array<string>)}
|
||||
*/
|
||||
tls.SecureContextOptions.prototype.crl;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.SecureContextOptions.prototype.ciphers;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tls.SecureContextOptions.prototype.honorCipherOrder;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
tls.SecureContext = function() {};
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
tls.SecureContext.prototype.context;
|
||||
|
||||
/**
|
||||
* @param {tls.TlsOptions} options
|
||||
* @param {(function(tls.ClearTextStream): void)=} secureConnectionListener
|
||||
* @return {tls.Server}
|
||||
*/
|
||||
tls.createServer = function(options, secureConnectionListener) {};
|
||||
|
||||
/**
|
||||
* @param {tls.ConnectionOptions} options
|
||||
* @param {(function(): void)=} secureConnectionListener
|
||||
* @return {tls.ClearTextStream}
|
||||
*/
|
||||
tls.connect = function(options, secureConnectionListener) {};
|
||||
|
||||
/**
|
||||
* @param {number} port
|
||||
* @param {string=} host
|
||||
* @param {tls.ConnectionOptions=} options
|
||||
* @param {(function(): void)=} secureConnectListener
|
||||
* @return {tls.ClearTextStream}
|
||||
*/
|
||||
tls.connect = function(port, host, options, secureConnectListener) {};
|
||||
|
||||
/**
|
||||
* @param {number} port
|
||||
* @param {tls.ConnectionOptions=} options
|
||||
* @param {(function(): void)=} secureConnectListener
|
||||
* @return {tls.ClearTextStream}
|
||||
*/
|
||||
tls.connect = function(port, options, secureConnectListener) {};
|
||||
tls.connect = function(port, host, options, callback) {};
|
||||
|
||||
/**
|
||||
* @param {crypto.Credentials=} credentials
|
||||
@@ -601,46 +83,66 @@ tls.connect = function(port, options, secureConnectListener) {};
|
||||
* @param {boolean=} rejectUnauthorized
|
||||
* @return {tls.SecurePair}
|
||||
*/
|
||||
tls.createSecurePair = function(credentials, isServer, requestCert, rejectUnauthorized) {};
|
||||
tls.createSecurePair;
|
||||
|
||||
/**
|
||||
* @param {tls.SecureContextOptions} details
|
||||
* @return {tls.SecureContext}
|
||||
* @constructor
|
||||
* @extends events.EventEmitter
|
||||
*/
|
||||
tls.createSecureContext = function(details) {};
|
||||
tls.SecurePair = function() {};
|
||||
|
||||
module.exports.Certificate = tls.Certificate;
|
||||
/**
|
||||
* @constructor
|
||||
* @extends net.Server
|
||||
*/
|
||||
tls.Server = function() {};
|
||||
|
||||
module.exports.CipherNameAndProtocol = tls.CipherNameAndProtocol;
|
||||
/**
|
||||
* @param {string} hostname
|
||||
* @param {string|Buffer} credentials
|
||||
* @return {void}
|
||||
*/
|
||||
tls.Server.prototype.addContext = function(hostname, credentials) {};
|
||||
|
||||
module.exports.TLSSocket = tls.TLSSocket;
|
||||
/**
|
||||
* @constructor
|
||||
* @extends stream.Duplex
|
||||
*/
|
||||
tls.CleartextStream = function() {};
|
||||
|
||||
module.exports.TlsOptions = tls.TlsOptions;
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tls.CleartextStream.prototype.authorized;
|
||||
|
||||
module.exports.ConnectionOptions = tls.ConnectionOptions;
|
||||
/**
|
||||
* @type {?string}
|
||||
*/
|
||||
tls.CleartextStream.prototype.authorizationError;
|
||||
|
||||
module.exports.Server = tls.Server;
|
||||
/**
|
||||
* @return {Object.<string,(string|Object.<string,string>)>}
|
||||
*/
|
||||
tls.CleartextStream.prototype.getPeerCertificate;
|
||||
|
||||
module.exports.ClearTextStream = tls.ClearTextStream;
|
||||
/**
|
||||
* @return {{name: string, version: string}}
|
||||
*/
|
||||
tls.CleartextStream.prototype.getCipher;
|
||||
|
||||
module.exports.SecurePair = tls.SecurePair;
|
||||
/**
|
||||
* @return {{port: number, family: string, address: string}}
|
||||
*/
|
||||
tls.CleartextStream.prototype.address;
|
||||
|
||||
module.exports.SecureContextOptions = tls.SecureContextOptions;
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
tls.CleartextStream.prototype.remoteAddress;
|
||||
|
||||
module.exports.SecureContext = tls.SecureContext;
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
tls.CleartextStream.prototype.remotePort;
|
||||
|
||||
module.exports.createServer = tls.createServer;
|
||||
|
||||
module.exports.connect = tls.connect;
|
||||
|
||||
module.exports.connect = tls.connect;
|
||||
|
||||
module.exports.connect = tls.connect;
|
||||
|
||||
module.exports.createSecurePair = tls.createSecurePair;
|
||||
|
||||
module.exports.createSecureContext = tls.createSecureContext;
|
||||
|
||||
module.exports.CLIENT_RENEG_WINDOW = CLIENT_RENEG_WINDOW;
|
||||
|
||||
module.exports.CLIENT_RENEG_LIMIT = CLIENT_RENEG_LIMIT;
|
||||
module.exports = tls;
|
||||
|
||||
@@ -1,55 +1,47 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "tty"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's tty module. Depends on the net module.
|
||||
* @see http://nodejs.org/api/tty.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/tty.js
|
||||
*/
|
||||
|
||||
var net = require('net');
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var tty = {};
|
||||
|
||||
var net = require("net");
|
||||
|
||||
/**
|
||||
* @param {number} fd
|
||||
* @param {*} fd
|
||||
* @return {boolean}
|
||||
*/
|
||||
tty.isatty = function(fd) {};
|
||||
tty.isatty;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {net.Socket}
|
||||
* @param {boolean} mode
|
||||
* @return {void}
|
||||
*/
|
||||
tty.setRawMode;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends net.Socket
|
||||
*/
|
||||
tty.ReadStream = function() {};
|
||||
|
||||
@@ -62,16 +54,11 @@ tty.ReadStream.prototype.isRaw;
|
||||
* @param {boolean} mode
|
||||
* @return {void}
|
||||
*/
|
||||
tty.ReadStream.prototype.setRawMode = function(mode) {};
|
||||
tty.ReadStream.prototype.setRawMode;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tty.ReadStream.prototype.isTTY;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {net.Socket}
|
||||
* @constructor
|
||||
* @extends net.Socket
|
||||
*/
|
||||
tty.WriteStream = function() {};
|
||||
|
||||
@@ -85,49 +72,4 @@ tty.WriteStream.prototype.columns;
|
||||
*/
|
||||
tty.WriteStream.prototype.rows;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
tty.WriteStream.prototype.isTTY;
|
||||
|
||||
module.exports.isatty = tty.isatty;
|
||||
|
||||
module.exports.ReadStream = tty.ReadStream;
|
||||
|
||||
module.exports.WriteStream = tty.WriteStream;
|
||||
|
||||
/**
|
||||
* @param {boolean} mode
|
||||
* @return {void}
|
||||
*/
|
||||
tty.setRawMode = function(mode) {};
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @param {Array<string>=} args
|
||||
* @return {Array<*>}
|
||||
*/
|
||||
tty.open = function(path, args) {};
|
||||
|
||||
/**
|
||||
* @param {*} fd
|
||||
* @param {number} row
|
||||
* @param {number} col
|
||||
* @return {*}
|
||||
*/
|
||||
tty.setWindowSize = function(fd, row, col) {};
|
||||
|
||||
/**
|
||||
* @param {*} fd
|
||||
* @return {Array<number>}
|
||||
*/
|
||||
tty.getWindowSize = function(fd) {};
|
||||
|
||||
module.exports.setRawMode = tty.setRawMode;
|
||||
|
||||
module.exports.open = tty.open;
|
||||
|
||||
module.exports.setWindowSize = tty.setWindowSize;
|
||||
|
||||
module.exports.getWindowSize = tty.getWindowSize;
|
||||
|
||||
module.exports = tty;
|
||||
|
||||
@@ -1,135 +1,57 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "url"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's url module.
|
||||
* @see http://nodejs.org/api/url.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/url.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var url = {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @typedef {{href: ?string, protocol: ?string, host: ?string, auth: ?string, hostname: ?string, port: ?string, pathname: ?string, search: ?string, path: ?string, query: ?string, hash: ?string}}
|
||||
*/
|
||||
url.Url = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
url.Url.prototype.href;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
url.Url.prototype.protocol;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
url.Url.prototype.auth;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
url.Url.prototype.hostname;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
url.Url.prototype.port;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
url.Url.prototype.host;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
url.Url.prototype.pathname;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
url.Url.prototype.search;
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
url.Url.prototype.query;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
url.Url.prototype.slashes;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
url.Url.prototype.hash;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
url.Url.prototype.path;
|
||||
var URL;
|
||||
|
||||
/**
|
||||
* @param {string} urlStr
|
||||
* @param {boolean=} parseQueryString
|
||||
* @param {boolean=} slashesDenoteHost
|
||||
* @return {url.Url}
|
||||
* @return {URL}
|
||||
* @nosideeffects
|
||||
*/
|
||||
url.parse = function(urlStr, parseQueryString, slashesDenoteHost) {};
|
||||
url.parse;
|
||||
|
||||
/**
|
||||
* @param {url.Url} url
|
||||
* @param {URL} urlObj
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
url.format = function(url) {};
|
||||
url.format;
|
||||
|
||||
/**
|
||||
* @param {string} from
|
||||
* @param {string} to
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
url.resolve = function(from, to) {};
|
||||
|
||||
module.exports.Url = url.Url;
|
||||
|
||||
module.exports.parse = url.parse;
|
||||
|
||||
module.exports.format = url.format;
|
||||
|
||||
module.exports.resolve = url.resolve;
|
||||
url.resolve;
|
||||
|
||||
module.exports = url;
|
||||
|
||||
@@ -1,292 +1,112 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "util"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's util module. Depends on the stream module.
|
||||
* @see http://nodejs.org/api/util.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/util.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var util = {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
util.InspectOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
util.InspectOptions.prototype.showHidden;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
util.InspectOptions.prototype.depth;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
util.InspectOptions.prototype.colors;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
util.InspectOptions.prototype.customInspect;
|
||||
|
||||
/**
|
||||
* @param {*} format
|
||||
* @param {...*} param
|
||||
* @param {string} format
|
||||
* @param {...*} var_args
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
util.format = function(format, param) {};
|
||||
util.format;
|
||||
|
||||
/**
|
||||
* @param {string} string
|
||||
* @return {void}
|
||||
*/
|
||||
util.debug = function(string) {};
|
||||
util.debug;
|
||||
|
||||
/**
|
||||
* @param {...*} param
|
||||
* @param {...*} var_args
|
||||
* @return {void}
|
||||
*/
|
||||
util.error = function(param) {};
|
||||
util.error;
|
||||
|
||||
/**
|
||||
* @param {...*} param
|
||||
* @param {...*} var_args
|
||||
* @return {void}
|
||||
*/
|
||||
util.puts = function(param) {};
|
||||
util.puts;
|
||||
|
||||
/**
|
||||
* @param {...*} param
|
||||
* @param {...*} var_args
|
||||
* @return {void}
|
||||
*/
|
||||
util.print = function(param) {};
|
||||
util.print;
|
||||
|
||||
/**
|
||||
* @param {string} string
|
||||
* @return {void}
|
||||
*/
|
||||
util.log = function(string) {};
|
||||
util.log;
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @param {boolean=} showHidden
|
||||
* @param {number=} depth
|
||||
* @param {boolean=} color
|
||||
* @param {{showHidden: (boolean|undefined),
|
||||
* depth: (number|null|undefined),
|
||||
* colors: (boolean|undefined),
|
||||
* customInspect: (boolean|undefined)}=} options
|
||||
* @return {string}
|
||||
* @nosideeffects
|
||||
*/
|
||||
util.inspect = function(object, showHidden, depth, color) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @param {util.InspectOptions} options
|
||||
* @return {string}
|
||||
*/
|
||||
util.inspect = function(object, options) {};
|
||||
util.inspect;
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
*/
|
||||
util.isArray = function(object) {};
|
||||
util.isArray;
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
*/
|
||||
util.isRegExp = function(object) {};
|
||||
util.isRegExp;
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
*/
|
||||
util.isDate = function(object) {};
|
||||
util.isDate;
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
*/
|
||||
util.isError = function(object) {};
|
||||
util.isError;
|
||||
|
||||
/**
|
||||
* @param {*} constructor
|
||||
* @param {*} superConstructor
|
||||
* @param {Function} constructor
|
||||
* @param {Function} superConstructor
|
||||
* @return {void}
|
||||
*/
|
||||
util.inherits = function(constructor, superConstructor) {};
|
||||
|
||||
/**
|
||||
* @param {string} key
|
||||
* @return {(function(string, ...*): void)}
|
||||
*/
|
||||
util.debuglog = function(key) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isBoolean = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isBuffer = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isFunction = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isNull = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isNullOrUndefined = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isNumber = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isObject = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isPrimitive = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isString = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isSymbol = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {*} object
|
||||
* @return {boolean}
|
||||
*/
|
||||
util.isUndefined = function(object) {};
|
||||
|
||||
/**
|
||||
* @param {Function} fn
|
||||
* @param {string} message
|
||||
* @return {Function}
|
||||
*/
|
||||
util.deprecate = function(fn, message) {};
|
||||
|
||||
module.exports.InspectOptions = util.InspectOptions;
|
||||
|
||||
module.exports.format = util.format;
|
||||
|
||||
module.exports.debug = util.debug;
|
||||
|
||||
module.exports.error = util.error;
|
||||
|
||||
module.exports.puts = util.puts;
|
||||
|
||||
module.exports.print = util.print;
|
||||
|
||||
module.exports.log = util.log;
|
||||
|
||||
module.exports.inspect = util.inspect;
|
||||
|
||||
module.exports.inspect = util.inspect;
|
||||
|
||||
module.exports.isArray = util.isArray;
|
||||
|
||||
module.exports.isRegExp = util.isRegExp;
|
||||
|
||||
module.exports.isDate = util.isDate;
|
||||
|
||||
module.exports.isError = util.isError;
|
||||
|
||||
module.exports.inherits = util.inherits;
|
||||
|
||||
module.exports.debuglog = util.debuglog;
|
||||
|
||||
module.exports.isBoolean = util.isBoolean;
|
||||
|
||||
module.exports.isBuffer = util.isBuffer;
|
||||
|
||||
module.exports.isFunction = util.isFunction;
|
||||
|
||||
module.exports.isNull = util.isNull;
|
||||
|
||||
module.exports.isNullOrUndefined = util.isNullOrUndefined;
|
||||
|
||||
module.exports.isNumber = util.isNumber;
|
||||
|
||||
module.exports.isObject = util.isObject;
|
||||
|
||||
module.exports.isPrimitive = util.isPrimitive;
|
||||
|
||||
module.exports.isString = util.isString;
|
||||
|
||||
module.exports.isSymbol = util.isSymbol;
|
||||
|
||||
module.exports.isUndefined = util.isUndefined;
|
||||
|
||||
module.exports.deprecate = util.deprecate;
|
||||
|
||||
/**
|
||||
* @param {Object} destination
|
||||
* @param {Object} source
|
||||
* @return {Object}
|
||||
*/
|
||||
util._extend = function(destination, source) {};
|
||||
|
||||
module.exports._extend = util._extend;
|
||||
util.inherits;
|
||||
|
||||
module.exports = util;
|
||||
|
||||
@@ -1,214 +1,86 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "vm"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's vm module.
|
||||
* @see http://nodejs.org/api/vm.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/vm.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var vm = {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
vm.Context = function() {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
vm.ScriptOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
vm.ScriptOptions.prototype.filename;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
vm.ScriptOptions.prototype.lineOffset;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
vm.ScriptOptions.prototype.columnOffset;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
vm.ScriptOptions.prototype.displayErrors;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
vm.ScriptOptions.prototype.timeout;
|
||||
|
||||
/**
|
||||
* @type {Buffer}
|
||||
*/
|
||||
vm.ScriptOptions.prototype.cachedData;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
vm.ScriptOptions.prototype.produceCachedData;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
vm.RunningScriptOptions = function() {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
vm.RunningScriptOptions.prototype.filename;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
vm.RunningScriptOptions.prototype.lineOffset;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
vm.RunningScriptOptions.prototype.columnOffset;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
vm.RunningScriptOptions.prototype.displayErrors;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
vm.RunningScriptOptions.prototype.timeout;
|
||||
|
||||
/**
|
||||
* @param {string} code
|
||||
* @param {vm.ScriptOptions=} options
|
||||
* @return {vm.Script}
|
||||
* @constructor
|
||||
*/
|
||||
vm.Script = function(code, options) {};
|
||||
vm.Context = function() {}; // Does not really exist
|
||||
|
||||
/**
|
||||
* @param {vm.Context} contextifiedSandbox
|
||||
* @param {vm.RunningScriptOptions=} options
|
||||
* @return {*}
|
||||
* @param {string} code
|
||||
* @param {string=} filename
|
||||
*/
|
||||
vm.Script.prototype.runInContext = function(contextifiedSandbox, options) {};
|
||||
vm.runInThisContext;
|
||||
|
||||
/**
|
||||
* @param {vm.Context=} sandbox
|
||||
* @param {vm.RunningScriptOptions=} options
|
||||
* @return {*}
|
||||
* @param {string} code
|
||||
* @param {Object.<string,*>=} sandbox
|
||||
* @param {string=} filename
|
||||
* @return {void}
|
||||
*/
|
||||
vm.Script.prototype.runInNewContext = function(sandbox, options) {};
|
||||
vm.runInNewContext;
|
||||
|
||||
/**
|
||||
* @param {vm.RunningScriptOptions=} options
|
||||
* @return {*}
|
||||
* @param {string} code
|
||||
* @param {vm.Context} context
|
||||
* @param {string=} filename
|
||||
* @return {void}
|
||||
*/
|
||||
vm.Script.prototype.runInThisContext = function(options) {};
|
||||
vm.runInContext;
|
||||
|
||||
/**
|
||||
* @param {vm.Context=} sandbox
|
||||
* @param {Object.<string,*>=} initSandbox
|
||||
* @return {vm.Context}
|
||||
* @nosideeffects
|
||||
*/
|
||||
vm.createContext = function(sandbox) {};
|
||||
vm.createContext;
|
||||
|
||||
/**
|
||||
* @param {vm.Context} sandbox
|
||||
* @return {boolean}
|
||||
* @constructor
|
||||
*/
|
||||
vm.isContext = function(sandbox) {};
|
||||
|
||||
/**
|
||||
* @param {string} code
|
||||
* @param {vm.Context} contextifiedSandbox
|
||||
* @param {vm.RunningScriptOptions=} options
|
||||
* @return {*}
|
||||
*/
|
||||
vm.runInContext = function(code, contextifiedSandbox, options) {};
|
||||
|
||||
/**
|
||||
* @param {string} code
|
||||
* @return {*}
|
||||
*/
|
||||
vm.runInDebugContext = function(code) {};
|
||||
|
||||
/**
|
||||
* @param {string} code
|
||||
* @param {vm.Context=} sandbox
|
||||
* @param {vm.RunningScriptOptions=} options
|
||||
* @return {*}
|
||||
*/
|
||||
vm.runInNewContext = function(code, sandbox, options) {};
|
||||
|
||||
/**
|
||||
* @param {string} code
|
||||
* @param {vm.RunningScriptOptions=} options
|
||||
* @return {*}
|
||||
*/
|
||||
vm.runInThisContext = function(code, options) {};
|
||||
|
||||
module.exports.Context = vm.Context;
|
||||
|
||||
module.exports.ScriptOptions = vm.ScriptOptions;
|
||||
|
||||
module.exports.RunningScriptOptions = vm.RunningScriptOptions;
|
||||
|
||||
module.exports.Script = vm.Script;
|
||||
|
||||
module.exports.createContext = vm.createContext;
|
||||
|
||||
module.exports.isContext = vm.isContext;
|
||||
|
||||
module.exports.runInContext = vm.runInContext;
|
||||
|
||||
module.exports.runInDebugContext = vm.runInDebugContext;
|
||||
|
||||
module.exports.runInNewContext = vm.runInNewContext;
|
||||
|
||||
module.exports.runInThisContext = vm.runInThisContext;
|
||||
vm.Script = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} code
|
||||
* @param {string=} filename
|
||||
* @return {vm.Script}
|
||||
* @nosideeffects
|
||||
*/
|
||||
vm.createScript = function(code, filename) {};
|
||||
vm.createScript;
|
||||
|
||||
module.exports.createScript = vm.createScript;
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
vm.Script.prototype.runInThisContext;
|
||||
|
||||
/**
|
||||
* @param {Object.<string,*>=} sandbox
|
||||
* @return {void}
|
||||
*/
|
||||
vm.Script.prototype.runInNewContext;
|
||||
|
||||
module.exports = vm;
|
||||
|
||||
@@ -1,533 +1,386 @@
|
||||
// Automatically generated from TypeScript type definitions provided by
|
||||
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
|
||||
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
|
||||
// in parent directory.
|
||||
// Type definitions for Node.js 10.5.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Parambir Singh <https://github.com/parambirs>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Flarna <https://github.com/Flarna>
|
||||
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Kelvin Jin <https://github.com/kjin>
|
||||
// Alvis HT Tang <https://github.com/alvis>
|
||||
// Sebastian Silbermann <https://github.com/eps1lon>
|
||||
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
||||
// Alberto Schiabel <https://github.com/jkomyno>
|
||||
// Klaus Meinhardt <https://github.com/ajafff>
|
||||
// Huw <https://github.com/hoo29>
|
||||
// Nicolas Even <https://github.com/n-e>
|
||||
// Bruno Scheufler <https://github.com/brunoscheufler>
|
||||
// Mohsen Azimi <https://github.com/mohsen1>
|
||||
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
||||
// Alexander T. <https://github.com/a-tarasyuk>
|
||||
// Lishude <https://github.com/islishude>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @externs
|
||||
* @fileoverview Definitions for module "zlib"
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for node's zlib module. Depends on the events and buffer modules.
|
||||
* @see http://nodejs.org/api/zlib.html
|
||||
* @see https://github.com/joyent/node/blob/master/lib/zlib.js
|
||||
*/
|
||||
|
||||
var stream = require('stream');
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
var zlib = {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @typedef {{chunkSize: ?number, windowBits: ?number, level: ?number, memLevel: ?number, strategy: ?number, dictionary: ?Object}}
|
||||
*/
|
||||
zlib.ZlibOptions = function() {};
|
||||
zlib.Options;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @constructor
|
||||
* @extends stream.Transform
|
||||
*/
|
||||
zlib.ZlibOptions.prototype.chunkSize;
|
||||
zlib.Zlib = function() {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @param {zlib.Options} options
|
||||
* @constructor
|
||||
* @extends zlib.Zlib
|
||||
*/
|
||||
zlib.ZlibOptions.prototype.windowBits;
|
||||
zlib.Gzip = function(options) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @param {zlib.Options} options
|
||||
* @constructor
|
||||
* @extends zlib.Zlib
|
||||
*/
|
||||
zlib.ZlibOptions.prototype.level;
|
||||
zlib.Gunzip = function(options) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @param {zlib.Options} options
|
||||
* @constructor
|
||||
* @extends zlib.Zlib
|
||||
*/
|
||||
zlib.ZlibOptions.prototype.memLevel;
|
||||
zlib.Deflate = function(options) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @param {zlib.Options} options
|
||||
* @constructor
|
||||
* @extends zlib.Zlib
|
||||
*/
|
||||
zlib.ZlibOptions.prototype.strategy;
|
||||
zlib.Inflate = function(options) {};
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
* @param {zlib.Options} options
|
||||
* @constructor
|
||||
* @extends zlib.Zlib
|
||||
*/
|
||||
zlib.ZlibOptions.prototype.dictionary;
|
||||
zlib.DeflateRaw = function(options) {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Transform}
|
||||
* @param {zlib.Options} options
|
||||
* @constructor
|
||||
* @extends zlib.Zlib
|
||||
*/
|
||||
zlib.Gzip = function() {};
|
||||
zlib.InflateRaw = function(options) {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Transform}
|
||||
* @param {zlib.Options} options
|
||||
* @constructor
|
||||
* @extends zlib.Zlib
|
||||
*/
|
||||
zlib.Gunzip = function() {};
|
||||
zlib.Unzip = function(options) {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Transform}
|
||||
*/
|
||||
zlib.Deflate = function() {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Transform}
|
||||
*/
|
||||
zlib.Inflate = function() {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Transform}
|
||||
*/
|
||||
zlib.DeflateRaw = function() {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Transform}
|
||||
*/
|
||||
zlib.InflateRaw = function() {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {internal.Transform}
|
||||
*/
|
||||
zlib.Unzip = function() {};
|
||||
|
||||
/**
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @param {zlib.Options} options
|
||||
* @return {zlib.Gzip}
|
||||
*/
|
||||
zlib.createGzip = function(options) {};
|
||||
zlib.createGzip;
|
||||
|
||||
/**
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @param {zlib.Options} options
|
||||
* @return {zlib.Gunzip}
|
||||
*/
|
||||
zlib.createGunzip = function(options) {};
|
||||
zlib.createGunzip;
|
||||
|
||||
/**
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @param {zlib.Options} options
|
||||
* @return {zlib.Deflate}
|
||||
*/
|
||||
zlib.createDeflate = function(options) {};
|
||||
|
||||
zlib.createDeflate;
|
||||
/**
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @param {zlib.Options} options
|
||||
* @return {zlib.Inflate}
|
||||
*/
|
||||
zlib.createInflate = function(options) {};
|
||||
zlib.createInflate;
|
||||
|
||||
/**
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @param {zlib.Options} options
|
||||
* @return {zlib.DeflateRaw}
|
||||
*/
|
||||
zlib.createDeflateRaw = function(options) {};
|
||||
zlib.createDeflateRaw;
|
||||
|
||||
/**
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @param {zlib.Options} options
|
||||
* @return {zlib.InflateRaw}
|
||||
*/
|
||||
zlib.createInflateRaw = function(options) {};
|
||||
zlib.createInflateRaw;
|
||||
|
||||
/**
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @param {zlib.Options} options
|
||||
* @return {zlib.Unzip}
|
||||
*/
|
||||
zlib.createUnzip = function(options) {};
|
||||
zlib.createUnzip;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {(function(Error, *): void)} callback
|
||||
* @param {string|Buffer} buf
|
||||
* @param {function(...)} callback
|
||||
* @return {void}
|
||||
*/
|
||||
zlib.deflate = function(buf, callback) {};
|
||||
zlib.deflate;
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @return {*}
|
||||
*/
|
||||
zlib.deflateSync = function(buf, options) {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {(function(Error, *): void)} callback
|
||||
* @param {string|Buffer} buf
|
||||
* @param {function(...)} callback
|
||||
* @return {void}
|
||||
*/
|
||||
zlib.deflateRaw = function(buf, callback) {};
|
||||
zlib.deflateRaw;
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @return {*}
|
||||
*/
|
||||
zlib.deflateRawSync = function(buf, options) {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {(function(Error, *): void)} callback
|
||||
* @param {string|Buffer} buf
|
||||
* @param {function(...)} callback
|
||||
* @return {void}
|
||||
*/
|
||||
zlib.gzip = function(buf, callback) {};
|
||||
zlib.gzip;
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @return {*}
|
||||
*/
|
||||
zlib.gzipSync = function(buf, options) {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {(function(Error, *): void)} callback
|
||||
* @param {string|Buffer} buf
|
||||
* @param {function(...)} callback
|
||||
* @return {void}
|
||||
*/
|
||||
zlib.gunzip = function(buf, callback) {};
|
||||
zlib.gunzip;
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @return {*}
|
||||
*/
|
||||
zlib.gunzipSync = function(buf, options) {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {(function(Error, *): void)} callback
|
||||
* @param {string|Buffer} buf
|
||||
* @param {function(...)} callback
|
||||
* @return {void}
|
||||
*/
|
||||
zlib.inflate = function(buf, callback) {};
|
||||
zlib.inflate;
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @return {*}
|
||||
*/
|
||||
zlib.inflateSync = function(buf, options) {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {(function(Error, *): void)} callback
|
||||
* @param {string|Buffer} buf
|
||||
* @param {function(...)} callback
|
||||
* @return {void}
|
||||
*/
|
||||
zlib.inflateRaw = function(buf, callback) {};
|
||||
zlib.inflateRaw;
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @return {*}
|
||||
*/
|
||||
zlib.inflateRawSync = function(buf, options) {};
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {(function(Error, *): void)} callback
|
||||
* @param {string|Buffer} buf
|
||||
* @param {function(...)} callback
|
||||
* @return {void}
|
||||
*/
|
||||
zlib.unzip = function(buf, callback) {};
|
||||
zlib.unzip;
|
||||
|
||||
|
||||
/**
|
||||
* @param {Buffer} buf
|
||||
* @param {zlib.ZlibOptions=} options
|
||||
* @return {*}
|
||||
*/
|
||||
zlib.unzipSync = function(buf, options) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_NO_FLUSH;
|
||||
zlib.Z_NO_FLUSH = 0;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_PARTIAL_FLUSH;
|
||||
zlib.Z_PARTIAL_FLUSH = 1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_SYNC_FLUSH;
|
||||
zlib.Z_SYNC_FLUSH = 2;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_FULL_FLUSH;
|
||||
zlib.Z_FULL_FLUSH = 3;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_FINISH;
|
||||
zlib.Z_FINISH = 4;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_BLOCK;
|
||||
zlib.Z_BLOCK = 5;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_TREES;
|
||||
zlib.Z_TREES = 6;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_OK;
|
||||
zlib.Z_OK = 0;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_STREAM_END;
|
||||
zlib.Z_STREAM_END = 1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_NEED_DICT;
|
||||
zlib.Z_NEED_DICT = 2;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_ERRNO;
|
||||
zlib.Z_ERRNO = -1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_STREAM_ERROR;
|
||||
zlib.Z_STREAM_ERROR = -2;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_DATA_ERROR;
|
||||
zlib.Z_DATA_ERROR = -3;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_MEM_ERROR;
|
||||
zlib.Z_MEM_ERROR = -4;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_BUF_ERROR;
|
||||
zlib.Z_BUF_ERROR = -5;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_VERSION_ERROR;
|
||||
zlib.Z_VERSION_ERROR = -6;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_NO_COMPRESSION;
|
||||
zlib.Z_NO_COMPRESSION = 0;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_BEST_SPEED;
|
||||
zlib.Z_BEST_SPEED = 1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_BEST_COMPRESSION;
|
||||
zlib.Z_BEST_COMPRESSION = 9;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_DEFAULT_COMPRESSION;
|
||||
zlib.Z_DEFAULT_COMPRESSION = -1;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_FILTERED;
|
||||
zlib.Z_FILTERED = 1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_HUFFMAN_ONLY;
|
||||
zlib.Z_HUFFMAN_ONLY = 2;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_RLE;
|
||||
zlib.Z_RLE = 3;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_FIXED;
|
||||
zlib.Z_FIXED = 4;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_DEFAULT_STRATEGY;
|
||||
zlib.Z_DEFAULT_STRATEGY = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_BINARY;
|
||||
zlib.Z_BINARY = 0;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_TEXT;
|
||||
zlib.Z_TEXT = 1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_ASCII;
|
||||
zlib.Z_ASCII = 1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_UNKNOWN;
|
||||
zlib.Z_UNKNOWN = 2;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_DEFLATED;
|
||||
zlib.Z_DEFLATED = 8;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const
|
||||
*/
|
||||
zlib.Z_NULL;
|
||||
|
||||
module.exports.ZlibOptions = zlib.ZlibOptions;
|
||||
|
||||
module.exports.Gzip = zlib.Gzip;
|
||||
|
||||
module.exports.Gunzip = zlib.Gunzip;
|
||||
|
||||
module.exports.Deflate = zlib.Deflate;
|
||||
|
||||
module.exports.Inflate = zlib.Inflate;
|
||||
|
||||
module.exports.DeflateRaw = zlib.DeflateRaw;
|
||||
|
||||
module.exports.InflateRaw = zlib.InflateRaw;
|
||||
|
||||
module.exports.Unzip = zlib.Unzip;
|
||||
|
||||
module.exports.createGzip = zlib.createGzip;
|
||||
|
||||
module.exports.createGunzip = zlib.createGunzip;
|
||||
|
||||
module.exports.createDeflate = zlib.createDeflate;
|
||||
|
||||
module.exports.createInflate = zlib.createInflate;
|
||||
|
||||
module.exports.createDeflateRaw = zlib.createDeflateRaw;
|
||||
|
||||
module.exports.createInflateRaw = zlib.createInflateRaw;
|
||||
|
||||
module.exports.createUnzip = zlib.createUnzip;
|
||||
|
||||
module.exports.deflate = zlib.deflate;
|
||||
|
||||
module.exports.deflateSync = zlib.deflateSync;
|
||||
|
||||
module.exports.deflateRaw = zlib.deflateRaw;
|
||||
|
||||
module.exports.deflateRawSync = zlib.deflateRawSync;
|
||||
|
||||
module.exports.gzip = zlib.gzip;
|
||||
|
||||
module.exports.gzipSync = zlib.gzipSync;
|
||||
|
||||
module.exports.gunzip = zlib.gunzip;
|
||||
|
||||
module.exports.gunzipSync = zlib.gunzipSync;
|
||||
|
||||
module.exports.inflate = zlib.inflate;
|
||||
|
||||
module.exports.inflateSync = zlib.inflateSync;
|
||||
|
||||
module.exports.inflateRaw = zlib.inflateRaw;
|
||||
|
||||
module.exports.inflateRawSync = zlib.inflateRawSync;
|
||||
|
||||
module.exports.unzip = zlib.unzip;
|
||||
|
||||
module.exports.unzipSync = zlib.unzipSync;
|
||||
|
||||
module.exports.Z_NO_FLUSH = zlib.Z_NO_FLUSH;
|
||||
|
||||
module.exports.Z_PARTIAL_FLUSH = zlib.Z_PARTIAL_FLUSH;
|
||||
|
||||
module.exports.Z_SYNC_FLUSH = zlib.Z_SYNC_FLUSH;
|
||||
|
||||
module.exports.Z_FULL_FLUSH = zlib.Z_FULL_FLUSH;
|
||||
|
||||
module.exports.Z_FINISH = zlib.Z_FINISH;
|
||||
|
||||
module.exports.Z_BLOCK = zlib.Z_BLOCK;
|
||||
|
||||
module.exports.Z_TREES = zlib.Z_TREES;
|
||||
|
||||
module.exports.Z_OK = zlib.Z_OK;
|
||||
|
||||
module.exports.Z_STREAM_END = zlib.Z_STREAM_END;
|
||||
|
||||
module.exports.Z_NEED_DICT = zlib.Z_NEED_DICT;
|
||||
|
||||
module.exports.Z_ERRNO = zlib.Z_ERRNO;
|
||||
|
||||
module.exports.Z_STREAM_ERROR = zlib.Z_STREAM_ERROR;
|
||||
|
||||
module.exports.Z_DATA_ERROR = zlib.Z_DATA_ERROR;
|
||||
|
||||
module.exports.Z_MEM_ERROR = zlib.Z_MEM_ERROR;
|
||||
|
||||
module.exports.Z_BUF_ERROR = zlib.Z_BUF_ERROR;
|
||||
|
||||
module.exports.Z_VERSION_ERROR = zlib.Z_VERSION_ERROR;
|
||||
|
||||
module.exports.Z_NO_COMPRESSION = zlib.Z_NO_COMPRESSION;
|
||||
|
||||
module.exports.Z_BEST_SPEED = zlib.Z_BEST_SPEED;
|
||||
|
||||
module.exports.Z_BEST_COMPRESSION = zlib.Z_BEST_COMPRESSION;
|
||||
|
||||
module.exports.Z_DEFAULT_COMPRESSION = zlib.Z_DEFAULT_COMPRESSION;
|
||||
|
||||
module.exports.Z_FILTERED = zlib.Z_FILTERED;
|
||||
|
||||
module.exports.Z_HUFFMAN_ONLY = zlib.Z_HUFFMAN_ONLY;
|
||||
|
||||
module.exports.Z_RLE = zlib.Z_RLE;
|
||||
|
||||
module.exports.Z_FIXED = zlib.Z_FIXED;
|
||||
|
||||
module.exports.Z_DEFAULT_STRATEGY = zlib.Z_DEFAULT_STRATEGY;
|
||||
|
||||
module.exports.Z_BINARY = zlib.Z_BINARY;
|
||||
|
||||
module.exports.Z_TEXT = zlib.Z_TEXT;
|
||||
|
||||
module.exports.Z_ASCII = zlib.Z_ASCII;
|
||||
|
||||
module.exports.Z_UNKNOWN = zlib.Z_UNKNOWN;
|
||||
|
||||
module.exports.Z_DEFLATED = zlib.Z_DEFLATED;
|
||||
|
||||
module.exports.Z_NULL = zlib.Z_NULL;
|
||||
zlib.Z_NULL = 0;
|
||||
|
||||
module.exports = zlib;
|
||||
|
||||
@@ -28,6 +28,15 @@
|
||||
function CallSite() {}
|
||||
|
||||
|
||||
/**
|
||||
* Runs the garbage collector, provided that you start V8 with --expose-gc or
|
||||
* Chrome with --js-flags="--expose-gc".
|
||||
* See https://v8.dev/docs/memory-leaks
|
||||
* @type {undefined|function()}
|
||||
*/
|
||||
CallSite.prototype.gc;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the value of this.
|
||||
* @return {Object|undefined}
|
||||
|
||||
@@ -65,248 +65,286 @@ Port.prototype.disconnect = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @see https://developer.chrome.com/extensions/events.html
|
||||
* @constructor
|
||||
* TODO(tbreisacher): Update *Listener methods to take {function()}
|
||||
* instead of {!Function}. See discussion at go/ChromeEvent-TODO
|
||||
* Base event type without listener methods.
|
||||
*
|
||||
* This interface exists for event interfaces whose addListeners() method takes
|
||||
* more than one parameter. Those interfaces must inherit from this one, so they
|
||||
* can supply their own custom listener method declarations.
|
||||
*
|
||||
* Event interfaces whose addListeners() method takes just one parameter should
|
||||
* inherit from ChromeBaseEvent instead. It extends this interface.
|
||||
*
|
||||
* @see https://developer.chrome.com/extensions/events
|
||||
* @interface
|
||||
*/
|
||||
function ChromeBaseEventNoListeners() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<!Rule>} rules
|
||||
* @param {function(!Array<!Rule>): void=} callback
|
||||
* @see https://developer.chrome.com/extensions/events#method-Event-addRules
|
||||
*/
|
||||
ChromeBaseEventNoListeners.prototype.addRules = function(rules, callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* Returns currently registered rules.
|
||||
*
|
||||
* NOTE: The API allows the first argument to be omitted.
|
||||
* That cannot be correctly represented here, so we end up incorrectly
|
||||
* allowing 2 callback arguments.
|
||||
* @param {!Array<string>|function(!Array<!Rule>): void} ruleIdentifiersOrCb
|
||||
* @param {function(!Array<!Rule>): void=} callback
|
||||
* @see https://developer.chrome.com/extensions/events#method-Event-getRules
|
||||
*/
|
||||
ChromeBaseEventNoListeners.prototype.getRules =
|
||||
function(ruleIdentifiersOrCb, callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* Removes currently registered rules.
|
||||
*
|
||||
* NOTE: The API allows the either or both arguments to be omitted.
|
||||
* That cannot be correctly represented here, so we end up incorrectly
|
||||
* allowing 2 callback arguments.
|
||||
* @param {(!Array<string>|function(): void)=} ruleIdentifiersOrCb
|
||||
* @param {function(): void=} callback
|
||||
* @see https://developer.chrome.com/extensions/events#method-Event-removeRules
|
||||
*/
|
||||
ChromeBaseEventNoListeners.prototype.removeRules =
|
||||
function(ruleIdentifiersOrCb, callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @see https://developer.chrome.com/extensions/events#type-Rule
|
||||
* @record
|
||||
*/
|
||||
function Rule() {}
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
Rule.prototype.id;
|
||||
|
||||
|
||||
/** @type {!Array<string>|undefined} */
|
||||
Rule.prototype.tags;
|
||||
|
||||
|
||||
/** @type {!Array<*>} */
|
||||
Rule.prototype.conditions;
|
||||
|
||||
|
||||
/** @type {!Array<*>} */
|
||||
Rule.prototype.actions;
|
||||
|
||||
|
||||
/** @type {number|undefined} */
|
||||
Rule.prototype.priority;
|
||||
|
||||
|
||||
/**
|
||||
* @see https://developer.chrome.com/extensions/events#type-UrlFilter
|
||||
* @record
|
||||
*/
|
||||
function UrlFilter() {}
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.hostContains;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.hostEquals;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.hostPrefix;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.hostSuffix;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.pathContains;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.pathEquals;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.pathPrefix;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.pathSuffix;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.queryContains;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.queryEquals;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.queryPrefix;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.querySuffix;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.urlContains;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.urlEquals;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.urlMatches;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.originAndPathMatches;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.urlPrefix;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
UrlFilter.prototype.urlSuffix;
|
||||
|
||||
|
||||
/** @type {!Array<string>|undefined} */
|
||||
UrlFilter.prototype.schemes;
|
||||
|
||||
|
||||
/** @type {!Array<(number|!Array<number>)>|undefined} */
|
||||
UrlFilter.prototype.ports;
|
||||
|
||||
|
||||
/**
|
||||
* Base event type from which all others inherit.
|
||||
*
|
||||
* LISTENER must be a function type that returns void.
|
||||
*
|
||||
* @see https://developer.chrome.com/extensions/events
|
||||
* @interface
|
||||
* @extends {ChromeBaseEventNoListeners}
|
||||
* @template LISTENER
|
||||
*/
|
||||
function ChromeBaseEvent() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {LISTENER} callback
|
||||
* @return {undefined}
|
||||
* @see https://developer.chrome.com/extensions/events#method-Event-addListener
|
||||
*/
|
||||
ChromeBaseEvent.prototype.addListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {LISTENER} callback
|
||||
* @return {undefined}
|
||||
* @see https://developer.chrome.com/extensions/events#method-Event-removeListener
|
||||
*/
|
||||
ChromeBaseEvent.prototype.removeListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {LISTENER} callback
|
||||
* @return {boolean}
|
||||
* @see https://developer.chrome.com/extensions/events#method-Event-hasListener
|
||||
*/
|
||||
ChromeBaseEvent.prototype.hasListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
* @see https://developer.chrome.com/extensions/events#method-Event-hasListeners
|
||||
*/
|
||||
ChromeBaseEvent.prototype.hasListeners = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* Event whose listeners take unspecified parameters.
|
||||
*
|
||||
* TODO(bradfordcsmith): Definitions using this type are failing to provide
|
||||
* information about the parameters that will actually be supplied to the
|
||||
* listener and should be updated to use a more specific event type.
|
||||
* @see https://developer.chrome.com/extensions/events
|
||||
* @interface
|
||||
* @extends {ChromeBaseEvent<!Function>}
|
||||
*/
|
||||
function ChromeEvent() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Function} callback
|
||||
* @return {undefined}
|
||||
* Event whose listeners take no parameters.
|
||||
*
|
||||
* @see https://developer.chrome.com/extensions/events
|
||||
* @interface
|
||||
* @extends {ChromeBaseEvent<function()>}
|
||||
*/
|
||||
ChromeEvent.prototype.addListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Function} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeEvent.prototype.removeListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Function} callback
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChromeEvent.prototype.hasListener = function(callback) {};
|
||||
|
||||
|
||||
/** @return {boolean} */
|
||||
ChromeEvent.prototype.hasListeners = function() {};
|
||||
|
||||
// TODO(tbreisacher): Add the addRules, getRules, and removeRules methods?
|
||||
|
||||
function ChromeVoidEvent() {}
|
||||
|
||||
|
||||
/**
|
||||
* Event whose listeners take a string parameter.
|
||||
* @constructor
|
||||
* @interface
|
||||
* @extends {ChromeBaseEvent<function(string)>}
|
||||
*/
|
||||
function ChromeStringEvent() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(string): void} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeStringEvent.prototype.addListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(string): void} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeStringEvent.prototype.removeListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(string): void} callback
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChromeStringEvent.prototype.hasListener = function(callback) {};
|
||||
|
||||
|
||||
/** @return {boolean} */
|
||||
ChromeStringEvent.prototype.hasListeners = function() {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Event whose listeners take a boolean parameter.
|
||||
* @constructor
|
||||
* @interface
|
||||
* @extends {ChromeBaseEvent<function(boolean)>}
|
||||
*/
|
||||
|
||||
function ChromeBooleanEvent() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(boolean): void} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeBooleanEvent.prototype.addListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(boolean): void} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeBooleanEvent.prototype.removeListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(boolean): void} callback
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChromeBooleanEvent.prototype.hasListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChromeBooleanEvent.prototype.hasListeners = function() {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Event whose listeners take a number parameter.
|
||||
* @constructor
|
||||
* @interface
|
||||
* @extends {ChromeBaseEvent<function(number)>}
|
||||
*/
|
||||
|
||||
function ChromeNumberEvent() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(number): void} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeNumberEvent.prototype.addListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(number): void} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeNumberEvent.prototype.removeListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(number): void} callback
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChromeNumberEvent.prototype.hasListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChromeNumberEvent.prototype.hasListeners = function() {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Event whose listeners take an Object parameter.
|
||||
* @constructor
|
||||
* @interface
|
||||
* @extends {ChromeBaseEvent<function(!Object)>}
|
||||
*/
|
||||
function ChromeObjectEvent() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(!Object): void} callback Callback.
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeObjectEvent.prototype.addListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(!Object): void} callback Callback.
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeObjectEvent.prototype.removeListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(!Object): void} callback Callback.
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChromeObjectEvent.prototype.hasListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChromeObjectEvent.prototype.hasListeners = function() {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Event whose listeners take a string array parameter.
|
||||
* @constructor
|
||||
* @interface
|
||||
* @extends {ChromeBaseEvent<function(!Array<string>)>}
|
||||
*/
|
||||
function ChromeStringArrayEvent() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(!Array<string>): void} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeStringArrayEvent.prototype.addListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(!Array<string>): void} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeStringArrayEvent.prototype.removeListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(!Array<string>): void} callback
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChromeStringArrayEvent.prototype.hasListener = function(callback) {};
|
||||
|
||||
|
||||
/** @return {boolean} */
|
||||
ChromeStringArrayEvent.prototype.hasListeners = function() {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Event whose listeners take two strings as parameters.
|
||||
* @constructor
|
||||
* @interface
|
||||
* @extends {ChromeBaseEvent<function(string, string)>}
|
||||
*/
|
||||
function ChromeStringStringEvent() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(string, string): void} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeStringStringEvent.prototype.addListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(string, string): void} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
ChromeStringStringEvent.prototype.removeListener = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(string, string): void} callback
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChromeStringStringEvent.prototype.hasListener = function(callback) {};
|
||||
|
||||
|
||||
/** @return {boolean} */
|
||||
ChromeStringStringEvent.prototype.hasListeners = function() {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @see http://developer.chrome.com/extensions/runtime.html#type-MessageSender
|
||||
* @constructor
|
||||
@@ -330,10 +368,18 @@ MessageSender.prototype.id;
|
||||
MessageSender.prototype.url;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
MessageSender.prototype.nativeApplication;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
MessageSender.prototype.tlsChannelId;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
MessageSender.prototype.origin;
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
* @see https://developer.chrome.com/extensions/tabs#type-MutedInfoReason
|
||||
@@ -424,6 +470,10 @@ Tab.prototype.mutedInfo;
|
||||
Tab.prototype.url;
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
Tab.prototype.pendingUrl;
|
||||
|
||||
|
||||
// TODO: Make this field optional once dependent projects have been updated.
|
||||
/** @type {string} */
|
||||
Tab.prototype.title;
|
||||
@@ -503,12 +553,8 @@ chrome.webstore.onDownloadProgress;
|
||||
chrome.runtime = {};
|
||||
|
||||
|
||||
/** @type {!Object|undefined} */
|
||||
chrome.runtime.lastError = {};
|
||||
|
||||
|
||||
/** @type {string|undefined} */
|
||||
chrome.runtime.lastError.message;
|
||||
/** @type {{message:(string|undefined)}|undefined} */
|
||||
chrome.runtime.lastError;
|
||||
|
||||
|
||||
/**
|
||||
@@ -618,49 +664,6 @@ ChromeLoadTimes.prototype.wasAlternateProtocolAvailable;
|
||||
ChromeLoadTimes.prototype.connectionInfo;
|
||||
|
||||
|
||||
/**
|
||||
* Returns an object containing timing information.
|
||||
* @return {!ChromeCsiInfo}
|
||||
*/
|
||||
chrome.csi = function() {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The data object given by chrome.csi().
|
||||
* @constructor
|
||||
*/
|
||||
function ChromeCsiInfo() {}
|
||||
|
||||
|
||||
/**
|
||||
* Same as chrome.loadTimes().requestTime, if defined.
|
||||
* Otherwise, gives the same value as chrome.loadTimes().startLoadTime.
|
||||
* In milliseconds, truncated.
|
||||
* @type {number}
|
||||
*/
|
||||
ChromeCsiInfo.prototype.startE;
|
||||
|
||||
|
||||
/**
|
||||
* Same as chrome.loadTimes().finishDocumentLoadTime but in milliseconds and
|
||||
* truncated.
|
||||
* @type {number}
|
||||
*/
|
||||
ChromeCsiInfo.prototype.onloadT;
|
||||
|
||||
|
||||
/**
|
||||
* The time since startE in milliseconds.
|
||||
* @type {number}
|
||||
*/
|
||||
ChromeCsiInfo.prototype.pageT;
|
||||
|
||||
|
||||
/** @type {number} */
|
||||
ChromeCsiInfo.prototype.tran;
|
||||
|
||||
|
||||
/**
|
||||
* @param {string|!ArrayBuffer|!Object} message
|
||||
* @see https://developers.google.com/native-client/devguide/tutorial
|
||||
|
||||
50
javascript/externs/web/deprecated.js
Normal file
50
javascript/externs/web/deprecated.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright 2008 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview JavaScript Built-Ins that are not part of any specifications
|
||||
* but are still needed in some project's build.
|
||||
* @externs
|
||||
*/
|
||||
var opera = {};
|
||||
|
||||
opera.postError;
|
||||
|
||||
/** @nosideeffects */
|
||||
opera.version = function() {};
|
||||
|
||||
/** @constructor */
|
||||
function XSLTProcessor() {}
|
||||
|
||||
/**
|
||||
* @param {Node} styleSheet
|
||||
* @return {undefined}
|
||||
* @deprecated
|
||||
*/
|
||||
XSLTProcessor.prototype.importStylesheet = function(styleSheet) {};
|
||||
|
||||
/**
|
||||
* @param {Node} source
|
||||
* @return {Document}
|
||||
* @deprecated
|
||||
*/
|
||||
XSLTProcessor.prototype.transformToDocument = function(source) {};
|
||||
|
||||
// The "methods" object is a place to hang arbitrary external
|
||||
// properties. It is a throwback to pre-typed days, and should
|
||||
// not be used for any new definitions; it exists only to bridge
|
||||
// the gap between the old way and the new way.
|
||||
var methods = {};
|
||||
143
javascript/externs/web/es6_proxy.js
Normal file
143
javascript/externs/web/es6_proxy.js
Normal file
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Copyright 2018 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for ECMAScript 6 Proxy objects.
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-objects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
|
||||
* @externs
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @template TARGET
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler
|
||||
*/
|
||||
function ProxyHandler() {}
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET):?Object)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getPrototypeOf
|
||||
*/
|
||||
ProxyHandler.prototype.getPrototypeOf /* = function(target) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET, ?Object):boolean)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-setprototypeof-v
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/setPrototypeOf
|
||||
*/
|
||||
ProxyHandler.prototype.setPrototypeOf /* = function(target, proto) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET):boolean)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-isextensible
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/isExtensible
|
||||
*/
|
||||
ProxyHandler.prototype.isExtensible /* = function(target) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET):boolean)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-preventextensions
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/preventExtensions
|
||||
*/
|
||||
ProxyHandler.prototype.preventExtensions /* = function(target) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET, (string|symbol)):(!ObjectPropertyDescriptor|undefined))|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getownproperty-p
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getOwnPropertyDescriptor
|
||||
*/
|
||||
ProxyHandler.prototype.getOwnPropertyDescriptor /* = function(target, prop) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET, (string|symbol), !ObjectPropertyDescriptor):boolean)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/defineProperty
|
||||
*/
|
||||
ProxyHandler.prototype.defineProperty /* = function(target, prop, desc) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET, (string|symbol)):boolean)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-hasproperty-p
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/has
|
||||
*/
|
||||
ProxyHandler.prototype.has /* = function(target, prop) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET, (string|symbol), !Object):*)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/get
|
||||
*/
|
||||
ProxyHandler.prototype.get /* = function(target, prop, receiver) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET, (string|symbol), *, !Object):boolean)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/set
|
||||
*/
|
||||
ProxyHandler.prototype.set /* = function(target, prop, value, receiver) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET, (string|symbol)):boolean)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-delete-p
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/deleteProperty
|
||||
*/
|
||||
ProxyHandler.prototype.deleteProperty /* = function (target, prop) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET):!Array<(string|symbol)>)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/ownKeys
|
||||
*/
|
||||
ProxyHandler.prototype.ownKeys /* = function(target) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET, *, !Array):*)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/apply
|
||||
*/
|
||||
ProxyHandler.prototype.apply /* = function(target, thisArg, argList) {} */;
|
||||
|
||||
/**
|
||||
* @type {(function(TARGET, !Array, function(new: ?, ...?)):!Object)|undefined}
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/construct
|
||||
*/
|
||||
ProxyHandler.prototype.construct /* = function(target, argList, newTarget) {} */;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {TARGET} target
|
||||
* @param {!ProxyHandler<TARGET>} handler
|
||||
* @template TARGET
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy-constructor
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#Syntax
|
||||
*/
|
||||
function Proxy(target, handler) {}
|
||||
|
||||
/**
|
||||
* @param {TARGET} target
|
||||
* @param {!ProxyHandler<TARGET>} handler
|
||||
* @return {{proxy: !Proxy<TARGET>, revoke: function():void}}
|
||||
* @template TARGET
|
||||
* @see https://tc39.github.io/ecma262/#sec-proxy.revocable
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable
|
||||
*/
|
||||
Proxy.revocable = function(target, handler) {};
|
||||
@@ -37,8 +37,8 @@ var ReferrerPolicy;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {!Headers|!Array<!Array<string>>|!IObject<string,string>}
|
||||
* @see https://fetch.spec.whatwg.org/#headersinit
|
||||
* @typedef {!Headers|!Array<!Array<string>>|!Object<string,string>}
|
||||
* @see https://fetch.spec.whatwg.org/#typedefdef-headersinit
|
||||
*/
|
||||
var HeadersInit;
|
||||
|
||||
@@ -64,7 +64,7 @@ Headers.prototype.append = function(name, value) {};
|
||||
*/
|
||||
Headers.prototype.delete = function(name) {};
|
||||
|
||||
/** @return {!Iterator<!Array<string>>} */
|
||||
/** @return {!IteratorIterable<!Array<string>>} */
|
||||
Headers.prototype.entries = function() {};
|
||||
|
||||
/**
|
||||
@@ -85,7 +85,7 @@ Headers.prototype.getAll = function(name) {};
|
||||
*/
|
||||
Headers.prototype.has = function(name) {};
|
||||
|
||||
/** @return {!Iterator<string>} */
|
||||
/** @return {!IteratorIterable<string>} */
|
||||
Headers.prototype.keys = function() {};
|
||||
|
||||
/**
|
||||
@@ -103,7 +103,8 @@ Headers.prototype[Symbol.iterator] = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {!Blob|!BufferSource|!FormData|string}
|
||||
* @typedef {
|
||||
* !Blob|!BufferSource|!FormData|!URLSearchParams|!ReadableStream|string}
|
||||
* @see https://fetch.spec.whatwg.org/#bodyinit
|
||||
*/
|
||||
var BodyInit;
|
||||
@@ -208,6 +209,12 @@ Request.prototype.redirect;
|
||||
/** @type {string} */
|
||||
Request.prototype.integrity;
|
||||
|
||||
/** @type {boolean} */
|
||||
Request.prototype.isHistoryNavigation;
|
||||
|
||||
/** @type {(undefined|boolean)} */
|
||||
Request.prototype.keepalive;
|
||||
|
||||
/** @return {!Request} */
|
||||
Request.prototype.clone = function() {};
|
||||
|
||||
@@ -248,6 +255,12 @@ RequestInit.prototype.redirect;
|
||||
/** @type {(undefined|string)} */
|
||||
RequestInit.prototype.integrity;
|
||||
|
||||
/** @type {(undefined|!AbortSignal)} */
|
||||
RequestInit.prototype.signal;
|
||||
|
||||
/** @type {(undefined|boolean)} */
|
||||
RequestInit.prototype.keepalive;
|
||||
|
||||
/** @type {(undefined|null)} */
|
||||
RequestInit.prototype.window;
|
||||
|
||||
@@ -418,3 +431,10 @@ Window.prototype.fetch = function(input, opt_init) {};
|
||||
* @see https://fetch.spec.whatwg.org/#fetch-method
|
||||
*/
|
||||
WorkerGlobalScope.prototype.fetch = function(input, opt_init) {};
|
||||
|
||||
/**
|
||||
* if WorkerOptions.type = 'module', it specifies how `scriptURL` is fetched.
|
||||
* WorkerOptions is defined in html5.js.
|
||||
* @type {!RequestCredentials|undefined}
|
||||
*/
|
||||
WorkerOptions.prototype.credentials;
|
||||
|
||||
94
javascript/externs/web/fido.js
Normal file
94
javascript/externs/web/fido.js
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright 2018 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions from the FIDO Specifications
|
||||
* @see https://fidoalliance.org/download/
|
||||
*
|
||||
* @externs
|
||||
* @author arnarbi@gmail.com (Arnar Birgisson)
|
||||
*/
|
||||
|
||||
/**
|
||||
* U2F JavaScript API namespace
|
||||
* @see https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-javascript-api-v1.2-ps-20170411.html
|
||||
* @const
|
||||
*/
|
||||
var u2f = {};
|
||||
|
||||
/**
|
||||
* Data object for a single sign request.
|
||||
* @typedef {string}
|
||||
*/
|
||||
u2f.Transport;
|
||||
|
||||
/**
|
||||
* Data object for a registered key.
|
||||
* @typedef {{
|
||||
* version: string,
|
||||
* keyHandle: string,
|
||||
* transports: (!Array<!u2f.Transport>|undefined),
|
||||
* appId: ?string
|
||||
* }}
|
||||
*/
|
||||
u2f.RegisteredKey;
|
||||
|
||||
/**
|
||||
* An error object for responses
|
||||
* @typedef {{
|
||||
* errorCode: number,
|
||||
* errorMessage: ?string
|
||||
* }}
|
||||
*/
|
||||
u2f.Error;
|
||||
|
||||
/**
|
||||
* Data object for a sign response.
|
||||
* @typedef {{
|
||||
* keyHandle: string,
|
||||
* signatureData: string,
|
||||
* clientData: string
|
||||
* }}
|
||||
*/
|
||||
u2f.SignResponse;
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* version: string,
|
||||
* challenge: string
|
||||
* }}
|
||||
*/
|
||||
u2f.RegisterRequest
|
||||
|
||||
/**
|
||||
* @param {string} appId
|
||||
* @param {string} challenge
|
||||
* @param {!Array<!u2f.RegisteredKey>} registeredKeys
|
||||
* @param {function((!u2f.Error|!u2f.SignResponse))} callback
|
||||
* @param {number=} opt_timeoutSeconds
|
||||
*/
|
||||
u2f.sign = function(
|
||||
appId, challenge, registeredKeys, callback, opt_timeoutSeconds) {};
|
||||
|
||||
/**
|
||||
* @param {string} appId
|
||||
* @param {!Array<!u2f.RegisterRequest>} registerRequests
|
||||
* @param {!Array<!u2f.RegisteredKey>} registeredKeys
|
||||
* @param {function((!u2f.Error|!u2f.SignResponse))} callback
|
||||
* @param {number=} opt_timeoutSeconds
|
||||
*/
|
||||
u2f.register = function(
|
||||
appId, registerRequests, registeredKeys, callback, opt_timeoutSeconds) {};
|
||||
@@ -39,12 +39,12 @@ HTMLObjectElement.prototype.CallFunction = function(xmlString) {};
|
||||
* Returns the value of the Flash variable specified by varName or null if the
|
||||
* variable does not exist.
|
||||
* @param {string} varName The variable name.
|
||||
* @return {string?} The variable value.
|
||||
* @return {?string} The variable value.
|
||||
*/
|
||||
HTMLObjectElement.prototype.GetVariable = function(varName) {};
|
||||
|
||||
/**
|
||||
* Activates the frame number specified by {@code frameNumber} in the current
|
||||
* Activates the frame number specified by `frameNumber` in the current
|
||||
* movie.
|
||||
* @param {number} frameNumber A non-negative integer frame number.
|
||||
* @return {undefined}
|
||||
@@ -57,8 +57,8 @@ HTMLObjectElement.prototype.GotoFrame = function(frameNumber) {};
|
||||
HTMLObjectElement.prototype.IsPlaying = function() {};
|
||||
|
||||
/**
|
||||
* Loads the movie identified by {@code url} to the layer specified by {@code
|
||||
* layerNumber}.
|
||||
* Loads the movie identified by `url` to the layer specified by
|
||||
* `layerNumber`.
|
||||
* @param {number} layerNumber The layer number.
|
||||
* @param {string} url The movie URL.
|
||||
* @return {undefined}
|
||||
@@ -136,7 +136,7 @@ HTMLObjectElement.prototype.Zoom = function(percent) {};
|
||||
// TellTarget Methods.
|
||||
|
||||
/**
|
||||
* Executes the action in the timeline specified by {@code target} in the
|
||||
* Executes the action in the timeline specified by `target` in the
|
||||
* specified frame.
|
||||
* @param {string} target The timeline.
|
||||
* @param {number} frameNumber The frame number.
|
||||
@@ -145,7 +145,7 @@ HTMLObjectElement.prototype.Zoom = function(percent) {};
|
||||
HTMLObjectElement.prototype.TCallFrame = function(target, frameNumber) {};
|
||||
|
||||
/**
|
||||
* Executes the action in the timeline specified by {@code target} in the
|
||||
* Executes the action in the timeline specified by `target` in the
|
||||
* specified frame.
|
||||
* @param {string} target The timeline.
|
||||
* @param {string} label The frame label.
|
||||
|
||||
@@ -47,12 +47,6 @@ Window.prototype.Components;
|
||||
*/
|
||||
Window.prototype.content;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.closed
|
||||
*/
|
||||
Window.prototype.closed;
|
||||
|
||||
/** @see https://developer.mozilla.org/en/DOM/window.controllers */
|
||||
Window.prototype.controllers;
|
||||
|
||||
@@ -72,109 +66,18 @@ Window.prototype.dialogArguments;
|
||||
/** @see https://developer.mozilla.org/en/DOM/window.directories */
|
||||
Window.prototype.directories;
|
||||
|
||||
/**
|
||||
* @type {HTMLObjectElement|HTMLIFrameElement|null}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.frameElement
|
||||
*/
|
||||
Window.prototype.frameElement;
|
||||
|
||||
/**
|
||||
* Allows lookup of frames by index or by name.
|
||||
* @type {?Object}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.frames
|
||||
*/
|
||||
Window.prototype.frames;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.fullScreen
|
||||
*/
|
||||
Window.prototype.fullScreen;
|
||||
|
||||
/**
|
||||
* @return {!Promise<!BatteryManager>}
|
||||
* @see http://www.w3.org/TR/battery-status/
|
||||
*/
|
||||
Navigator.prototype.getBattery = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/Storage#globalStorage
|
||||
*/
|
||||
Window.prototype.globalStorage;
|
||||
|
||||
/**
|
||||
* @type {!History}
|
||||
* @suppress {duplicate}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.history
|
||||
*/
|
||||
var history;
|
||||
|
||||
/**
|
||||
* Returns the number of frames (either frame or iframe elements) in the
|
||||
* window.
|
||||
*
|
||||
* @type {number}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.length
|
||||
*/
|
||||
Window.prototype.length;
|
||||
|
||||
/**
|
||||
* Location has an exception in the DeclaredGlobalExternsOnWindow pass
|
||||
* so we have to manually include it:
|
||||
* https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/DeclaredGlobalExternsOnWindow.java#L116
|
||||
*
|
||||
* @type {!Location}
|
||||
* @implicitCast
|
||||
* @see https://developer.mozilla.org/en/DOM/window.location
|
||||
*/
|
||||
Window.prototype.location;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.locationbar
|
||||
*/
|
||||
Window.prototype.locationbar;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.menubar
|
||||
*/
|
||||
Window.prototype.menubar;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.name
|
||||
*/
|
||||
Window.prototype.name;
|
||||
|
||||
/**
|
||||
* @type {Navigator}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.navigator
|
||||
*/
|
||||
Window.prototype.navigator;
|
||||
|
||||
/**
|
||||
* @type {?Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.opener
|
||||
*/
|
||||
Window.prototype.opener;
|
||||
|
||||
/**
|
||||
* @type {!Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.parent
|
||||
*/
|
||||
Window.prototype.parent;
|
||||
|
||||
/** @see https://developer.mozilla.org/en/DOM/window.personalbar */
|
||||
Window.prototype.personalbar;
|
||||
|
||||
/** @see https://developer.mozilla.org/en/DOM/window.pkcs11 */
|
||||
Window.prototype.pkcs11;
|
||||
|
||||
/** @see https://developer.mozilla.org/en/DOM/window */
|
||||
Window.prototype.returnValue;
|
||||
|
||||
/** @see https://developer.mozilla.org/en/DOM/window.scrollbars */
|
||||
Window.prototype.scrollbars;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://developer.mozilla.org/En/DOM/window.scrollMaxX
|
||||
@@ -187,97 +90,21 @@ Window.prototype.scrollMaxX;
|
||||
*/
|
||||
Window.prototype.scrollMaxY;
|
||||
|
||||
/**
|
||||
* @type {!Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.self
|
||||
*/
|
||||
Window.prototype.self;
|
||||
|
||||
/** @see https://developer.mozilla.org/en/DOM/Storage#sessionStorage */
|
||||
Window.prototype.sessionStorage;
|
||||
|
||||
/** @see https://developer.mozilla.org/en/DOM/window.sidebar */
|
||||
Window.prototype.sidebar;
|
||||
|
||||
/**
|
||||
* @type {?string}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.status
|
||||
*/
|
||||
Window.prototype.status;
|
||||
|
||||
/** @see https://developer.mozilla.org/en/DOM/window.statusbar */
|
||||
Window.prototype.statusbar;
|
||||
|
||||
/** @see https://developer.mozilla.org/en/DOM/window.toolbar */
|
||||
Window.prototype.toolbar;
|
||||
|
||||
/**
|
||||
* @type {!Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.self
|
||||
*/
|
||||
Window.prototype.top;
|
||||
|
||||
/**
|
||||
* @type {!Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.self
|
||||
*/
|
||||
Window.prototype.window;
|
||||
|
||||
/**
|
||||
* @param {*} message
|
||||
* @see https://developer.mozilla.org/en/DOM/window.alert
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.alert = function(message) {};
|
||||
|
||||
/**
|
||||
* Decodes a string of data which has been encoded using base-64 encoding.
|
||||
*
|
||||
* @param {string} encodedData
|
||||
* @return {string}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.atob
|
||||
* @nosideeffects
|
||||
*/
|
||||
function atob(encodedData) {}
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.back
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.back = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.blur
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.blur = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} stringToEncode
|
||||
* @return {string}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.btoa
|
||||
* @nosideeffects
|
||||
*/
|
||||
function btoa(stringToEncode) {}
|
||||
|
||||
/** @deprecated */
|
||||
Window.prototype.captureEvents;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.close
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.close = function() {};
|
||||
|
||||
/**@see https://developer.mozilla.org/en/DOM/window.find */
|
||||
Window.prototype.find;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.focus
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.focus = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.forward
|
||||
* @return {undefined}
|
||||
@@ -290,13 +117,6 @@ Window.prototype.forward = function() {};
|
||||
*/
|
||||
Window.prototype.getAttention = function() {};
|
||||
|
||||
/**
|
||||
* @return {Selection}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.getSelection
|
||||
* @nosideeffects
|
||||
*/
|
||||
Window.prototype.getSelection = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.home
|
||||
* @return {undefined}
|
||||
@@ -318,12 +138,6 @@ Window.prototype.showModalDialog;
|
||||
|
||||
Window.prototype.sizeToContent;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536769(VS.85).aspx
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.stop = function() {};
|
||||
|
||||
Window.prototype.updateCommands;
|
||||
|
||||
// properties of Document
|
||||
@@ -345,8 +159,7 @@ Document.prototype.anchors;
|
||||
* @type {HTMLCollection<!HTMLAppletElement>}
|
||||
*/
|
||||
Document.prototype.applets;
|
||||
/** @type {boolean} */ Document.prototype.async;
|
||||
/** @type {string?} */ Document.prototype.baseURI;
|
||||
/** @type {?string} */ Document.prototype.baseURI;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/document.bgColor
|
||||
@@ -365,6 +178,11 @@ Document.prototype.compatMode;
|
||||
|
||||
Document.prototype.contentType;
|
||||
/** @type {string} */ Document.prototype.cookie;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/defaultView
|
||||
* @type {?Window}
|
||||
*/
|
||||
Document.prototype.defaultView;
|
||||
|
||||
/**
|
||||
@@ -401,9 +219,6 @@ Document.prototype.fgColor;
|
||||
*/
|
||||
Document.prototype.forms;
|
||||
|
||||
/** @type {number} */
|
||||
Document.prototype.height;
|
||||
|
||||
/** @type {HTMLCollection<!HTMLImageElement>} */
|
||||
Document.prototype.images;
|
||||
|
||||
@@ -467,11 +282,6 @@ Document.prototype.vlinkColor;
|
||||
*/
|
||||
Document.prototype.clear = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/document.close
|
||||
*/
|
||||
Document.prototype.close;
|
||||
|
||||
/**
|
||||
* @param {string} type
|
||||
* @return {Event}
|
||||
@@ -491,26 +301,8 @@ Document.prototype.evaluate;
|
||||
*/
|
||||
Document.prototype.execCommand;
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {!NodeList<!Element>}
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en/DOM/document.getElementsByClassName
|
||||
*/
|
||||
Document.prototype.getElementsByClassName = function(name) {};
|
||||
|
||||
/**
|
||||
* @param {string} uri
|
||||
* @return {undefined}
|
||||
*/
|
||||
Document.prototype.load = function(uri) {};
|
||||
Document.prototype.loadOverlay;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/document.open
|
||||
*/
|
||||
Document.prototype.open;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/Midas
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536676(VS.85).aspx
|
||||
@@ -543,20 +335,6 @@ Document.prototype.queryCommandSupported;
|
||||
*/
|
||||
Document.prototype.queryCommandValue;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/document.write
|
||||
* @param {string} text
|
||||
* @return {undefined}
|
||||
*/
|
||||
Document.prototype.write = function(text) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/document.writeln
|
||||
* @param {string} text
|
||||
* @return {undefined}
|
||||
*/
|
||||
Document.prototype.writeln = function(text) {};
|
||||
|
||||
Document.prototype.ononline;
|
||||
Document.prototype.onoffline;
|
||||
|
||||
@@ -572,7 +350,7 @@ Document.prototype.getBoxObjectFor = function(element) {};
|
||||
// http://lxr.mozilla.org/mozilla1.8/source/dom/public/idl/range/nsIDOMNSRange.idl
|
||||
|
||||
/**
|
||||
* @param {string} tag
|
||||
* @param {!TrustedHTML|string} tag
|
||||
* @return {DocumentFragment}
|
||||
*/
|
||||
Range.prototype.createContextualFragment;
|
||||
@@ -607,128 +385,6 @@ Range.prototype.intersectsNode;
|
||||
*/
|
||||
Range.prototype.compareNode;
|
||||
|
||||
|
||||
/** @constructor */
|
||||
function Selection() {}
|
||||
|
||||
/**
|
||||
* @type {Node}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/anchorNode
|
||||
*/
|
||||
Selection.prototype.anchorNode;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/anchorOffset
|
||||
*/
|
||||
Selection.prototype.anchorOffset;
|
||||
|
||||
/**
|
||||
* @type {Node}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/focusNode
|
||||
*/
|
||||
Selection.prototype.focusNode;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/focusOffset
|
||||
*/
|
||||
Selection.prototype.focusOffset;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/isCollapsed
|
||||
*/
|
||||
Selection.prototype.isCollapsed;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/rangeCount
|
||||
*/
|
||||
Selection.prototype.rangeCount;
|
||||
|
||||
/**
|
||||
* @param {Range} range
|
||||
* @return {undefined}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/addRange
|
||||
*/
|
||||
Selection.prototype.addRange = function(range) {};
|
||||
|
||||
/**
|
||||
* @param {number} index
|
||||
* @return {Range}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/getRangeAt
|
||||
* @nosideeffects
|
||||
*/
|
||||
Selection.prototype.getRangeAt = function(index) {};
|
||||
|
||||
/**
|
||||
* @param {Node} node
|
||||
* @param {number} index
|
||||
* @return {undefined}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/collapse
|
||||
*/
|
||||
Selection.prototype.collapse = function(node, index) {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/collapseToEnd
|
||||
*/
|
||||
Selection.prototype.collapseToEnd = function() {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/collapseToStart
|
||||
*/
|
||||
Selection.prototype.collapseToStart = function() {};
|
||||
|
||||
/**
|
||||
* @param {Node} node
|
||||
* @param {boolean} partlyContained
|
||||
* @return {boolean}
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/containsNode
|
||||
* @nosideeffects
|
||||
*/
|
||||
Selection.prototype.containsNode = function(node, partlyContained) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/deleteFromDocument
|
||||
* @return {undefined}
|
||||
*/
|
||||
Selection.prototype.deleteFromDocument = function() {};
|
||||
|
||||
/**
|
||||
* @param {Node} parentNode
|
||||
* @param {number} offset
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/extend
|
||||
* @return {undefined}
|
||||
*/
|
||||
Selection.prototype.extend = function(parentNode, offset) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/removeAllRanges
|
||||
* @return {undefined}
|
||||
*/
|
||||
Selection.prototype.removeAllRanges = function() {};
|
||||
|
||||
/**
|
||||
* @param {Range} range
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/removeRange
|
||||
* @return {undefined}
|
||||
*/
|
||||
Selection.prototype.removeRange = function(range) {};
|
||||
|
||||
/**
|
||||
* @param {Node} parentNode
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/selectAllChildren
|
||||
*/
|
||||
Selection.prototype.selectAllChildren;
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/selectionLanguageChange
|
||||
*/
|
||||
Selection.prototype.selectionLanguageChange;
|
||||
|
||||
/**
|
||||
* @type {!NodeList<!Element>}
|
||||
* @see https://developer.mozilla.org/en/DOM/element.children
|
||||
@@ -741,22 +397,6 @@ Element.prototype.children;
|
||||
*/
|
||||
Element.prototype.firebugIgnore;
|
||||
|
||||
/**
|
||||
* Note: According to the spec, id is actually defined on HTMLElement and
|
||||
* SVGElement, rather than Element. Deliberately ignore this so that saying
|
||||
* Element.id is allowed.
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
*/
|
||||
Element.prototype.id;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Parsing/#widl-Element-innerHTML
|
||||
* @implicitCast
|
||||
*/
|
||||
Element.prototype.innerHTML;
|
||||
|
||||
/**
|
||||
* Note: According to the spec, name is defined on specific types of
|
||||
* HTMLElements, rather than on Node, Element, or HTMLElement directly.
|
||||
@@ -775,36 +415,9 @@ Element.prototype.nodePrincipal;
|
||||
*/
|
||||
Element.prototype.style;
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @return {!Element}
|
||||
*/
|
||||
Element.prototype.cloneNode = function(deep) {};
|
||||
|
||||
/** @return {undefined} */
|
||||
Element.prototype.blur = function() {};
|
||||
|
||||
/** @return {undefined} */
|
||||
Element.prototype.click = function() {};
|
||||
|
||||
/** @return {undefined} */
|
||||
Element.prototype.focus = function() {};
|
||||
|
||||
/** @type {number} */
|
||||
HTMLInputElement.prototype.selectionStart;
|
||||
|
||||
/** @type {number} */
|
||||
HTMLInputElement.prototype.selectionEnd;
|
||||
|
||||
/**
|
||||
* @param {number} selectionStart
|
||||
* @param {number} selectionEnd
|
||||
* @see http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#dom-textarea/input-setselectionrange
|
||||
* @return {undefined}
|
||||
*/
|
||||
HTMLInputElement.prototype.setSelectionRange =
|
||||
function(selectionStart, selectionEnd) {};
|
||||
|
||||
/** @type {number} */
|
||||
HTMLTextAreaElement.prototype.selectionStart;
|
||||
|
||||
@@ -820,6 +433,17 @@ HTMLTextAreaElement.prototype.selectionEnd;
|
||||
HTMLTextAreaElement.prototype.setSelectionRange =
|
||||
function(selectionStart, selectionEnd) {};
|
||||
|
||||
/**
|
||||
* @param {string} replacement
|
||||
* @param {number=} start
|
||||
* @param {number=} end
|
||||
* @param {string=} selectionMode
|
||||
* @see https://html.spec.whatwg.org/#dom-textarea/input-setrangetext
|
||||
* @return {undefined}
|
||||
*/
|
||||
HTMLTextAreaElement.prototype.setRangeText =
|
||||
function(replacement, start, end, selectionMode) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://developer.mozilla.org/en/Navigator.buildID
|
||||
@@ -852,7 +476,7 @@ Navigator.prototype.securityPolicy;
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @param {ArrayBufferView|Blob|string|FormData=} opt_data
|
||||
* @param {ArrayBufferView|Blob|string|FormData|URLSearchParams=} opt_data
|
||||
* @return {boolean}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/navigator.sendBeacon
|
||||
*/
|
||||
|
||||
@@ -24,12 +24,11 @@
|
||||
|
||||
// TODO: Almost all of it has not been annotated with types.
|
||||
|
||||
/** @type {number} */ Event.prototype.HORIZONTAL_AXIS;
|
||||
/** @type {number} */ Event.prototype.VERTICAL_AXIS;
|
||||
/** @const {number} */ Event.prototype.HORIZONTAL_AXIS;
|
||||
/** @const {number} */ Event.prototype.VERTICAL_AXIS;
|
||||
/** @type {boolean} */ Event.prototype.altKey;
|
||||
/** @type {number} */ Event.prototype.axis;
|
||||
/** @type {number} */ Event.prototype.button;
|
||||
/** @type {boolean} */ Event.prototype.cancelBubble;
|
||||
/** @type {number} */ Event.prototype.charCode;
|
||||
/** @type {number} */ Event.prototype.clientX;
|
||||
/** @type {number} */ Event.prototype.clientY;
|
||||
@@ -51,12 +50,36 @@
|
||||
/** @type {Window} */ Event.prototype.view;
|
||||
/** @type {number} */ Event.prototype.which;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @deprecated cancelBubble is obsolete and is no-op in modern browsers. Use
|
||||
* stopPropagation() instead.
|
||||
*/
|
||||
Event.prototype.cancelBubble;
|
||||
|
||||
/** @constructor */ function nsIDOMPageTransitionEvent() {}
|
||||
/** @type {boolean} */ nsIDOMPageTransitionEvent.prototype.persisted;
|
||||
|
||||
//Methods
|
||||
Event.prototype.initKeyEvent;
|
||||
Event.prototype.initMouseEvent;
|
||||
/**
|
||||
* @param {string} typeArg
|
||||
* @param {boolean=} canBubbleArg
|
||||
* @param {boolean=} cancelableArg
|
||||
* @param {?Window=} viewArg
|
||||
* @param {?number=} detailArg
|
||||
* @param {number=} screenXArg
|
||||
* @param {number=} screenYArg
|
||||
* @param {number=} clientXArg
|
||||
* @param {number=} clientYArg
|
||||
* @param {boolean=} ctrlKeyArg
|
||||
* @param {boolean=} altKeyArg
|
||||
* @param {boolean=} shiftKeyArg
|
||||
* @param {boolean=} metaKeyArg
|
||||
* @param {?number=} buttonArg
|
||||
* @param {?EventTarget=} relatedTargetArg
|
||||
*/
|
||||
Event.prototype.initMouseEvent = function(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg) {};
|
||||
Event.prototype.initUIEvent;
|
||||
Event.prototype.initMessageEvent;
|
||||
Event.prototype.preventBubble;
|
||||
|
||||
@@ -66,8 +66,8 @@ function DOMParser() {}
|
||||
* var parser = new DOMParser();
|
||||
* var doc = parser.parseFromString(aStr, "text/xml");
|
||||
*
|
||||
* @param {string} src The UTF16 string to be parsed.
|
||||
* @param {!TrustedHTML|string} src The UTF16 string to be parsed.
|
||||
* @param {string} type The content type of the string.
|
||||
* @return {Document}
|
||||
* @return {!Document}
|
||||
*/
|
||||
DOMParser.prototype.parseFromString = function(src, type) {};
|
||||
|
||||
31
javascript/externs/web/google_legacy.js
Normal file
31
javascript/externs/web/google_legacy.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright 2010 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Declaration of the type level google namespace.
|
||||
* @externs
|
||||
* @author nicksantos@google.com (Nick Santos)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Suppresses the compiler warning when multiple externs files declare the
|
||||
* google namespace.
|
||||
* @suppress {duplicate,strictMissingProperties}
|
||||
* NOTE: This definition should be marked \@const, and when it is we can remove
|
||||
* the "strictMissingProperties" suppression.
|
||||
*/
|
||||
// TODO(nicksantos): Consolidate to one google namespace declaration.
|
||||
var google = {};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -252,6 +252,9 @@ CSSProperties.prototype.MsWritingMode;
|
||||
/** @type {string} */
|
||||
CSSProperties.prototype.MsZoom;
|
||||
|
||||
/** @type {string} */
|
||||
CSSProperties.prototype.msUserSelect;
|
||||
|
||||
// See: http://msdn.microsoft.com/en-us/library/windows/apps/Hh702466.aspx
|
||||
|
||||
/** @type {string} */
|
||||
|
||||
@@ -120,14 +120,6 @@ XMLDOMDocument.prototype.abort = function() {};
|
||||
*/
|
||||
XMLDOMDocument.prototype.createNode = function(type, name, namespaceURI) {};
|
||||
|
||||
/**
|
||||
* @param {string} xmlSource
|
||||
* @return {undefined}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms762722(VS.85).aspx
|
||||
* @override
|
||||
*/
|
||||
XMLDOMDocument.prototype.load = function(xmlSource) {};
|
||||
|
||||
/**
|
||||
* @param {string} xmlString
|
||||
* @return {boolean}
|
||||
@@ -179,13 +171,12 @@ Node.prototype.document;
|
||||
* Inserts the given HTML text into the element at the location.
|
||||
* @param {string} sWhere Where to insert the HTML text, one of 'beforeBegin',
|
||||
* 'afterBegin', 'beforeEnd', 'afterEnd'.
|
||||
* @param {string} sText HTML text to insert.
|
||||
* @param {!TrustedHTML|string} sText HTML text to insert.
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536452(VS.85).aspx
|
||||
* @return {undefined}
|
||||
*/
|
||||
Node.prototype.insertAdjacentHTML = function(sWhere, sText) {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms762308(VS.85).aspx
|
||||
@@ -204,12 +195,6 @@ Node.prototype.nodeTypeString;
|
||||
*/
|
||||
Node.prototype.parsed;
|
||||
|
||||
/**
|
||||
* @type {Element}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms534327(VS.85).aspx
|
||||
*/
|
||||
Node.prototype.parentElement;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms753816(VS.85).aspx
|
||||
@@ -300,12 +285,6 @@ ClipboardData.prototype.setData = function(type, data) {};
|
||||
*/
|
||||
ClipboardData.prototype.getData = function(type) { };
|
||||
|
||||
/**
|
||||
* @type {!Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window
|
||||
*/
|
||||
var window;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms535220(VS.85).aspx
|
||||
* @type {ClipboardData}
|
||||
@@ -354,11 +333,13 @@ Window.prototype.offscreenBuffering;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms534389(VS.85).aspx
|
||||
* @type {number|undefined}
|
||||
*/
|
||||
Window.prototype.screenLeft;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms534389(VS.85).aspx
|
||||
* @type {number|undefined}
|
||||
*/
|
||||
Window.prototype.screenTop;
|
||||
|
||||
@@ -388,65 +369,12 @@ Window.prototype.detachEvent;
|
||||
*/
|
||||
Window.prototype.execScript;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536425(VS.85).aspx
|
||||
*/
|
||||
Window.prototype.focus;
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536618(VS.85).aspx
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.moveBy = function(x, y) {};
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536626(VS.85).aspx
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.moveTo = function(x, y) {};
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536638(VS.85).aspx
|
||||
*/
|
||||
Window.prototype.navigate;
|
||||
|
||||
/**
|
||||
* @param {*=} opt_url
|
||||
* @param {string=} opt_windowName
|
||||
* @param {string=} opt_windowFeatures
|
||||
* @param {boolean=} opt_replace
|
||||
* @return {Window}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx
|
||||
*/
|
||||
Window.prototype.open = function(opt_url, opt_windowName, opt_windowFeatures,
|
||||
opt_replace) {};
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536672(VS.85).aspx
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.print = function() {};
|
||||
|
||||
/**
|
||||
* @param {number} width
|
||||
* @param {number} height
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536722(VS.85).aspx
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.resizeBy = function(width, height) {};
|
||||
|
||||
/**
|
||||
* @param {number} width
|
||||
* @param {number} height
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536723(VS.85).aspx
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.resizeTo = function(width, height) {};
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536738(VS.85).aspx
|
||||
*/
|
||||
@@ -469,32 +397,10 @@ Window.prototype.showModelessDialog;
|
||||
Window.prototype.external;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms535864(VS.85).aspx
|
||||
* @param {number|string} delta The number of entries to go back, or
|
||||
* the URL to which to go back. (URL form is supported only in IE)
|
||||
* @return {undefined}
|
||||
* @see https://msdn.microsoft.com/en-us/ie/dn265046(v=vs.94)
|
||||
* @const {!Object}
|
||||
*/
|
||||
History.prototype.go = function(delta) {};
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms535864(VS.85).aspx
|
||||
* @param {number=} opt_distance The number of entries to go back
|
||||
* (Mozilla doesn't support distance -- use #go instead)
|
||||
* @return {undefined}
|
||||
*/
|
||||
History.prototype.back = function(opt_distance) {};
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms535864(VS.85).aspx
|
||||
* @type {number}
|
||||
*/
|
||||
History.prototype.length;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms535864(VS.85).aspx
|
||||
* @return {undefined}
|
||||
*/
|
||||
History.prototype.forward = function() {};
|
||||
Window.prototype.msCrypto;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
@@ -516,12 +422,6 @@ HTMLFrameElement.prototype.contentWindow;
|
||||
*/
|
||||
HTMLIFrameElement.prototype.allowTransparency;
|
||||
|
||||
/**
|
||||
* @type {Window}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533692(VS.85).aspx
|
||||
*/
|
||||
HTMLIFrameElement.prototype.contentWindow;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536385(VS.85).aspx
|
||||
*/
|
||||
@@ -761,24 +661,6 @@ TextRange.prototype.select = function() {};
|
||||
*/
|
||||
TextRange.prototype.setEndPoint;
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536418(VS.85).aspx
|
||||
*/
|
||||
Selection.prototype.clear = function() {};
|
||||
|
||||
/**
|
||||
* @return {TextRange|ControlRange}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536394(VS.85).aspx
|
||||
*/
|
||||
Selection.prototype.createRange = function() {};
|
||||
|
||||
/**
|
||||
* @return {Array<TextRange>}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536396(VS.85).aspx
|
||||
*/
|
||||
Selection.prototype.createRangeCollection = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms537447(VS.85).aspx
|
||||
@@ -791,11 +673,6 @@ Document.prototype.loadXML;
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ms531073(VS.85).aspx
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533065(VS.85).aspx
|
||||
*/
|
||||
Document.prototype.activeElement;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533553(VS.85).aspx
|
||||
*/
|
||||
@@ -806,11 +683,6 @@ Document.prototype.charset;
|
||||
*/
|
||||
Document.prototype.cookie;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533714(VS.85).aspx
|
||||
*/
|
||||
Document.prototype.defaultCharset;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533731(VS.85).aspx
|
||||
*/
|
||||
@@ -843,6 +715,7 @@ Document.prototype.fileSize;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms534331(VS.85).aspx
|
||||
* @type {?Window}
|
||||
*/
|
||||
Document.prototype.parentWindow;
|
||||
|
||||
@@ -857,12 +730,6 @@ Document.prototype.protocol;
|
||||
*/
|
||||
HTMLDocument.prototype.readyState;
|
||||
|
||||
/**
|
||||
* @type {Selection}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx
|
||||
*/
|
||||
Document.prototype.selection;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms534704(VS.85).aspx
|
||||
*/
|
||||
@@ -914,12 +781,6 @@ Document.prototype.detachEvent;
|
||||
*/
|
||||
Document.prototype.focus;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536447(VS.85).aspx
|
||||
* @return {boolean}
|
||||
*/
|
||||
Document.prototype.hasFocus = function() {};
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536614(VS.85).aspx
|
||||
*/
|
||||
@@ -965,6 +826,7 @@ Document.prototype.namespaces;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms537487(VS.85).aspx
|
||||
* @type {!HTMLCollection<!HTMLScriptElement>}
|
||||
*/
|
||||
Document.prototype.scripts;
|
||||
|
||||
@@ -1008,7 +870,8 @@ Element.prototype.componentFromPoint = function(iCoordX, iCoordY) {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* TODO(tjgq): Make this string once existing usages have been migrated.
|
||||
* @type {string|boolean}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533690(VS.85).aspx
|
||||
*/
|
||||
Element.prototype.contentEditable;
|
||||
@@ -1051,11 +914,18 @@ Element.prototype.fireEvent;
|
||||
Element.prototype.hideFocus;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
*
|
||||
* TODO(lharker): remove the @implicitCast to enforce assigning an explicit
|
||||
* string to innerText instead of relying on coercion.
|
||||
*
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533899.aspx
|
||||
*/
|
||||
Element.prototype.innerText;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms537838(VS.85).aspx
|
||||
*/
|
||||
Element.prototype.isContentEditable;
|
||||
@@ -1098,18 +968,6 @@ Element.prototype.onmouseenter;
|
||||
*/
|
||||
Element.prototype.onmouseleave;
|
||||
|
||||
/**
|
||||
* @type {?function(Event)}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536969(VS.85).aspx
|
||||
*/
|
||||
Element.prototype.onselectstart;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://msdn.microsoft.com/en-us/library/aa752326(VS.85).aspx
|
||||
*/
|
||||
Element.prototype.outerHTML;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536689(VS.85).aspx
|
||||
* @return {undefined}
|
||||
@@ -1211,94 +1069,6 @@ function AlphaImageLoaderFilter() {}
|
||||
*/
|
||||
AlphaImageLoaderFilter.prototype.sizingMethod;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms535866(VS.85).aspx
|
||||
*/
|
||||
function Location() {}
|
||||
|
||||
/**
|
||||
* @see http://trac.webkit.org/changeset/113945
|
||||
* @type {DOMStringList}
|
||||
*/
|
||||
Location.prototype.ancestorOrigins;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533775(VS.85).aspx
|
||||
* @type {string}
|
||||
*/
|
||||
Location.prototype.hash;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533784(VS.85).aspx
|
||||
* @type {string}
|
||||
*/
|
||||
Location.prototype.host;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533785(VS.85).aspx
|
||||
* @type {string}
|
||||
*/
|
||||
Location.prototype.hostname;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms533867(VS.85).aspx
|
||||
* @type {string}
|
||||
*/
|
||||
Location.prototype.href;
|
||||
|
||||
/**
|
||||
* @see https://docs.google.com/document/view?id=1r_VTFKApVOaNIkocrg0z-t7lZgzisTuGTXkdzAk4gLU&hl=en
|
||||
* @type {string}
|
||||
*/
|
||||
Location.prototype.origin;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms534332(VS.85).aspx
|
||||
* @type {string}
|
||||
*/
|
||||
Location.prototype.pathname;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms534342(VS.85).aspx
|
||||
*/
|
||||
Location.prototype.port;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms534353(VS.85).aspx
|
||||
* @type {string}
|
||||
*/
|
||||
Location.prototype.protocol;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms534620(VS.85).aspx
|
||||
* @type {string}
|
||||
*/
|
||||
Location.prototype.search;
|
||||
|
||||
/**
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536342(VS.85).aspx
|
||||
* @param {string} url
|
||||
* @return {undefined}
|
||||
*/
|
||||
Location.prototype.assign = function(url) {};
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_forceReload If true, reloads the page from
|
||||
* the server. Defaults to false.
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536691(VS.85).aspx
|
||||
* @return {undefined}
|
||||
*/
|
||||
Location.prototype.reload = function(opt_forceReload) {};
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536712(VS.85).aspx
|
||||
* @return {undefined}
|
||||
*/
|
||||
Location.prototype.replace = function(url) {};
|
||||
|
||||
|
||||
// For IE, returns an object representing key-value pairs for all the global
|
||||
// variables prefixed with str, e.g. test*
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ Event.prototype.propertyName;
|
||||
/** @type {string} */
|
||||
Event.prototype.qualifier;
|
||||
|
||||
/** @type {number} */
|
||||
/** @type {?} */
|
||||
Event.prototype.reason;
|
||||
|
||||
/** @type {Object<*>} */
|
||||
@@ -135,13 +135,13 @@ MSPointerPoint.prototype.pointerType;
|
||||
*/
|
||||
function MSPointerEvent() {}
|
||||
|
||||
/** @type {number} */
|
||||
/** @const {number} */
|
||||
MSPointerEvent.MSPOINTER_TYPE_MOUSE;
|
||||
|
||||
/** @type {number} */
|
||||
/** @const {number} */
|
||||
MSPointerEvent.MSPOINTER_TYPE_PEN;
|
||||
|
||||
/** @type {number} */
|
||||
/** @const {number} */
|
||||
MSPointerEvent.MSPOINTER_TYPE_TOUCH;
|
||||
|
||||
/** @type {number} */
|
||||
|
||||
178
javascript/externs/web/intersection_observer.js
Normal file
178
javascript/externs/web/intersection_observer.js
Normal file
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* Copyright 2016 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Externs for Intersection Observer objects.
|
||||
* @see https://w3c.github.io/IntersectionObserver/
|
||||
* @externs
|
||||
*/
|
||||
|
||||
// TODO(user): Once the Intersection Observer spec is adopted by W3C, add
|
||||
// a w3c_ prefix to this file's name.
|
||||
|
||||
|
||||
/**
|
||||
* These contain the information provided from a change event.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#intersection-observer-entry
|
||||
* @record
|
||||
*/
|
||||
function IntersectionObserverEntry() {}
|
||||
|
||||
/**
|
||||
* The time the change was observed.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserverentry-time
|
||||
* @const {number}
|
||||
*/
|
||||
IntersectionObserverEntry.prototype.time;
|
||||
|
||||
/**
|
||||
* The root intersection rectangle, if target belongs to the same unit of
|
||||
* related similar-origin browsing contexts as the intersection root, null
|
||||
* otherwise.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserverentry-rootbounds
|
||||
* @const {{top: number, right: number, bottom: number, left: number,
|
||||
* height: number, width: number}}
|
||||
*/
|
||||
IntersectionObserverEntry.prototype.rootBounds;
|
||||
|
||||
/**
|
||||
* The rectangle describing the element being observed.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserverentry-boundingclientrect
|
||||
* @const {!{top: number, right: number, bottom: number, left: number,
|
||||
* height: number, width: number}}
|
||||
*/
|
||||
IntersectionObserverEntry.prototype.boundingClientRect;
|
||||
|
||||
/**
|
||||
* The rectangle describing the intersection between the observed element and
|
||||
* the viewport.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserverentry-intersectionrect
|
||||
* @const {!{top: number, right: number, bottom: number, left: number,
|
||||
* height: number, width: number}}
|
||||
*/
|
||||
IntersectionObserverEntry.prototype.intersectionRect;
|
||||
|
||||
/**
|
||||
* Ratio of intersectionRect area to boundingClientRect area.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserverentry-intersectionratio
|
||||
* @const {number}
|
||||
*/
|
||||
IntersectionObserverEntry.prototype.intersectionRatio;
|
||||
|
||||
/**
|
||||
* The Element whose intersection with the intersection root changed.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserverentry-target
|
||||
* @const {!Element}
|
||||
*/
|
||||
IntersectionObserverEntry.prototype.target;
|
||||
|
||||
/**
|
||||
* Whether or not the target is intersecting with the root.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserverentry-isintersecting
|
||||
* @const {boolean}
|
||||
*/
|
||||
IntersectionObserverEntry.prototype.isIntersecting;
|
||||
|
||||
/**
|
||||
* Whether or not the target is visible with the root.
|
||||
* @see https://w3c.github.io/IntersectionObserver/v2/#dom-intersectionobserverentry-isvisible
|
||||
* @const {boolean|undefined}
|
||||
*/
|
||||
IntersectionObserverEntry.prototype.isVisible;
|
||||
|
||||
/**
|
||||
* Callback for the IntersectionObserver.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#intersection-observer-callback
|
||||
* @typedef {function(!Array<!IntersectionObserverEntry>,!IntersectionObserver)}
|
||||
*/
|
||||
var IntersectionObserverCallback;
|
||||
|
||||
/**
|
||||
* Options for the IntersectionObserver.
|
||||
* @see https://w3c.github.io/IntersectionObserver/v2/#intersection-observer-init
|
||||
* @typedef {{
|
||||
* threshold: (!Array<number>|number|undefined),
|
||||
* delay: (number|undefined),
|
||||
* trackVisibility: (boolean|undefined),
|
||||
* root: (?Element|undefined),
|
||||
* rootMargin: (string|undefined)
|
||||
* }}
|
||||
*/
|
||||
var IntersectionObserverInit;
|
||||
|
||||
/**
|
||||
* This is the constructor for Intersection Observer objects.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
|
||||
* @param {!IntersectionObserverCallback} handler The callback for the observer.
|
||||
* @param {!IntersectionObserverInit=} opt_options The object defining the
|
||||
* thresholds, etc.
|
||||
* @constructor
|
||||
*/
|
||||
function IntersectionObserver(handler, opt_options) {};
|
||||
|
||||
/**
|
||||
* The root Element to use for intersection, or null if the observer uses the
|
||||
* implicit root.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-root
|
||||
* @const {?Element}
|
||||
*/
|
||||
IntersectionObserver.prototype.root;
|
||||
|
||||
/**
|
||||
* Offsets applied to the intersection root’s bounding box, effectively growing
|
||||
* or shrinking the box that is used to calculate intersections.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-rootmargin
|
||||
* @const {string}
|
||||
*/
|
||||
IntersectionObserver.prototype.rootMargin;
|
||||
|
||||
/**
|
||||
* A list of thresholds, sorted in increasing numeric order, where each
|
||||
* threshold is a ratio of intersection area to bounding box area of an observed
|
||||
* target.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-thresholds
|
||||
* @const {!Array<number>}
|
||||
*/
|
||||
IntersectionObserver.prototype.thresholds;
|
||||
|
||||
/**
|
||||
* This is used to set which element to observe.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-observe
|
||||
* @param {!Element} element The element to observe.
|
||||
* @return {undefined}
|
||||
*/
|
||||
IntersectionObserver.prototype.observe = function(element) {};
|
||||
|
||||
/**
|
||||
* This is used to stop observing a given element.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-unobserve
|
||||
* @param {!Element} element The elmenent to stop observing.
|
||||
* @return {undefined}
|
||||
*/
|
||||
IntersectionObserver.prototype.unobserve = function(element) {};
|
||||
|
||||
/**
|
||||
* Disconnect.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-disconnect
|
||||
*/
|
||||
IntersectionObserver.prototype.disconnect = function() {};
|
||||
|
||||
/**
|
||||
* Take records.
|
||||
* @see https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-takerecords
|
||||
* @return {!Array.<!IntersectionObserverEntry>}
|
||||
*/
|
||||
IntersectionObserver.prototype.takeRecords = function() {};
|
||||
@@ -1,167 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for the JS Internationalization API as defined in
|
||||
* http://www.ecma-international.org/ecma-402/1.0/
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/** @const */
|
||||
var Intl = {};
|
||||
|
||||
/**
|
||||
* NOTE: this API is not from ecma402 and is subject to change.
|
||||
* @param {string|Array<string>=} opt_locales
|
||||
* @param {{type: (string|undefined)}=}
|
||||
* opt_options
|
||||
* @constructor
|
||||
*/
|
||||
Intl.v8BreakIterator = function(opt_locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {string} text
|
||||
* @return {undefined}
|
||||
*/
|
||||
Intl.v8BreakIterator.prototype.adoptText = function(text) {};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
Intl.v8BreakIterator.prototype.breakType = function() {};
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
Intl.v8BreakIterator.prototype.current = function() {};
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
Intl.v8BreakIterator.prototype.first = function() {};
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
Intl.v8BreakIterator.prototype.next = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string|Array<string>=} opt_locales
|
||||
* @param {{usage: (string|undefined), localeMatcher: (string|undefined),
|
||||
* sensitivity: (string|undefined), ignorePunctuation: (boolean|undefined),
|
||||
* numeric: (boolean|undefined), caseFirst: (string|undefined)}=}
|
||||
* opt_options
|
||||
*/
|
||||
Intl.Collator = function(opt_locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {Array<string>} locales
|
||||
* @param {{localeMatcher: (string|undefined)}=} opt_options
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
Intl.Collator.supportedLocalesOf = function(locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {string} arg1
|
||||
* @param {string} arg2
|
||||
* @return {number}
|
||||
*/
|
||||
Intl.Collator.prototype.compare = function(arg1, arg2) {};
|
||||
|
||||
/**
|
||||
* @return {{locale: string, usage: string, sensitivity: string,
|
||||
* ignorePunctuation: boolean, collation: string, numeric: boolean,
|
||||
* caseFirst: string}}
|
||||
*/
|
||||
Intl.Collator.prototype.resolvedOptions = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string|Array<string>=} opt_locales
|
||||
* @param {{localeMatcher: (string|undefined), useGrouping: (boolean|undefined),
|
||||
* numberingSystem: (string|undefined), style: (string|undefined),
|
||||
* currency: (string|undefined), currencyDisplay: (string|undefined),
|
||||
* minimumIntegerDigits: (number|undefined),
|
||||
* minimumFractionDigits: (number|undefined),
|
||||
* maximumFractionDigits: (number|undefined),
|
||||
* minimumSignificantDigits: (number|undefined),
|
||||
* maximumSignificantDigits: (number|undefined)}=}
|
||||
* opt_options
|
||||
*/
|
||||
Intl.NumberFormat = function(opt_locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {Array<string>} locales
|
||||
* @param {{localeMatcher: (string|undefined)}=} opt_options
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
Intl.NumberFormat.supportedLocalesOf = function(locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {number} num
|
||||
* @return {string}
|
||||
*/
|
||||
Intl.NumberFormat.prototype.format = function(num) {};
|
||||
|
||||
/**
|
||||
* @return {{locale: string, numberingSystem: string, style: string,
|
||||
* currency: (string|undefined), currencyDisplay: (string|undefined),
|
||||
* minimumIntegerDigits: number, minimumFractionDigits: number,
|
||||
* maximumFractionDigits: number, minimumSignificantDigits: number,
|
||||
* maximumSignificantDigits: number, useGrouping: boolean}}
|
||||
*/
|
||||
Intl.NumberFormat.prototype.resolvedOptions = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string|Array<string>=} opt_locales
|
||||
* @param {{localeMatcher: (string|undefined),
|
||||
* formatMatcher: (string|undefined), calendar: (string|undefined),
|
||||
* numberingSystem: (string|undefined), tz: (string|undefined),
|
||||
* weekday: (string|undefined), era: (string|undefined),
|
||||
* year: (string|undefined), month: (string|undefined),
|
||||
* day: (string|undefined), hour: (string|undefined),
|
||||
* minute: (string|undefined), second: (string|undefined),
|
||||
* timeZoneName: (string|undefined), hour12: (boolean|undefined)}=}
|
||||
* opt_options
|
||||
*/
|
||||
Intl.DateTimeFormat = function(opt_locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {Array<string>} locales
|
||||
* @param {{localeMatcher: string}=} opt_options
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
Intl.DateTimeFormat.supportedLocalesOf = function(locales, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {(!Date|number)=} date
|
||||
* @return {string}
|
||||
*/
|
||||
Intl.DateTimeFormat.prototype.format = function(date) {};
|
||||
|
||||
/**
|
||||
* @return {{locale: string, calendar: string, numberingSystem: string,
|
||||
* timeZone: (string|undefined), weekday: (string|undefined),
|
||||
* era: (string|undefined), year: (string|undefined),
|
||||
* month: (string|undefined), day: (string|undefined),
|
||||
* hour: (string|undefined), minute: (string|undefined),
|
||||
* second: (string|undefined), timeZoneName: (string|undefined),
|
||||
* hour12: (boolean|undefined)}}
|
||||
*/
|
||||
Intl.DateTimeFormat.prototype.resolvedOptions = function() {};
|
||||
305
javascript/externs/web/mediakeys.js
Normal file
305
javascript/externs/web/mediakeys.js
Normal file
@@ -0,0 +1,305 @@
|
||||
/*
|
||||
* Copyright 2015 The Closure Compiler authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
/**
|
||||
* @fileoverview MediaKey externs.
|
||||
* Based on {@link https://w3c.github.io/encrypted-media/ EME draft 5 December
|
||||
* 2019}.
|
||||
* @externs
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* contentType: string,
|
||||
* encryptionScheme: (?string|undefined),
|
||||
* robustness: (string|undefined)
|
||||
* }}
|
||||
* @see https://w3c.github.io/encrypted-media/#mediakeysystemmediacapability-dictionary
|
||||
*/
|
||||
var MediaKeySystemMediaCapability;
|
||||
|
||||
|
||||
/** @typedef {{
|
||||
* label: (string|undefined),
|
||||
* initDataTypes: (!Array<string>|undefined),
|
||||
* audioCapabilities: (!Array<!MediaKeySystemMediaCapability>|undefined),
|
||||
* videoCapabilities: (!Array<!MediaKeySystemMediaCapability>|undefined),
|
||||
* distinctiveIdentifier: (string|undefined),
|
||||
* persistentState: (string|undefined),
|
||||
* sessionTypes: (!Array<string>|undefined)
|
||||
* }}
|
||||
* @see https://w3c.github.io/encrypted-media/#mediakeysystemconfiguration-dictionary
|
||||
*/
|
||||
var MediaKeySystemConfiguration;
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} keySystem
|
||||
* @param {!Array<!MediaKeySystemConfiguration>} supportedConfigurations
|
||||
* @return {!Promise<!MediaKeySystemAccess>}
|
||||
* @see https://w3c.github.io/encrypted-media/#navigator-extension-requestmediakeysystemaccess
|
||||
*/
|
||||
Navigator.prototype.requestMediaKeySystemAccess =
|
||||
function(keySystem, supportedConfigurations) {};
|
||||
|
||||
|
||||
/** @const {MediaKeys} */
|
||||
HTMLMediaElement.prototype.mediaKeys;
|
||||
|
||||
|
||||
/**
|
||||
* @param {MediaKeys} mediaKeys
|
||||
* @return {!Promise}
|
||||
* @see https://w3c.github.io/encrypted-media/#dom-htmlmediaelement-setmediakeys
|
||||
*/
|
||||
HTMLMediaElement.prototype.setMediaKeys = function(mediaKeys) {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @see https://w3c.github.io/encrypted-media/#mediakeysystemaccess-interface
|
||||
*/
|
||||
function MediaKeySystemAccess() {}
|
||||
|
||||
|
||||
/** @return {!Promise<!MediaKeys>} */
|
||||
MediaKeySystemAccess.prototype.createMediaKeys = function() {};
|
||||
|
||||
|
||||
/** @return {!MediaKeySystemConfiguration} */
|
||||
MediaKeySystemAccess.prototype.getConfiguration = function() {};
|
||||
|
||||
|
||||
/** @const {string} */
|
||||
MediaKeySystemAccess.prototype.keySystem;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @see https://w3c.github.io/encrypted-media/#mediakeys-interface
|
||||
*/
|
||||
function MediaKeys() {}
|
||||
|
||||
|
||||
/**
|
||||
* @param {string=} opt_sessionType defaults to "temporary"
|
||||
* @return {!MediaKeySession}
|
||||
* @throws {TypeError} if opt_sessionType is invalid.
|
||||
*/
|
||||
MediaKeys.prototype.createSession = function(opt_sessionType) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!BufferSource} serverCertificate
|
||||
* @return {!Promise}
|
||||
*/
|
||||
MediaKeys.prototype.setServerCertificate = function(serverCertificate) {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @see https://w3c.github.io/encrypted-media/#mediakeystatusmap-interface
|
||||
*/
|
||||
function MediaKeyStatusMap() {}
|
||||
|
||||
|
||||
/** @const {number} */
|
||||
MediaKeyStatusMap.prototype.size;
|
||||
|
||||
|
||||
/**
|
||||
* Array entry 0 is the key, 1 is the value.
|
||||
* @return {!Iterator<!Array<!BufferSource|string>>}
|
||||
*/
|
||||
MediaKeyStatusMap.prototype.entries = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* The function is called with each value.
|
||||
* @param {function(string, !BufferSource)} callback A callback function to run for
|
||||
* each media key. The first parameter is the key status; the second
|
||||
* parameter is the key ID.
|
||||
* @return {undefined}
|
||||
*/
|
||||
MediaKeyStatusMap.prototype.forEach = function(callback) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!BufferSource} keyId
|
||||
* @return {string|undefined}
|
||||
*/
|
||||
MediaKeyStatusMap.prototype.get = function(keyId) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!BufferSource} keyId
|
||||
* @return {boolean}
|
||||
*/
|
||||
MediaKeyStatusMap.prototype.has = function(keyId) {};
|
||||
|
||||
|
||||
/**
|
||||
* @return {!Iterator<!BufferSource>}
|
||||
*/
|
||||
MediaKeyStatusMap.prototype.keys = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @return {!Iterator<string>}
|
||||
*/
|
||||
MediaKeyStatusMap.prototype.values = function() {};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {EventTarget}
|
||||
* @see https://w3c.github.io/encrypted-media/#mediakeysession-interface
|
||||
*/
|
||||
function MediaKeySession() {}
|
||||
|
||||
|
||||
/** @const {string} */
|
||||
MediaKeySession.prototype.sessionId;
|
||||
|
||||
|
||||
/** @const {number} */
|
||||
MediaKeySession.prototype.expiration;
|
||||
|
||||
|
||||
/** @const {!Promise} */
|
||||
MediaKeySession.prototype.closed;
|
||||
|
||||
|
||||
/** @const {!MediaKeyStatusMap} */
|
||||
MediaKeySession.prototype.keyStatuses;
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} initDataType
|
||||
* @param {!BufferSource} initData
|
||||
* @return {!Promise}
|
||||
*/
|
||||
MediaKeySession.prototype.generateRequest = function(initDataType, initData) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} sessionId
|
||||
* @return {!Promise<boolean>}}
|
||||
*/
|
||||
MediaKeySession.prototype.load = function(sessionId) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!BufferSource} response
|
||||
* @return {!Promise}
|
||||
*/
|
||||
MediaKeySession.prototype.update = function(response) {};
|
||||
|
||||
|
||||
/** @return {!Promise} */
|
||||
MediaKeySession.prototype.close = function() {};
|
||||
|
||||
|
||||
/** @return {!Promise} */
|
||||
MediaKeySession.prototype.remove = function() {};
|
||||
|
||||
|
||||
/** @override */
|
||||
MediaKeySession.prototype.addEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
|
||||
/** @override */
|
||||
MediaKeySession.prototype.removeEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
|
||||
/** @override */
|
||||
MediaKeySession.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {EventInit}
|
||||
* @see https://w3c.github.io/encrypted-media/#dom-mediakeymessageeventinit
|
||||
*/
|
||||
function MediaKeyMessageEventInit() {};
|
||||
|
||||
/** @type {string} */
|
||||
MediaKeyMessageEventInit.prototype.messageType;
|
||||
|
||||
/** @type {!ArrayBuffer} */
|
||||
MediaKeyMessageEventInit.prototype.message;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} type
|
||||
* @param {MediaKeyMessageEventInit} eventInitDict
|
||||
* @extends {Event}
|
||||
* @see https://w3c.github.io/encrypted-media/#mediakeymessageevent
|
||||
*/
|
||||
function MediaKeyMessageEvent(type, eventInitDict) {}
|
||||
|
||||
|
||||
/** @const {string} */
|
||||
MediaKeyMessageEvent.prototype.messageType;
|
||||
|
||||
|
||||
/** @const {!ArrayBuffer} */
|
||||
MediaKeyMessageEvent.prototype.message;
|
||||
|
||||
|
||||
/** @const {!MediaKeySession} */
|
||||
MediaKeyMessageEvent.prototype.target;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {EventInit}
|
||||
* @see https://w3c.github.io/encrypted-media/#dom-mediaencryptedeventinit
|
||||
*/
|
||||
function MediaEncryptedEventInit() {};
|
||||
|
||||
/** @type {(string | undefined)} */
|
||||
MediaEncryptedEventInit.prototype.initDataType;
|
||||
|
||||
/** @type {(ArrayBuffer | undefined)} */
|
||||
MediaEncryptedEventInit.prototype.initData;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} type
|
||||
* @param {MediaEncryptedEventInit=} opt_eventInitDict
|
||||
* @extends {Event}
|
||||
* @see https://w3c.github.io/encrypted-media/#mediaencryptedevent
|
||||
*/
|
||||
function MediaEncryptedEvent(type, opt_eventInitDict) {}
|
||||
|
||||
|
||||
/** @const {string} */
|
||||
MediaEncryptedEvent.prototype.initDataType;
|
||||
|
||||
|
||||
/** @const {ArrayBuffer} */
|
||||
MediaEncryptedEvent.prototype.initData;
|
||||
|
||||
|
||||
/** @const {!HTMLMediaElement} */
|
||||
MediaEncryptedEvent.prototype.target;
|
||||
|
||||
@@ -27,26 +27,15 @@
|
||||
*/
|
||||
function MediaSource() {}
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_useCapture
|
||||
* @override
|
||||
* @return {undefined}
|
||||
*/
|
||||
MediaSource.prototype.addEventListener = function(
|
||||
type, listener, opt_useCapture) {};
|
||||
/** @override */
|
||||
MediaSource.prototype.addEventListener = function(type, listener, opt_options) {
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_useCapture
|
||||
* @override
|
||||
* @return {undefined}
|
||||
*/
|
||||
/** @override */
|
||||
MediaSource.prototype.removeEventListener = function(
|
||||
type, listener, opt_useCapture) {};
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @return {boolean}
|
||||
*/
|
||||
/** @override */
|
||||
MediaSource.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
/** @type {Array<SourceBuffer>} */
|
||||
@@ -105,26 +94,15 @@ MediaSource.isTypeSupported = function(type) {};
|
||||
*/
|
||||
function SourceBuffer() {}
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_useCapture
|
||||
* @override
|
||||
* @return {undefined}
|
||||
*/
|
||||
/** @override */
|
||||
SourceBuffer.prototype.addEventListener = function(
|
||||
type, listener, opt_useCapture) {};
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_useCapture
|
||||
* @override
|
||||
* @return {undefined}
|
||||
*/
|
||||
/** @override */
|
||||
SourceBuffer.prototype.removeEventListener = function(
|
||||
type, listener, opt_useCapture) {};
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @return {boolean}
|
||||
*/
|
||||
/** @override */
|
||||
SourceBuffer.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
/** @type {string} */
|
||||
@@ -169,3 +147,9 @@ SourceBuffer.prototype.abort = function() {};
|
||||
* @return {undefined}
|
||||
*/
|
||||
SourceBuffer.prototype.remove = function(start, end) {};
|
||||
|
||||
/**
|
||||
* @param {string} type
|
||||
* @return {undefined}
|
||||
*/
|
||||
SourceBuffer.prototype.changeType = function(type) {};
|
||||
|
||||
97
javascript/externs/web/nonstandard_anim_timing.js
Normal file
97
javascript/externs/web/nonstandard_anim_timing.js
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright 2011 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
/**
|
||||
* @fileoverview Nonstandard definitions for timing control for script base animations.
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {!FrameRequestCallback} callback
|
||||
* @param {Element=} opt_element
|
||||
* @return {number}
|
||||
*/
|
||||
function webkitRequestAnimationFrame(callback, opt_element) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function webkitCancelRequestAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function webkitCancelAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {?FrameRequestCallback} callback It's legitimate to pass a null
|
||||
* callback and listen on the MozBeforePaint event instead.
|
||||
* @param {Element=} opt_element
|
||||
* @return {number}
|
||||
*/
|
||||
function mozRequestAnimationFrame(callback, opt_element) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function mozCancelRequestAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function mozCancelAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {!FrameRequestCallback} callback
|
||||
* @param {Element=} opt_element
|
||||
* @return {number}
|
||||
*/
|
||||
function msRequestAnimationFrame(callback, opt_element) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function msCancelRequestAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function msCancelAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {!FrameRequestCallback} callback
|
||||
* @param {Element=} opt_element
|
||||
* @return {number}
|
||||
*/
|
||||
function oRequestAnimationFrame(callback, opt_element) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function oCancelRequestAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function oCancelAnimationFrame(handle) {};
|
||||
82
javascript/externs/web/nonstandard_audio.js
Normal file
82
javascript/externs/web/nonstandard_audio.js
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Nonstandard definitions for the API related to audio.
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* Definitions for the Web Audio API with webkit prefix.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {AudioContext}
|
||||
*/
|
||||
function webkitAudioContext() {}
|
||||
|
||||
/**
|
||||
* @param {number} numberOfChannels
|
||||
* @param {number} length
|
||||
* @param {number} sampleRate
|
||||
* @constructor
|
||||
* @extends {OfflineAudioContext}
|
||||
*/
|
||||
function webkitOfflineAudioContext(numberOfChannels, length, sampleRate) {}
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {AudioPannerNode}
|
||||
*/
|
||||
function webkitAudioPannerNode() {}
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {PannerNode}
|
||||
*/
|
||||
function webkitPannerNode() {}
|
||||
|
||||
/**
|
||||
* Definitions for the Audio API as implemented in Firefox.
|
||||
* Please note that this document describes a non-standard experimental API.
|
||||
* This API is considered deprecated.
|
||||
* @see https://developer.mozilla.org/en/DOM/HTMLAudioElement
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {string=} src
|
||||
* @constructor
|
||||
* @extends {HTMLAudioElement}
|
||||
*/
|
||||
function Audio(src) {}
|
||||
|
||||
/**
|
||||
* @param {number} channels
|
||||
* @param {number} rate
|
||||
*/
|
||||
Audio.prototype.mozSetup = function(channels, rate) {};
|
||||
|
||||
/**
|
||||
* @param {Array|Float32Array} buffer
|
||||
*/
|
||||
Audio.prototype.mozWriteAudio = function(buffer) {};
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
Audio.prototype.mozCurrentSampleOffset = function() {};
|
||||
66
javascript/externs/web/nonstandard_console.js
Normal file
66
javascript/externs/web/nonstandard_console.js
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2019 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for console debugging facilities implemented in
|
||||
* various browsers but not part of https://console.spec.whatwg.org/.
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see https://cs.chromium.org/search/?q=%22interface+MemoryInfo%22+file:idl+file:WebKit+package:chromium&type=cs
|
||||
*/
|
||||
function MemoryInfo() {};
|
||||
|
||||
/** @type {number} */
|
||||
MemoryInfo.prototype.totalJSHeapSize;
|
||||
|
||||
/** @type {number} */
|
||||
MemoryInfo.prototype.usedJSHeapSize;
|
||||
|
||||
/** @type {number} */
|
||||
MemoryInfo.prototype.jsHeapSizeLimit;
|
||||
|
||||
/**
|
||||
* @param {*} value
|
||||
* @return {undefined}
|
||||
*/
|
||||
Console.prototype.markTimeline = function(value) {};
|
||||
|
||||
/**
|
||||
* @param {string=} title
|
||||
* @return {undefined}
|
||||
*/
|
||||
Console.prototype.profile = function(title) {};
|
||||
|
||||
/** @type {Array<ScriptProfile>} */
|
||||
Console.prototype.profiles;
|
||||
|
||||
/**
|
||||
* @param {string=} title
|
||||
* @return {undefined}
|
||||
*/
|
||||
Console.prototype.profileEnd = function(title) {};
|
||||
|
||||
/**
|
||||
* @param {*} value
|
||||
* @return {undefined}
|
||||
*/
|
||||
Console.prototype.timeStamp = function(value) {};
|
||||
|
||||
/** @type {MemoryInfo} */
|
||||
Console.prototype.memory;
|
||||
File diff suppressed because it is too large
Load Diff
78
javascript/externs/web/nonstandard_indexeddb.js
Normal file
78
javascript/externs/web/nonstandard_indexeddb.js
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Copyright 2011 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Browser specific definitions for W3C's IndexedDB API
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/** @type {!IDBFactory|undefined} */
|
||||
Window.prototype.moz_indexedDB;
|
||||
|
||||
/** @type {!IDBFactory|undefined} */
|
||||
Window.prototype.mozIndexedDB;
|
||||
|
||||
/** @type {!IDBFactory|undefined} */
|
||||
Window.prototype.webkitIndexedDB;
|
||||
|
||||
/** @type {!IDBFactory|undefined} */
|
||||
Window.prototype.msIndexedDB;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {IDBRequest}
|
||||
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBRequest
|
||||
* @see https://www.w3.org/TR/IndexedDB-2/#request-api
|
||||
*/
|
||||
function webkitIDBRequest() {}
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {IDBCursor}
|
||||
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBCursor
|
||||
* @see https://www.w3.org/TR/IndexedDB-2/#cursor-interface
|
||||
*/
|
||||
function webkitIDBCursor() {}
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {IDBTransaction}
|
||||
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBTransaction
|
||||
* @see https://www.w3.org/TR/IndexedDB-2/#transaction
|
||||
*/
|
||||
function webkitIDBTransaction() {}
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {IDBKeyRange}
|
||||
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBKeyRange
|
||||
* @see https://www.w3.org/TR/IndexedDB-2/#keyrange
|
||||
*/
|
||||
function webkitIDBKeyRange() {}
|
||||
|
||||
/**
|
||||
* @param {string} type
|
||||
* @param {!IDBVersionChangeEventInit=} eventInit
|
||||
* @constructor
|
||||
* @extends {IDBVersionChangeEvent}
|
||||
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBVersionChangeEvent
|
||||
*/
|
||||
function webkitIDBVersionChangeEvent(type, eventInit) {}
|
||||
|
||||
/**
|
||||
* @const {string}
|
||||
*/
|
||||
webkitIDBVersionChangeEvent.prototype.version;
|
||||
38
javascript/externs/web/nonstandard_navigation_timing.js
Normal file
38
javascript/externs/web/nonstandard_navigation_timing.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2011 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Nonstandard Definitions for W3C's Navigation Timing
|
||||
* specification.
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
// Nonstandard. Only available in Blink.
|
||||
// Returns more granular results with the --enable-memory-info flag.
|
||||
/** @type {MemoryInfo} */ Performance.prototype.memory;
|
||||
|
||||
/**
|
||||
* Clear out the buffer of performance timing events for webkit browsers.
|
||||
* @return {undefined}
|
||||
*/
|
||||
Performance.prototype.webkitClearResourceTimings = function() {};
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Performance.prototype.webkitNow = function() {};
|
||||
44
javascript/externs/web/nonstandard_rtc.js
Normal file
44
javascript/externs/web/nonstandard_rtc.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2019 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Nonstandard definitions for components of the WebRTC browser
|
||||
* API.
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @type {function(new: MediaStream,
|
||||
* (!MediaStream|!Array<!MediaStreamTrack>)=)}
|
||||
*/
|
||||
var webkitMediaStream;
|
||||
|
||||
/**
|
||||
* @param {MediaStreamConstraints} constraints A MediaStreamConstraints object.
|
||||
* @param {function(!MediaStream)} successCallback
|
||||
* A NavigatorUserMediaSuccessCallback function.
|
||||
* @param {function(!NavigatorUserMediaError)=} errorCallback A
|
||||
* NavigatorUserMediaErrorCallback function.
|
||||
* @see http://dev.w3.org/2011/webrtc/editor/getusermedia.html
|
||||
* @see https://www.w3.org/TR/mediacapture-streams/
|
||||
* @return {undefined}
|
||||
*/
|
||||
Navigator.prototype.webkitGetUserMedia = function(
|
||||
constraints, successCallback, errorCallback) {};
|
||||
|
||||
/** @const */
|
||||
var webkitRTCPeerConnection = RTCPeerConnection;
|
||||
80
javascript/externs/web/nonstandard_selection.js
Normal file
80
javascript/externs/web/nonstandard_selection.js
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright 2011 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Nonstandard enhancements to W3C's Selection API.
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
// The following were sources from the webkit externs.
|
||||
|
||||
/** @type {?Node} */
|
||||
Selection.prototype.baseNode;
|
||||
|
||||
/** @type {number} */
|
||||
Selection.prototype.baseOffset;
|
||||
|
||||
/** @type {?Node} */
|
||||
Selection.prototype.extentNode;
|
||||
|
||||
/** @type {number} */
|
||||
Selection.prototype.extentOffset;
|
||||
|
||||
/**
|
||||
* @param {string} alter
|
||||
* @param {string} direction
|
||||
* @param {string} granularity
|
||||
* @return {undefined}
|
||||
*/
|
||||
Selection.prototype.modify = function(alter, direction, granularity) {};
|
||||
|
||||
|
||||
// The following were sources from the gecko externs.
|
||||
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/Selection/selectionLanguageChange
|
||||
*/
|
||||
Selection.prototype.selectionLanguageChange;
|
||||
|
||||
|
||||
// The following were sources from the ie externs.
|
||||
|
||||
|
||||
/**
|
||||
* @type {?Selection}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx
|
||||
*/
|
||||
Document.prototype.selection;
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536418(VS.85).aspx
|
||||
*/
|
||||
Selection.prototype.clear = function() {};
|
||||
|
||||
/**
|
||||
* @return {?TextRange|?ControlRange}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536394(VS.85).aspx
|
||||
*/
|
||||
Selection.prototype.createRange = function() {};
|
||||
|
||||
/**
|
||||
* @return {?Array<?TextRange>}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536396(VS.85).aspx
|
||||
*/
|
||||
Selection.prototype.createRangeCollection = function() {};
|
||||
@@ -24,31 +24,117 @@
|
||||
*/
|
||||
|
||||
|
||||
/** @typedef {{ value:*, done:boolean }} */
|
||||
var IteratorResult;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {!CountQueuingStrategy|!ByteLengthQueuingStrategy|{
|
||||
* size: (undefined|function(*): number),
|
||||
* highWaterMark: number
|
||||
* highWaterMark: (number|undefined),
|
||||
* }}
|
||||
*/
|
||||
var QueuingStrategy;
|
||||
|
||||
/**
|
||||
* The TransformStreamDefaultController class has methods that allow
|
||||
* manipulation of the associated ReadableStream and WritableStream.
|
||||
*
|
||||
* This class cannot be directly constructed and is instead passed by the
|
||||
* TransformStream to the methods of its transformer.
|
||||
*
|
||||
* @interface
|
||||
* @template OUT_VALUE
|
||||
* @see https://streams.spec.whatwg.org/#ts-default-controller-class
|
||||
*/
|
||||
function TransformStreamDefaultController() {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://streams.spec.whatwg.org/#ts-default-controller-desired-size
|
||||
*/
|
||||
TransformStreamDefaultController.prototype.desiredSize;
|
||||
|
||||
/**
|
||||
* @param {OUT_VALUE} chunk
|
||||
* @return {undefined}
|
||||
* @see https://streams.spec.whatwg.org/#ts-default-controller-enqueue
|
||||
*/
|
||||
TransformStreamDefaultController.prototype.enqueue = function(chunk) {};
|
||||
|
||||
/**
|
||||
* @param {*} reason
|
||||
* @return {undefined}
|
||||
* @see https://streams.spec.whatwg.org/#ts-default-controller-error
|
||||
*/
|
||||
TransformStreamDefaultController.prototype.error = function(reason) {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see https://streams.spec.whatwg.org/#ts-default-controller-terminate
|
||||
*/
|
||||
TransformStreamDefaultController.prototype.terminate = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @template IN_VALUE, OUT_VALUE
|
||||
* @see https://streams.spec.whatwg.org/#transformer-api
|
||||
*/
|
||||
function TransformStream() {};
|
||||
function TransformStreamTransformer() {};
|
||||
|
||||
/** @type {!WritableStream} */
|
||||
/**
|
||||
* @type {(undefined|function(
|
||||
* !TransformStreamDefaultController<OUT_VALUE>
|
||||
* ):(!IThenable<*>|undefined)
|
||||
* )}
|
||||
*/
|
||||
TransformStreamTransformer.prototype.start;
|
||||
|
||||
/**
|
||||
* @type {(undefined|function(
|
||||
* IN_VALUE, !TransformStreamDefaultController<OUT_VALUE>
|
||||
* ):(!IThenable<*>|undefined)
|
||||
* )}
|
||||
*/
|
||||
TransformStreamTransformer.prototype.transform;
|
||||
|
||||
/**
|
||||
* @type {(undefined|function(
|
||||
* !TransformStreamDefaultController<OUT_VALUE>
|
||||
* ):(!IThenable<*>|undefined)
|
||||
* )}
|
||||
*/
|
||||
TransformStreamTransformer.prototype.flush;
|
||||
|
||||
|
||||
/**
|
||||
* A transform stream (https://streams.spec.whatwg.org/#transform-stream).
|
||||
* @record
|
||||
* @template IN_VALUE, OUT_VALUE
|
||||
*/
|
||||
function ITransformStream() {}
|
||||
|
||||
/** @type {!WritableStream<IN_VALUE>} */
|
||||
ITransformStream.prototype.writable;
|
||||
|
||||
/** @type {!ReadableStream<OUT_VALUE>} */
|
||||
ITransformStream.prototype.readable;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {ITransformStream<IN_VALUE, OUT_VALUE>}
|
||||
* @template IN_VALUE, OUT_VALUE
|
||||
* @param {!TransformStreamTransformer<IN_VALUE, OUT_VALUE>=} transformer
|
||||
* @param {!QueuingStrategy=} writableStrategy
|
||||
* @param {!QueuingStrategy=} readableStrategy
|
||||
* @see https://streams.spec.whatwg.org/#ts-class
|
||||
*/
|
||||
function TransformStream(transformer, writableStrategy, readableStrategy) {};
|
||||
|
||||
/** @type {!WritableStream<IN_VALUE>} */
|
||||
TransformStream.prototype.writable;
|
||||
|
||||
/** @type {!ReadableStream} */
|
||||
/** @type {!ReadableStream<OUT_VALUE>} */
|
||||
TransformStream.prototype.readable;
|
||||
|
||||
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
@@ -66,18 +152,23 @@ PipeOptions.prototype.preventCancel;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @template VALUE
|
||||
*/
|
||||
function ReadableStreamSource() {};
|
||||
|
||||
/**
|
||||
* @type {(undefined|
|
||||
* function((!ReadableByteStreamController|!ReadableStreamDefaultController)):(!IThenable<*>|undefined))}
|
||||
* @type {(undefined|function(
|
||||
* (!ReadableByteStreamController|!ReadableStreamDefaultController<VALUE>)
|
||||
* ):(!IThenable<*>|undefined)
|
||||
* )}
|
||||
*/
|
||||
ReadableStreamSource.prototype.start;
|
||||
|
||||
/**
|
||||
* @type {(undefined|
|
||||
* function((!ReadableByteStreamController|!ReadableStreamDefaultController)):(!IThenable<*>|undefined))}
|
||||
* @type {(undefined|function(
|
||||
* (!ReadableByteStreamController|!ReadableStreamDefaultController<VALUE>)
|
||||
* ):(!IThenable<*>|undefined)
|
||||
* )}
|
||||
*/
|
||||
ReadableStreamSource.prototype.pull;
|
||||
|
||||
@@ -90,11 +181,19 @@ ReadableStreamSource.prototype.type;
|
||||
/** @type {(undefined|number)} */
|
||||
ReadableStreamSource.prototype.autoAllocateChunkSize;
|
||||
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
function ReadableStreamIteratorOptions() {};
|
||||
|
||||
/** @type {undefined|boolean} */
|
||||
ReadableStreamIteratorOptions.prototype.preventCancel;
|
||||
|
||||
/**
|
||||
* @param {!ReadableStreamSource=} opt_underlyingSource
|
||||
* @param {!QueuingStrategy=} opt_queuingStrategy
|
||||
* @constructor
|
||||
* @template VALUE
|
||||
* @param {!ReadableStreamSource<VALUE>=} opt_underlyingSource
|
||||
* @param {!QueuingStrategy<VALUE>=} opt_queuingStrategy
|
||||
* @see https://streams.spec.whatwg.org/#rs-class
|
||||
*/
|
||||
function ReadableStream(opt_underlyingSource, opt_queuingStrategy) {};
|
||||
@@ -112,23 +211,31 @@ ReadableStream.prototype.locked;
|
||||
*/
|
||||
ReadableStream.prototype.cancel = function(reason) {};
|
||||
|
||||
/**
|
||||
* @param {!ReadableStreamIteratorOptions=} options
|
||||
* @return {!AsyncIterator}
|
||||
* @see https://streams.spec.whatwg.org/#rs-get-iterator
|
||||
*/
|
||||
ReadableStream.prototype.getIterator = function(options) {};
|
||||
|
||||
/**
|
||||
* @param {{ mode:(undefined|string) }=} opt_options
|
||||
* @return {(!ReadableStreamDefaultReader|!ReadableStreamBYOBReader)}
|
||||
* @return {(!ReadableStreamDefaultReader<VALUE>|!ReadableStreamBYOBReader)}
|
||||
* @see https://streams.spec.whatwg.org/#rs-get-reader
|
||||
*/
|
||||
ReadableStream.prototype.getReader = function(opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {!TransformStream} transform
|
||||
* @template PIPE_VALUE
|
||||
* @param {!ITransformStream<PIPE_VALUE, VALUE>} transform
|
||||
* @param {!PipeOptions=} opt_options
|
||||
* @return {!ReadableStream}
|
||||
* @return {!ReadableStream<PIPE_VALUE>}
|
||||
* @see https://streams.spec.whatwg.org/#rs-pipe-through
|
||||
*/
|
||||
ReadableStream.prototype.pipeThrough = function(transform, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {!WritableStream} dest
|
||||
* @param {!WritableStream<VALUE>} dest
|
||||
* @param {!PipeOptions=} opt_options
|
||||
* @return {!Promise<void>}
|
||||
* @see https://streams.spec.whatwg.org/#rs-pipe-to
|
||||
@@ -136,17 +243,24 @@ ReadableStream.prototype.pipeThrough = function(transform, opt_options) {};
|
||||
ReadableStream.prototype.pipeTo = function(dest, opt_options) {};
|
||||
|
||||
/**
|
||||
* @return {!Array<!ReadableStream>}
|
||||
* @return {!Array<!ReadableStream<VALUE>>}
|
||||
* @see https://streams.spec.whatwg.org/#rs-tee
|
||||
*/
|
||||
ReadableStream.prototype.tee = function() {};
|
||||
|
||||
/**
|
||||
* @param {!ReadableStreamIteratorOptions=} options
|
||||
* @return {!AsyncIterator}
|
||||
* @see https://streams.spec.whatwg.org/#rs-asynciterator
|
||||
*/
|
||||
ReadableStream.prototype[Symbol.asyncIterator] = function(options) {};
|
||||
|
||||
/**
|
||||
* The ReadableStreamDefaultReader constructor is generally not meant to be used directly;
|
||||
* instead, a stream’s getReader() method should be used.
|
||||
* The ReadableStreamDefaultReader constructor is generally not meant to be used
|
||||
* directly; instead, a stream’s getReader() method should be used.
|
||||
*
|
||||
* @interface
|
||||
* @template VALUE
|
||||
* @see https://streams.spec.whatwg.org/#default-reader-class
|
||||
*/
|
||||
function ReadableStreamDefaultReader() {};
|
||||
@@ -165,7 +279,7 @@ ReadableStreamDefaultReader.prototype.closed;
|
||||
ReadableStreamDefaultReader.prototype.cancel = function(reason) {};
|
||||
|
||||
/**
|
||||
* @return {!Promise<!IteratorResult>}
|
||||
* @return {!Promise<!IIterableResult<VALUE>>}
|
||||
* @see https://streams.spec.whatwg.org/#default-reader-read
|
||||
*/
|
||||
ReadableStreamDefaultReader.prototype.read = function() {};
|
||||
@@ -200,8 +314,9 @@ ReadableStreamBYOBReader.prototype.closed;
|
||||
ReadableStreamBYOBReader.prototype.cancel = function(reason) {};
|
||||
|
||||
/**
|
||||
* @param {!ArrayBufferView} view
|
||||
* @return {!Promise<!IteratorResult>}
|
||||
* @template BUFFER
|
||||
* @param {BUFFER} view
|
||||
* @return {!Promise<!IIterableResult<BUFFER>>}
|
||||
* @see https://streams.spec.whatwg.org/#byob-reader-read
|
||||
*/
|
||||
ReadableStreamBYOBReader.prototype.read = function(view) {};
|
||||
@@ -218,6 +333,7 @@ ReadableStreamBYOBReader.prototype.releaseLock = function() {};
|
||||
* it only works on a ReadableStream that is in the middle of being constructed.
|
||||
*
|
||||
* @interface
|
||||
* @template VALUE
|
||||
* @see https://streams.spec.whatwg.org/#rs-default-controller-class
|
||||
*/
|
||||
function ReadableStreamDefaultController() {};
|
||||
@@ -235,7 +351,7 @@ ReadableStreamDefaultController.prototype.desiredSize;
|
||||
ReadableStreamDefaultController.prototype.close = function() {};
|
||||
|
||||
/**
|
||||
* @param {*} chunk
|
||||
* @param {VALUE} chunk
|
||||
* @return {undefined}
|
||||
* @see https://streams.spec.whatwg.org/#rs-default-controller-enqueue
|
||||
*/
|
||||
@@ -320,13 +436,17 @@ ReadableStreamBYOBRequest.prototype.respondWithNewView = function(view) {};
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @template VALUE
|
||||
*/
|
||||
function WritableStreamSink() {};
|
||||
|
||||
/** @type {(undefined|function(!WritableStreamDefaultController):(!IThenable<*>|undefined))}*/
|
||||
WritableStreamSink.prototype.start;
|
||||
|
||||
/** @type {(undefined|function(!WritableStreamDefaultController):(!IThenable<*>|undefined))}*/
|
||||
/**
|
||||
* @type {(undefined|function(VALUE,
|
||||
* !WritableStreamDefaultController):(!IThenable<*>|undefined))}
|
||||
*/
|
||||
WritableStreamSink.prototype.write;
|
||||
|
||||
/** @type {(undefined|function():(!IThenable<*>|undefined))} */
|
||||
@@ -337,9 +457,10 @@ WritableStreamSink.prototype.abort;
|
||||
|
||||
|
||||
/**
|
||||
* @param {!WritableStreamSink=} opt_underlyingSink
|
||||
* @param {!QueuingStrategy=} opt_queuingStrategy
|
||||
* @constructor
|
||||
* @template VALUE
|
||||
* @param {!WritableStreamSink<VALUE>=} opt_underlyingSink
|
||||
* @param {!QueuingStrategy<VALUE>=} opt_queuingStrategy
|
||||
* @see https://streams.spec.whatwg.org/#ws-class
|
||||
*/
|
||||
function WritableStream(opt_underlyingSink, opt_queuingStrategy) {};
|
||||
@@ -358,7 +479,13 @@ WritableStream.prototype.locked;
|
||||
WritableStream.prototype.abort = function(reason) {};
|
||||
|
||||
/**
|
||||
* @return {!WritableStreamDefaultWriter}
|
||||
* @return {!Promise<undefined>}
|
||||
* @see https://streams.spec.whatwg.org/#ws-close
|
||||
*/
|
||||
WritableStream.prototype.close = function() {};
|
||||
|
||||
/**
|
||||
* @return {!WritableStreamDefaultWriter<VALUE>}
|
||||
* @see https://streams.spec.whatwg.org/#ws-get-writer
|
||||
*/
|
||||
WritableStream.prototype.getWriter = function() {};
|
||||
@@ -366,6 +493,7 @@ WritableStream.prototype.getWriter = function() {};
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @template VALUE
|
||||
* @see https://streams.spec.whatwg.org/#default-writer-class
|
||||
*/
|
||||
function WritableStreamDefaultWriter() {};
|
||||
@@ -408,7 +536,7 @@ WritableStreamDefaultWriter.prototype.close = function() {};
|
||||
WritableStreamDefaultWriter.prototype.releaseLock = function() {};
|
||||
|
||||
/**
|
||||
* @param {*} chunk
|
||||
* @param {VALUE} chunk
|
||||
* @return {!Promise<undefined>}
|
||||
* @see https://streams.spec.whatwg.org/#default-writer-write
|
||||
*/
|
||||
|
||||
@@ -23,9 +23,32 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Array<string>}
|
||||
*/
|
||||
var URLSearchParamsTupleType;
|
||||
|
||||
/**
|
||||
* Represents the query string of a URL.
|
||||
*
|
||||
* * When `init` is a string, it is basically parsed as a query string
|
||||
* `'name1=value1&name2=value2'`.
|
||||
*
|
||||
* * When `init` is an array of arrays of string
|
||||
* `([['name1', 'value1'], ['name2', 'value2']])`,
|
||||
* it must contain pairs of strings, where the first item in the pair will be
|
||||
* interpreted as a key and the second as a value.
|
||||
*
|
||||
* NOTE: The specification uses Iterable rather than Array, but this is not
|
||||
* supported in Edge 17 - 18.
|
||||
*
|
||||
* * When `init` is an object, keys and values will be interpreted as such
|
||||
* `({name1: 'value1', name2: 'value2'}).
|
||||
*
|
||||
* @see https://url.spec.whatwg.org/#interface-urlsearchparams
|
||||
* @constructor
|
||||
* @implements {Iterable<!Array<string>>}
|
||||
* @param {(string|!URLSearchParams)=} init
|
||||
* @param {(string|!Array<!URLSearchParamsTupleType>|!Object<string,string>)=}
|
||||
* init
|
||||
*/
|
||||
function URLSearchParams(init) {}
|
||||
|
||||
@@ -42,6 +65,19 @@ URLSearchParams.prototype.append = function(name, value) {};
|
||||
*/
|
||||
URLSearchParams.prototype.delete = function(name) {};
|
||||
|
||||
/**
|
||||
* @return {!IteratorIterable<!Array<string>>}
|
||||
* @nosideeffects
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/entries
|
||||
*/
|
||||
URLSearchParams.prototype.entries = function() {};
|
||||
|
||||
/**
|
||||
* @param {function(string, string)} callback
|
||||
* @return {undefined}
|
||||
*/
|
||||
URLSearchParams.prototype.forEach = function(callback) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {?string}
|
||||
@@ -60,6 +96,12 @@ URLSearchParams.prototype.getAll = function(name) {};
|
||||
*/
|
||||
URLSearchParams.prototype.has = function(name) {};
|
||||
|
||||
/**
|
||||
* @return {!IteratorIterable<string>}
|
||||
*/
|
||||
URLSearchParams.prototype.keys = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {string} value
|
||||
@@ -67,6 +109,16 @@ URLSearchParams.prototype.has = function(name) {};
|
||||
*/
|
||||
URLSearchParams.prototype.set = function(name, value) {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
*/
|
||||
URLSearchParams.prototype.sort = function() {};
|
||||
|
||||
/**
|
||||
* @return {!IteratorIterable<string>}
|
||||
*/
|
||||
URLSearchParams.prototype.values = function() {};
|
||||
|
||||
/**
|
||||
* @see https://url.spec.whatwg.org
|
||||
* @constructor
|
||||
@@ -79,8 +131,7 @@ function URL(url, base) {}
|
||||
URL.prototype.href;
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {string}
|
||||
* @const {string}
|
||||
*/
|
||||
URL.prototype.origin;
|
||||
|
||||
@@ -109,8 +160,7 @@ URL.prototype.pathname;
|
||||
URL.prototype.search;
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {URLSearchParams}
|
||||
* @const {!URLSearchParams}
|
||||
*/
|
||||
URL.prototype.searchParams;
|
||||
|
||||
|
||||
50
javascript/externs/web/w3c_abort.js
Normal file
50
javascript/externs/web/w3c_abort.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright 2018 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for AbortController
|
||||
* @see https://dom.spec.whatwg.org/#aborting-ongoing-activities
|
||||
* @externs
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {EventTarget}
|
||||
* @see https://dom.spec.whatwg.org/#interface-AbortSignal
|
||||
*/
|
||||
function AbortSignal() {}
|
||||
|
||||
/** @type {boolean} */
|
||||
AbortSignal.prototype.aborted;
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
AbortSignal.prototype.onabort;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see https://dom.spec.whatwg.org/#interface-abortcontroller
|
||||
*/
|
||||
function AbortController() {}
|
||||
|
||||
/** @const {!AbortSignal} */
|
||||
AbortController.prototype.signal;
|
||||
|
||||
/** @return {void} */
|
||||
AbortController.prototype.abort = function() {};
|
||||
@@ -23,7 +23,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {function(number)} callback
|
||||
* @typedef {function(number): undefined}
|
||||
* @see https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#framerequestcallback
|
||||
*/
|
||||
var FrameRequestCallback;
|
||||
|
||||
/**
|
||||
* @param {!FrameRequestCallback} callback
|
||||
* @param {Element=} opt_element In early versions of this API, the callback
|
||||
* was invoked only if the element was visible.
|
||||
* @return {number}
|
||||
@@ -41,80 +47,3 @@ function cancelRequestAnimationFrame(handle) {};
|
||||
* @return {undefined}
|
||||
*/
|
||||
function cancelAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {function(number)} callback
|
||||
* @param {Element=} opt_element
|
||||
* @return {number}
|
||||
*/
|
||||
function webkitRequestAnimationFrame(callback, opt_element) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function webkitCancelRequestAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function webkitCancelAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {?function(number)} callback It's legitimate to pass a null
|
||||
* callback and listen on the MozBeforePaint event instead.
|
||||
* @param {Element=} opt_element
|
||||
* @return {number}
|
||||
*/
|
||||
function mozRequestAnimationFrame(callback, opt_element) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function mozCancelRequestAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function mozCancelAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {function(number)} callback
|
||||
* @param {Element=} opt_element
|
||||
* @return {number}
|
||||
*/
|
||||
function msRequestAnimationFrame(callback, opt_element) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function msCancelRequestAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function msCancelAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {function(number)} callback
|
||||
* @param {Element=} opt_element
|
||||
* @return {number}
|
||||
*/
|
||||
function oRequestAnimationFrame(callback, opt_element) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function oCancelRequestAnimationFrame(handle) {};
|
||||
|
||||
/**
|
||||
* @param {number} handle
|
||||
* @return {undefined}
|
||||
*/
|
||||
function oCancelAnimationFrame(handle) {};
|
||||
|
||||
1587
javascript/externs/web/w3c_audio.js
Normal file
1587
javascript/externs/web/w3c_audio.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's Battery Status API.
|
||||
* The whole file has been fully type annotated. Created from
|
||||
* http://www.w3.org/TR/2014/CR-battery-status-20141209/
|
||||
* https://www.w3.org/TR/battery-status/
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
@@ -56,24 +56,30 @@ BatteryManager.prototype.level;
|
||||
|
||||
|
||||
/**
|
||||
* @type {?function(!Event)}
|
||||
* @type {?function(!Event): void}
|
||||
*/
|
||||
BatteryManager.prototype.onchargingchange;
|
||||
|
||||
|
||||
/**
|
||||
* @type {?function(!Event)}
|
||||
* @type {?function(!Event): void}
|
||||
*/
|
||||
BatteryManager.prototype.onchargingtimechange;
|
||||
|
||||
|
||||
/**
|
||||
* @type {?function(!Event)}
|
||||
* @type {?function(!Event): void}
|
||||
*/
|
||||
BatteryManager.prototype.ondischargingtimechange;
|
||||
|
||||
|
||||
/**
|
||||
* @type {?function(!Event)}
|
||||
* @type {?function(!Event): void}
|
||||
*/
|
||||
BatteryManager.prototype.onlevelchange;
|
||||
|
||||
/**
|
||||
* @return {!Promise<!BatteryManager>}
|
||||
* @see http://www.w3.org/TR/battery-status/
|
||||
*/
|
||||
Navigator.prototype.getBattery = function() {};
|
||||
|
||||
40
javascript/externs/web/w3c_clipboard.js
Normal file
40
javascript/externs/web/w3c_clipboard.js
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2018 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Declaration of the asynchronous clipboard Web API.
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @see https://w3c.github.io/clipboard-apis/#async-clipboard-api
|
||||
*/
|
||||
function Clipboard() {}
|
||||
|
||||
/**
|
||||
* @return {!Promise<string>}
|
||||
*/
|
||||
Clipboard.prototype.readText = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} text
|
||||
* @return {!Promise<void>}
|
||||
*/
|
||||
Clipboard.prototype.writeText = function(text) {};
|
||||
|
||||
/** @const {!Clipboard} */
|
||||
Navigator.prototype.clipboard;
|
||||
47
javascript/externs/web/w3c_clipboardevent.js
Normal file
47
javascript/externs/web/w3c_clipboardevent.js
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 2015 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's ClipboardEvent API.
|
||||
* @see http://www.w3.org/TR/clipboard-apis/
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {EventInit}
|
||||
* @see https://www.w3.org/TR/clipboard-apis/#dfn-eventinit
|
||||
*/
|
||||
function ClipboardEventInit() {}
|
||||
|
||||
/** @type {?DataTransfer|undefined} */
|
||||
ClipboardEventInit.prototype.clipboardData;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Event}
|
||||
* @param {string} type
|
||||
* @param {ClipboardEventInit=} opt_eventInitDict
|
||||
*/
|
||||
function ClipboardEvent(type, opt_eventInitDict) {}
|
||||
|
||||
|
||||
/** @const {?DataTransfer} */
|
||||
ClipboardEvent.prototype.clipboardData;
|
||||
93
javascript/externs/web/w3c_composition_event.js
Normal file
93
javascript/externs/web/w3c_composition_event.js
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright 2018 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's Composition Events specification.
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* The `CompositionEvent` interface provides specific contextual information
|
||||
* associated with Composition Events.
|
||||
* @see https://www.w3.org/TR/uievents/#interface-compositionevent
|
||||
* @record
|
||||
* @extends {UIEventInit}
|
||||
*/
|
||||
function CompositionEventInit() {}
|
||||
|
||||
/**
|
||||
* `data` holds the value of the characters generated by an input method. This
|
||||
* MAY be a single Unicode character or a non-empty sequence of Unicode
|
||||
* characters. This attribute MAY be the empty string. The un-initialized value
|
||||
* of this attribute MUST be "" (the empty string).
|
||||
* @type {string}
|
||||
*/
|
||||
CompositionEventInit.prototype.data;
|
||||
|
||||
/**
|
||||
* Composition Events provide a means for inputing text in a supplementary or
|
||||
* alternate manner than by Keyboard Events, in order to allow the use of
|
||||
* characters that might not be commonly available on keyboard. For example,
|
||||
* Composition Events might be used to add accents to characters despite their
|
||||
* absence from standard US keyboards, to build up logograms of many Asian
|
||||
* languages from their base components or categories, to select word choices
|
||||
* from a combination of key presses on a mobile device keyboard, or to convert
|
||||
* voice commands into text using a speech recognition processor.
|
||||
*
|
||||
* Conceptually, a composition session consists of one `compositionstart` event,
|
||||
* one or more `compositionupdate` events, and one `compositionend` event, with
|
||||
* the value of the data attribute persisting between each stage of this event
|
||||
* chain during each session.
|
||||
*
|
||||
* Not all IME systems or devices expose the necessary data to the DOM, so the
|
||||
* active composition string (the "Reading Window" or "candidate selection" menu
|
||||
* option) might not be available through this interface, in which case the
|
||||
* selection MAY be represented by the empty string.
|
||||
*
|
||||
* @see https://www.w3.org/TR/uievents/#events-compositionevents
|
||||
* @param {string} type
|
||||
* @param {!CompositionEventInit=} opt_eventInitDict
|
||||
* @extends {UIEvent}
|
||||
* @constructor
|
||||
*/
|
||||
function CompositionEvent(type, opt_eventInitDict) {}
|
||||
|
||||
/**
|
||||
* Initializes attributes of a `CompositionEvent` object. This method has the
|
||||
* same behavior as `UIEvent.initUIEvent()`. The value of `detail` remains
|
||||
* undefined.
|
||||
*
|
||||
* @see https://www.w3.org/TR/uievents/#idl-interface-CompositionEvent-initializers
|
||||
* @param {string} typeArg
|
||||
* @param {boolean} canBubbleArg
|
||||
* @param {boolean} cancelableArg
|
||||
* @param {?Window} viewArg
|
||||
* @param {string} dataArg
|
||||
* @param {string} localeArg
|
||||
* @return {undefined}
|
||||
*/
|
||||
CompositionEvent.prototype.initCompositionEvent = function(
|
||||
typeArg, canBubbleArg, cancelableArg, viewArg, dataArg, localeArg) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
CompositionEvent.prototype.data;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
CompositionEvent.prototype.locale;
|
||||
@@ -236,52 +236,52 @@ CSSRule.prototype.style;
|
||||
|
||||
/**
|
||||
* Indicates that the rule is a {@see CSSUnknownRule}.
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType
|
||||
*/
|
||||
CSSRule.UNKNOWN_RULE = 0;
|
||||
CSSRule.UNKNOWN_RULE;
|
||||
|
||||
/**
|
||||
* Indicates that the rule is a {@see CSSStyleRule}.
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType
|
||||
*/
|
||||
CSSRule.STYLE_RULE = 1;
|
||||
CSSRule.STYLE_RULE;
|
||||
|
||||
/**
|
||||
* Indicates that the rule is a {@see CSSCharsetRule}.
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType
|
||||
*/
|
||||
CSSRule.CHARSET_RULE = 2;
|
||||
CSSRule.CHARSET_RULE;
|
||||
|
||||
/**
|
||||
* Indicates that the rule is a {@see CSSImportRule}.
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType
|
||||
*/
|
||||
CSSRule.IMPORT_RULE = 3;
|
||||
CSSRule.IMPORT_RULE;
|
||||
|
||||
/**
|
||||
* Indicates that the rule is a {@see CSSMediaRule}.
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType
|
||||
*/
|
||||
CSSRule.MEDIA_RULE = 4;
|
||||
CSSRule.MEDIA_RULE;
|
||||
|
||||
/**
|
||||
* Indicates that the rule is a {@see CSSFontFaceRule}.
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType
|
||||
*/
|
||||
CSSRule.FONT_FACE_RULE = 5;
|
||||
CSSRule.FONT_FACE_RULE;
|
||||
|
||||
/**
|
||||
* Indicates that the rule is a {@see CSSPageRule}.
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType
|
||||
*/
|
||||
CSSRule.PAGE_RULE = 6;
|
||||
CSSRule.PAGE_RULE;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -418,6 +418,7 @@ function CSSUnknownRule() {}
|
||||
* @extends {CSSProperties}
|
||||
* @implements {IObject<(string|number), string>}
|
||||
* @implements {IArrayLike<string>}
|
||||
* @implements {Iterable<string>}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration
|
||||
*/
|
||||
function CSSStyleDeclaration() {}
|
||||
@@ -518,6 +519,7 @@ CSSStyleDeclaration.prototype.removeAttribute =
|
||||
CSSStyleDeclaration.prototype.removeExpression = function(name) {};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param {string} name
|
||||
* @param {*} value
|
||||
* @param {number=} opt_flags
|
||||
@@ -556,28 +558,28 @@ CSSValue.prototype.cssText;
|
||||
CSSValue.prototype.cssValueType;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue-types
|
||||
*/
|
||||
CSSValue.CSS_INHERIT = 0;
|
||||
CSSValue.CSS_INHERIT;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue-types
|
||||
*/
|
||||
CSSValue.CSS_PRIMITIVE_VALUE = 1;
|
||||
CSSValue.CSS_PRIMITIVE_VALUE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue-types
|
||||
*/
|
||||
CSSValue.CSS_VALUE_LIST = 2;
|
||||
CSSValue.CSS_VALUE_LIST;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue-types
|
||||
*/
|
||||
CSSValue.CSS_CUSTOM = 3;
|
||||
CSSValue.CSS_CUSTOM;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -593,160 +595,160 @@ function CSSPrimitiveValue() {}
|
||||
CSSPrimitiveValue.prototype.primitiveType;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_UNKNOWN = 0;
|
||||
CSSPrimitiveValue.CSS_UNKNOWN;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_NUMBER = 1;
|
||||
CSSPrimitiveValue.CSS_NUMBER;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_PERCENTAGE = 2;
|
||||
CSSPrimitiveValue.CSS_PERCENTAGE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_EMS = 3;
|
||||
CSSPrimitiveValue.CSS_EMS;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_EXS = 4;
|
||||
CSSPrimitiveValue.CSS_EXS;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_PX = 5;
|
||||
CSSPrimitiveValue.CSS_PX;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_CM = 6;
|
||||
CSSPrimitiveValue.CSS_CM;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_MM = 7;
|
||||
CSSPrimitiveValue.CSS_MM;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_IN = 8;
|
||||
CSSPrimitiveValue.CSS_IN;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_PT = 9;
|
||||
CSSPrimitiveValue.CSS_PT;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_PC = 10;
|
||||
CSSPrimitiveValue.CSS_PC;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_DEG = 11;
|
||||
CSSPrimitiveValue.CSS_DEG;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_RAD = 12;
|
||||
CSSPrimitiveValue.CSS_RAD;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_GRAD = 13;
|
||||
CSSPrimitiveValue.CSS_GRAD;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_MS = 14;
|
||||
CSSPrimitiveValue.CSS_MS;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_S = 15;
|
||||
CSSPrimitiveValue.CSS_S;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_HZ = 16;
|
||||
CSSPrimitiveValue.CSS_HZ;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_KHZ = 17;
|
||||
CSSPrimitiveValue.CSS_KHZ;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_DIMENSION = 18;
|
||||
CSSPrimitiveValue.CSS_DIMENSION;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_STRING = 19;
|
||||
CSSPrimitiveValue.CSS_STRING;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_URI = 20;
|
||||
CSSPrimitiveValue.CSS_URI;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_IDENT = 21;
|
||||
CSSPrimitiveValue.CSS_IDENT;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_ATTR = 22;
|
||||
CSSPrimitiveValue.CSS_ATTR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_COUNTER = 23;
|
||||
CSSPrimitiveValue.CSS_COUNTER;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_RECT = 24;
|
||||
CSSPrimitiveValue.CSS_RECT;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue
|
||||
*/
|
||||
CSSPrimitiveValue.CSS_RGBCOLOR = 25;
|
||||
CSSPrimitiveValue.CSS_RGBCOLOR;
|
||||
|
||||
/**
|
||||
* @return {Counter}
|
||||
@@ -904,7 +906,7 @@ Counter.prototype.listStyle;
|
||||
Counter.prototype.separator;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @interface
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-ViewCSS
|
||||
*/
|
||||
function ViewCSS() {}
|
||||
@@ -975,6 +977,12 @@ function CSSProperties() {}
|
||||
*/
|
||||
CSSProperties.prototype.azimuth;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty
|
||||
*/
|
||||
CSSProperties.prototype.backdropFilter;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-background
|
||||
@@ -1820,6 +1828,62 @@ CSSProperties.prototype.opacity;
|
||||
*/
|
||||
CSSProperties.prototype.textOverflow;
|
||||
|
||||
// CSS 3 animations
|
||||
|
||||
/**
|
||||
* @type {string|number}
|
||||
* @see https://www.w3.org/TR/css-animations-1/#animation
|
||||
*/
|
||||
CSSProperties.prototype.animation;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css-animations-1/#animation-delay
|
||||
*/
|
||||
CSSProperties.prototype.animationDelay;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css-animations-1/#animation-direction
|
||||
*/
|
||||
CSSProperties.prototype.animationDirection;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css-animations-1/#animation-duration
|
||||
*/
|
||||
CSSProperties.prototype.animationDuration;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css-animations-1/#animation-fill-mode
|
||||
*/
|
||||
CSSProperties.prototype.animationFillMode;
|
||||
|
||||
/**
|
||||
* @type {string|number}
|
||||
* @see https://www.w3.org/TR/css-animations-1/#animation-iteration-count
|
||||
*/
|
||||
CSSProperties.prototype.animationIterationCount;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css-animations-1/#animation-name
|
||||
*/
|
||||
CSSProperties.prototype.animationName;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css-animations-1/#animation-play-state
|
||||
*/
|
||||
CSSProperties.prototype.animationPlayState;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css-animations-1/#animation-timing-function
|
||||
*/
|
||||
CSSProperties.prototype.animationTimingFunction;
|
||||
|
||||
// CSS 3 transforms
|
||||
|
||||
/**
|
||||
@@ -1981,6 +2045,129 @@ CSSProperties.prototype.order;
|
||||
*/
|
||||
CSSProperties.prototype.willChange;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css-ui-4/#propdef-user-select
|
||||
*/
|
||||
CSSProperties.prototype.userSelect;
|
||||
|
||||
// CSS 3 Images
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css3-images/#the-object-fit
|
||||
*/
|
||||
CSSProperties.prototype.objectFit;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css3-images/#object-position
|
||||
*/
|
||||
CSSProperties.prototype.objectPosition;
|
||||
|
||||
// CSS Masking
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css-masking-1/
|
||||
*/
|
||||
CSSProperties.prototype.clipPath;
|
||||
|
||||
// CSS Containment
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/css-contain-1/
|
||||
*/
|
||||
CSSProperties.prototype.contain;
|
||||
|
||||
// SVG Fill Properties
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/fill-stroke-3/#fill-shorthand
|
||||
*/
|
||||
CSSProperties.prototype.fill;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/fill-stroke-3/#fill-opacity
|
||||
*/
|
||||
CSSProperties.prototype.fillOpacity;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/fill-stroke-3/#fill-rule
|
||||
*/
|
||||
CSSProperties.prototype.fillRule;
|
||||
|
||||
// SVG Stroke Properties
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.stroke;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.strokeAlignment;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.strokeOpacity;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.strokeWidth;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.strokeLinecap;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.strokeLinejoin;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.strokeMiterlimit;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.strokeDasharray;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.strokeDashoffset;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.strokeDashcorner;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://www.w3.org/TR/svg-strokes/
|
||||
*/
|
||||
CSSProperties.prototype.strokeDashadjust;
|
||||
|
||||
/**
|
||||
* TODO(dbeam): Put this in separate file named w3c_cssom.js.
|
||||
@@ -1992,7 +2179,7 @@ CSSProperties.prototype.willChange;
|
||||
|
||||
/**
|
||||
* @param {string} media_query_list
|
||||
* @return {MediaQueryList}
|
||||
* @return {!MediaQueryList}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-window-matchmedia
|
||||
*/
|
||||
Window.prototype.matchMedia = function(media_query_list) {};
|
||||
@@ -2034,28 +2221,53 @@ Window.prototype.scrollY;
|
||||
Window.prototype.pageYOffset;
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @typedef {{
|
||||
* left: (number|undefined),
|
||||
* top: (number|undefined),
|
||||
* behavior: (string|undefined)
|
||||
* }}
|
||||
* @see https://www.w3.org/TR/cssom-view/#dictdef-scrolltooptions
|
||||
*/
|
||||
var ScrollToOptions;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://www.w3.org/TR/cssom-view/#dictdef-scrollintoviewoptions
|
||||
*/
|
||||
function ScrollIntoViewOptions () {}
|
||||
|
||||
/** @type {string|undefined} */
|
||||
ScrollIntoViewOptions.prototype.behavior;
|
||||
|
||||
/** @type {string|undefined} */
|
||||
ScrollIntoViewOptions.prototype.block;
|
||||
|
||||
/** @type {string|undefined} */
|
||||
ScrollIntoViewOptions.prototype.inline;
|
||||
|
||||
/**
|
||||
* @param {number|!ScrollToOptions} scrollToOptionsOrX
|
||||
* @param {number=} opt_y
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-window-scroll
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.scroll = function(x, y) {};
|
||||
Window.prototype.scroll = function(scrollToOptionsOrX, opt_y) {};
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @param {number|!ScrollToOptions} scrollToOptionsOrX
|
||||
* @param {number=} opt_y
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-window-scrollto
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.scrollTo = function(x, y) {};
|
||||
Window.prototype.scrollTo = function(scrollToOptionsOrX, opt_y) {};
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @param {number|!ScrollToOptions} scrollToOptionsOrX
|
||||
* @param {number=} opt_y
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-window-scrollby
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.scrollBy = function(x, y) {};
|
||||
Window.prototype.scrollBy = function(scrollToOptionsOrX, opt_y) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -2081,8 +2293,47 @@ Window.prototype.outerWidth;
|
||||
*/
|
||||
Window.prototype.outerHeight;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/cssom-view/#dom-window-devicepixelratio
|
||||
*/
|
||||
Window.prototype.devicePixelRatio;
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @return {undefined}
|
||||
* @see https://www.w3.org/TR/cssom-view/#dom-window-moveto
|
||||
*/
|
||||
Window.prototype.moveTo = function(x, y) {};
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @return {undefined}
|
||||
* @see https://www.w3.org/TR/cssom-view/#dom-window-moveby
|
||||
*/
|
||||
Window.prototype.moveBy = function(x, y) {};
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @return {undefined}
|
||||
* @see https://www.w3.org/TR/cssom-view/#dom-window-resizeto
|
||||
*/
|
||||
Window.prototype.resizeTo = function(x, y) {};
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @return {undefined}
|
||||
* @see https://www.w3.org/TR/cssom-view/#dom-window-resizeby
|
||||
*/
|
||||
Window.prototype.resizeBy = function(x, y) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {EventTarget}
|
||||
* @see http://www.w3.org/TR/cssom-view/#mediaquerylist
|
||||
*/
|
||||
function MediaQueryList() {}
|
||||
@@ -2113,6 +2364,17 @@ MediaQueryList.prototype.addListener = function(listener) {};
|
||||
*/
|
||||
MediaQueryList.prototype.removeListener = function(listener) {};
|
||||
|
||||
/** @override Not available in some browsers; use addListener instead. */
|
||||
MediaQueryList.prototype.addEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/** @override Not available in old browsers; use removeListener instead. */
|
||||
MediaQueryList.prototype.removeEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/** @override */
|
||||
MediaQueryList.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
/**
|
||||
* @typedef {(function(!MediaQueryList) : void)}
|
||||
* @see http://www.w3.org/TR/cssom-view/#mediaquerylistlistener
|
||||
@@ -2172,6 +2434,14 @@ Screen.prototype.pixelDepth;
|
||||
*/
|
||||
Document.prototype.elementFromPoint = function(x, y) {};
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @return {!IArrayLike<!Element>}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-document-elementsfrompoint
|
||||
*/
|
||||
Document.prototype.elementsFromPoint = function(x, y) {};
|
||||
|
||||
/**
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
@@ -2214,17 +2484,25 @@ CaretPosition.prototype.offset;
|
||||
Element.prototype.getClientRects = function() {};
|
||||
|
||||
/**
|
||||
* @return {!ClientRect}
|
||||
* @return {!DOMRect}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-element-getboundingclientrect
|
||||
*/
|
||||
Element.prototype.getBoundingClientRect = function() {};
|
||||
|
||||
/**
|
||||
* @param {(boolean|{behavior: string, block: string})=} opt_top
|
||||
* @param {(boolean|ScrollIntoViewOptions)=} top
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-element-scrollintoview
|
||||
* @return {undefined}
|
||||
*/
|
||||
Element.prototype.scrollIntoView = function(opt_top) {};
|
||||
Element.prototype.scrollIntoView = function(top) {};
|
||||
|
||||
/**
|
||||
* @param {number|!ScrollToOptions} scrollToOptionsOrX
|
||||
* @param {number=} opt_y
|
||||
* @see https://www.w3.org/TR/cssom-view/#extension-to-the-element-interface
|
||||
* @return {undefined}
|
||||
*/
|
||||
Element.prototype.scrollTo = function(scrollToOptionsOrX, opt_y) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -2316,7 +2594,7 @@ HTMLElement.prototype.offsetHeight;
|
||||
Range.prototype.getClientRects = function() {};
|
||||
|
||||
/**
|
||||
* @return {!ClientRect}
|
||||
* @return {!DOMRect}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-range-getboundingclientrect
|
||||
*/
|
||||
Range.prototype.getBoundingClientRect = function() {};
|
||||
@@ -2395,7 +2673,7 @@ MouseEvent.prototype.offsetY;
|
||||
/**
|
||||
* @constructor
|
||||
* @see http://www.w3.org/TR/cssom-view/#the-clientrectlist-interface
|
||||
* @implements {IArrayLike<!ClientRect>}
|
||||
* @implements {IArrayLike<!DOMRect>}
|
||||
*/
|
||||
function ClientRectList() {}
|
||||
|
||||
@@ -2407,53 +2685,11 @@ ClientRectList.prototype.length;
|
||||
|
||||
/**
|
||||
* @param {number} index
|
||||
* @return {ClientRect}
|
||||
* @return {?DOMRect}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrectlist-item
|
||||
*/
|
||||
ClientRectList.prototype.item = function(index) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see http://www.w3.org/TR/cssom-view/#the-clientrect-interface
|
||||
*/
|
||||
function ClientRect() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-top
|
||||
*/
|
||||
ClientRect.prototype.top;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-right
|
||||
*/
|
||||
ClientRect.prototype.right;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-bottom
|
||||
*/
|
||||
ClientRect.prototype.bottom;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-left
|
||||
*/
|
||||
ClientRect.prototype.left;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-width
|
||||
*/
|
||||
ClientRect.prototype.width;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-height
|
||||
*/
|
||||
ClientRect.prototype.height;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* http://www.w3.org/TR/css3-conditional/#CSS-interface
|
||||
@@ -2620,12 +2856,12 @@ FontFaceSet.prototype.delete = function(value) {};
|
||||
FontFaceSet.prototype.has = function(font) {};
|
||||
|
||||
/**
|
||||
* @param {function(!FontFace, number, !FontFaceSet)} cb
|
||||
* @param {Object|undefined=} opt_selfObj
|
||||
* @param {function(!FontFace, number, !FontFaceSet)} callback
|
||||
* @param {?Object=} selfObj
|
||||
* see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-foreach
|
||||
* @return {undefined}
|
||||
*/
|
||||
FontFaceSet.prototype.forEach = function(cb, opt_selfObj) {};
|
||||
FontFaceSet.prototype.forEach = function(callback, selfObj) {};
|
||||
|
||||
/**
|
||||
* @param {string} font
|
||||
@@ -2654,3 +2890,92 @@ FontFaceSet.prototype.ready;
|
||||
* @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-status
|
||||
*/
|
||||
FontFaceSet.prototype.status;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} type
|
||||
* @param {{
|
||||
* animationName: (string|undefined),
|
||||
* elapsedTime: (number|undefined),
|
||||
* pseudoElement: (string|undefined)
|
||||
* }=} opt_animationEventInitDict
|
||||
* @extends {Event}
|
||||
* @see https://drafts.csswg.org/css-animations/#interface-animationevent
|
||||
*/
|
||||
function AnimationEvent(type, opt_animationEventInitDict) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://drafts.csswg.org/css-animations/#dom-animationevent-animationname
|
||||
*/
|
||||
AnimationEvent.prototype.animationName;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://drafts.csswg.org/css-animations/#dom-animationevent-elapsedtime
|
||||
*/
|
||||
AnimationEvent.prototype.elapsedTime;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://drafts.csswg.org/css-animations/#dom-animationevent-pseudoelement
|
||||
*/
|
||||
AnimationEvent.prototype.pseudoElement;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {CSSRule}
|
||||
* @see http://dev.w3.org/csswg/css-animations/#csskeyframerule
|
||||
*/
|
||||
function CSSKeyframeRule() {}
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://drafts.csswg.org/css-animations/#dom-csskeyframerule-keytext
|
||||
*/
|
||||
CSSKeyframeRule.prototype.keyText;
|
||||
|
||||
/**
|
||||
* @type {!CSSStyleDeclaration}
|
||||
* @see https://drafts.csswg.org/css-animations/#dom-csskeyframerule-style
|
||||
*/
|
||||
CSSKeyframeRule.prototype.style;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {CSSRule}
|
||||
* @see http://dev.w3.org/csswg/css-animations/#csskeyframesrule
|
||||
*/
|
||||
function CSSKeyframesRule() {}
|
||||
|
||||
/**
|
||||
* @see https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-name
|
||||
* @type {string}
|
||||
*/
|
||||
CSSKeyframesRule.prototype.name;
|
||||
|
||||
/**
|
||||
* @see https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-cssrules
|
||||
* @type {!CSSRuleList}
|
||||
*/
|
||||
CSSKeyframesRule.prototype.cssRules;
|
||||
|
||||
/**
|
||||
* @see https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-findrule
|
||||
* @param {string} key The key text for the rule to find.
|
||||
* @return {?CSSKeyframeRule}
|
||||
*/
|
||||
CSSKeyframesRule.prototype.findRule = function(key) {};
|
||||
|
||||
/**
|
||||
* @see https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-appendrule
|
||||
* @param {string} rule The text for the rule to append.
|
||||
*/
|
||||
CSSKeyframesRule.prototype.appendRule = function(rule) {};
|
||||
|
||||
/**
|
||||
* @see https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-deleterule
|
||||
* @param {string} key The key text for the rule to delete.
|
||||
*/
|
||||
CSSKeyframesRule.prototype.deleteRule = function(key) {};
|
||||
|
||||
@@ -24,11 +24,32 @@
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {EventInit}
|
||||
* @see https://w3c.github.io/deviceorientation/spec-source-orientation.html#deviceorientation
|
||||
*/
|
||||
function DeviceOrientationEventInit() {}
|
||||
|
||||
/** @type {number|undefined} */
|
||||
DeviceOrientationEventInit.prototype.alpha;
|
||||
|
||||
/** @type {number|undefined} */
|
||||
DeviceOrientationEventInit.prototype.beta;
|
||||
|
||||
/** @type {number|undefined} */
|
||||
DeviceOrientationEventInit.prototype.gamma;
|
||||
|
||||
/** @type {boolean|undefined} */
|
||||
DeviceOrientationEventInit.prototype.absolute;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Event}
|
||||
* @param {string} type
|
||||
* @param {!DeviceOrientationEventInit=} opt_eventInitDict
|
||||
*/
|
||||
function DeviceOrientationEvent() {}
|
||||
function DeviceOrientationEvent(type, opt_eventInitDict) {}
|
||||
|
||||
/** @type {?number} */
|
||||
DeviceOrientationEvent.prototype.alpha;
|
||||
|
||||
@@ -20,76 +20,75 @@
|
||||
* http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
|
||||
*
|
||||
* @externs
|
||||
* @author stevey@google.com (Steve Yegge)
|
||||
*/
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string=} message
|
||||
* @param {string=} message
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-17189187
|
||||
* @param {string=} name
|
||||
* @see https://heycam.github.io/webidl/#idl-DOMException
|
||||
*/
|
||||
function DOMException(message, name) {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.INDEX_SIZE_ERR = 1;
|
||||
DOMException.INDEX_SIZE_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.DOMSTRING_SIZE_ERR = 2;
|
||||
DOMException.DOMSTRING_SIZE_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.HIERARCHY_REQUEST_ERR = 3;
|
||||
DOMException.HIERARCHY_REQUEST_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.WRONG_DOCUMENT_ERR = 4;
|
||||
DOMException.WRONG_DOCUMENT_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.INVALID_CHARACTER_ERR = 5;
|
||||
DOMException.INVALID_CHARACTER_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.NO_DATA_ALLOWED_ERR = 6;
|
||||
DOMException.NO_DATA_ALLOWED_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.NO_MODIFICATION_ALLOWED_ERR = 7;
|
||||
DOMException.NO_MODIFICATION_ALLOWED_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.NOT_FOUND_ERR = 8;
|
||||
DOMException.NOT_FOUND_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.NOT_SUPPORTED_ERR = 9;
|
||||
DOMException.NOT_SUPPORTED_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.INUSE_ATTRIBUTE_ERR = 10;
|
||||
DOMException.INUSE_ATTRIBUTE_ERR;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -119,24 +118,13 @@ DOMImplementation.prototype.hasFeature = function(feature, version) {};
|
||||
*/
|
||||
function Node() {}
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_useCapture
|
||||
* @override
|
||||
* @return {undefined}
|
||||
*/
|
||||
Node.prototype.addEventListener = function(type, listener, opt_useCapture) {};
|
||||
/** @override */
|
||||
Node.prototype.addEventListener = function(type, listener, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_useCapture
|
||||
* @override
|
||||
* @return {undefined}
|
||||
*/
|
||||
Node.prototype.removeEventListener = function(type, listener, opt_useCapture) {};
|
||||
/** @override */
|
||||
Node.prototype.removeEventListener = function(type, listener, opt_options) {};
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @return {boolean}
|
||||
*/
|
||||
/** @override */
|
||||
Node.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
/**
|
||||
@@ -207,14 +195,16 @@ Node.prototype.previousSibling;
|
||||
|
||||
/**
|
||||
* @param {Node} newChild
|
||||
* @return {Node}
|
||||
* @return {!Node}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-appendChild
|
||||
*/
|
||||
Node.prototype.appendChild = function(newChild) {};
|
||||
|
||||
/**
|
||||
* @param {boolean} deep
|
||||
* @return {!Node}
|
||||
* @return {THIS}
|
||||
* @this {THIS}
|
||||
* @template THIS
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-cloneNode
|
||||
* @nosideeffects
|
||||
*/
|
||||
@@ -251,79 +241,73 @@ Node.prototype.removeChild = function(oldChild) {};
|
||||
Node.prototype.replaceChild = function(newChild, oldChild) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.ATTRIBUTE_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.CDATA_SECTION_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.COMMENT_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.DOCUMENT_FRAGMENT_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.DOCUMENT_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.DOCUMENT_TYPE_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.ELEMENT_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.ENTITY_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.ENTITY_REFERENCE_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.PROCESSING_INSTRUCTION_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.TEXT_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.XPATH_NAMESPACE_NODE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
|
||||
*/
|
||||
Node.NOTATION_NODE;
|
||||
@@ -349,7 +333,7 @@ function Document() {}
|
||||
Document.prototype.doctype;
|
||||
|
||||
/**
|
||||
* @type {!Element}
|
||||
* @type {!HTMLHtmlElement}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-documentElement
|
||||
*/
|
||||
Document.prototype.documentElement;
|
||||
@@ -395,25 +379,17 @@ Document.prototype.createDocumentFragment = function() {};
|
||||
* Create a DOM element.
|
||||
*
|
||||
* Web components introduced the second parameter as a way of extending existing
|
||||
* tags (e.g. document.createElement('button', 'fancy-button')).
|
||||
* tags (e.g. document.createElement('button', {is: 'fancy-button'})).
|
||||
*
|
||||
* @param {string} tagName
|
||||
* @param {string=} opt_typeExtension
|
||||
* @param {({is: string}|string)=} opt_typeExtension
|
||||
* @return {!Element}
|
||||
* @nosideeffects
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createElement
|
||||
* @see http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-instantiate
|
||||
* @see https://dom.spec.whatwg.org/#dom-document-createelement
|
||||
*/
|
||||
Document.prototype.createElement = function(tagName, opt_typeExtension) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {!EntityReference}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createEntityReference
|
||||
* @nosideeffects
|
||||
*/
|
||||
Document.prototype.createEntityReference = function(name) {};
|
||||
|
||||
/**
|
||||
* @param {string} target
|
||||
* @param {string} data
|
||||
@@ -439,6 +415,32 @@ Document.prototype.createTextNode = function(data) {};
|
||||
*/
|
||||
Document.prototype.getElementsByTagName = function(tagname) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/open
|
||||
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-open
|
||||
*/
|
||||
Document.prototype.open;
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-close
|
||||
*/
|
||||
Document.prototype.close = function() {};
|
||||
|
||||
/**
|
||||
* @param {!TrustedHTML|string} text
|
||||
* @return {undefined}
|
||||
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-write
|
||||
*/
|
||||
Document.prototype.write = function(text) {};
|
||||
|
||||
/**
|
||||
* @param {!TrustedHTML|string} text
|
||||
* @return {undefined}
|
||||
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-writeln
|
||||
*/
|
||||
Document.prototype.writeln = function(text) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {IArrayLike<T>}
|
||||
@@ -461,6 +463,33 @@ NodeList.prototype.length;
|
||||
*/
|
||||
NodeList.prototype.item = function(index) {};
|
||||
|
||||
/**
|
||||
* @param {?function(this:S, T, number, !NodeList<T>): ?} callback
|
||||
* @param {S=} opt_thisobj
|
||||
* @template S
|
||||
* @return {undefined}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
|
||||
*/
|
||||
NodeList.prototype.forEach = function(callback, opt_thisobj) {};
|
||||
|
||||
/**
|
||||
* @return {!IteratorIterable<!Array<number|T>>}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/entries
|
||||
*/
|
||||
NodeList.prototype.entries = function() {};
|
||||
|
||||
/**
|
||||
* @return {!IteratorIterable<number>}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/keys
|
||||
*/
|
||||
NodeList.prototype.keys = function() {};
|
||||
|
||||
/**
|
||||
* @return {!IteratorIterable<T>}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/values
|
||||
*/
|
||||
NodeList.prototype.values = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {IObject<(string|number), T>}
|
||||
@@ -599,6 +628,13 @@ Attr.prototype.value;
|
||||
*/
|
||||
function Element() {}
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see https://dom.spec.whatwg.org/index.html#dom-element-id
|
||||
*/
|
||||
Element.prototype.id;
|
||||
|
||||
/**
|
||||
* An Element always contains a non-null NamedNodeMap containing the attributes
|
||||
* of this node.
|
||||
@@ -626,13 +662,13 @@ Element.prototype.className;
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {number?=} opt_flags
|
||||
* @param {?number=} flags
|
||||
* @return {string}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-getAttribute
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
|
||||
* @nosideeffects
|
||||
*/
|
||||
Element.prototype.getAttribute = function(name, opt_flags) {};
|
||||
Element.prototype.getAttribute = function(name, flags) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
@@ -666,9 +702,9 @@ Element.prototype.removeAttributeNode = function(oldAttr) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {string|number|boolean} value Values are converted to strings with
|
||||
* ToString, so we accept number and boolean since both convert easily to
|
||||
* strings.
|
||||
* @param {string|number|boolean|!TrustedHTML|!TrustedScriptURL}
|
||||
* value Values are converted to strings with ToString, so we accept number
|
||||
* and boolean since both convert easily to strings.
|
||||
* @return {undefined}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-setAttribute
|
||||
*/
|
||||
@@ -706,8 +742,8 @@ Element.prototype.setAttributeNode = function(newAttr) {};
|
||||
/** @type {?function (Event)} */ Element.prototype.onkeydown;
|
||||
/** @type {?function (Event)} */ Element.prototype.onkeypress;
|
||||
/** @type {?function (Event)} */ Element.prototype.onkeyup;
|
||||
/** @type {?function (Event)} */ Element.prototype.onload;
|
||||
/** @type {?function (Event)} */ Element.prototype.onunload;
|
||||
/** @type {?function (Event): void} */ Element.prototype.onload;
|
||||
/** @type {?function (Event): void} */ Element.prototype.onunload;
|
||||
/** @type {?function (Event)} */ Element.prototype.onmousedown;
|
||||
/** @type {?function (Event)} */ Element.prototype.onmousemove;
|
||||
/** @type {?function (Event)} */ Element.prototype.onmouseout;
|
||||
@@ -726,9 +762,10 @@ Element.prototype.setAttributeNode = function(newAttr) {};
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {CharacterData}
|
||||
* @param {string=} contents Optional textual content.
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1312295772
|
||||
*/
|
||||
function Text() {}
|
||||
function Text(contents) {}
|
||||
|
||||
/**
|
||||
* @param {number} offset
|
||||
@@ -758,75 +795,12 @@ function CDATASection() {}
|
||||
*/
|
||||
function DocumentType() {}
|
||||
|
||||
/**
|
||||
* @type {NamedNodeMap<!Entity>}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1788794630
|
||||
*/
|
||||
DocumentType.prototype.entities;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1844763134
|
||||
*/
|
||||
DocumentType.prototype.name;
|
||||
|
||||
/**
|
||||
* @type {NamedNodeMap<!Notation>}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D46829EF
|
||||
*/
|
||||
DocumentType.prototype.notations;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Node}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-5431D1B9
|
||||
*/
|
||||
function Notation() {}
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-54F2B4D0
|
||||
*/
|
||||
Notation.prototype.publicId;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-E8AAB1D0
|
||||
*/
|
||||
Notation.prototype.systemId;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Node}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-527DCFF2
|
||||
*/
|
||||
function Entity() {}
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D7303025
|
||||
*/
|
||||
Entity.prototype.publicId;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D7C29F3E
|
||||
*/
|
||||
Entity.prototype.systemId;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6ABAEB38
|
||||
*/
|
||||
Entity.prototype.notationName;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Node}
|
||||
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-11C98490
|
||||
*/
|
||||
function EntityReference() {}
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Node}
|
||||
@@ -854,25 +828,13 @@ ProcessingInstruction.prototype.target;
|
||||
function Window() {}
|
||||
Window.prototype.Window;
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_useCapture
|
||||
* @override
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.addEventListener = function(type, listener, opt_useCapture) {};
|
||||
/** @override */
|
||||
Window.prototype.addEventListener = function(type, listener, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_useCapture
|
||||
* @override
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.removeEventListener = function(type, listener, opt_useCapture)
|
||||
{};
|
||||
/** @override */
|
||||
Window.prototype.removeEventListener = function(type, listener, opt_options) {};
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @return {boolean}
|
||||
*/
|
||||
/** @override */
|
||||
Window.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
/** @type {?function (Event)} */ Window.prototype.onabort;
|
||||
@@ -885,9 +847,11 @@ Window.prototype.dispatchEvent = function(evt) {};
|
||||
/** @type {?function (Event)} */ Window.prototype.ondblclick;
|
||||
/** @type {?function (Event)} */ Window.prototype.ondragdrop;
|
||||
// onerror has a special signature.
|
||||
// See https://developer.mozilla.org/en/DOM/window.onerror
|
||||
// and http://msdn.microsoft.com/en-us/library/cc197053(VS.85).aspx
|
||||
/** @type {?function (string, string, number)} */
|
||||
// See
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror
|
||||
/**
|
||||
* @type {?function (string, string, number, number, !Error):?}
|
||||
*/
|
||||
Window.prototype.onerror;
|
||||
/** @type {?function (Event)} */ Window.prototype.onfocus;
|
||||
/** @type {?function (Event)} */ Window.prototype.onhashchange;
|
||||
@@ -908,5 +872,7 @@ Window.prototype.onerror;
|
||||
/** @type {?function (Event)} */ Window.prototype.onscroll;
|
||||
/** @type {?function (Event)} */ Window.prototype.onselect;
|
||||
/** @type {?function (Event=)} */ Window.prototype.onsubmit;
|
||||
/** @type {?function (Event)} */ Window.prototype.onunhandledrejection;
|
||||
/** @type {?function (Event)} */ Window.prototype.onunload;
|
||||
/** @type {?function (Event)} */ Window.prototype.onwheel;
|
||||
/** @type {?function (Event)} */ Window.prototype.onstorage;
|
||||
|
||||
@@ -51,6 +51,32 @@ Document.prototype.createElementNS =
|
||||
Document.prototype.createAttributeNS =
|
||||
function(namespaceURI, qualifiedName) {};
|
||||
|
||||
/**
|
||||
* @param {Node} root
|
||||
* @param {number=} whatToShow
|
||||
* @param {NodeFilter=} filter
|
||||
* @param {boolean=} entityReferenceExpansion
|
||||
* @return {!NodeIterator}
|
||||
* @see https://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/traversal.html#Traversal-Document
|
||||
* @see https://dom.spec.whatwg.org/#interface-document
|
||||
* @nosideeffects
|
||||
*/
|
||||
Document.prototype.createNodeIterator = function(
|
||||
root, whatToShow, filter, entityReferenceExpansion) {};
|
||||
|
||||
/**
|
||||
* @param {Node} root
|
||||
* @param {number=} whatToShow
|
||||
* @param {NodeFilter=} filter
|
||||
* @param {boolean=} entityReferenceExpansion
|
||||
* @return {!TreeWalker}
|
||||
* @see https://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/traversal.html#Traversal-Document
|
||||
* @see https://dom.spec.whatwg.org/#interface-document
|
||||
* @nosideeffects
|
||||
*/
|
||||
Document.prototype.createTreeWalker = function(
|
||||
root, whatToShow, filter, entityReferenceExpansion) {};
|
||||
|
||||
/**
|
||||
* @param {string} namespace
|
||||
* @param {string} name
|
||||
@@ -61,9 +87,9 @@ Document.prototype.createAttributeNS =
|
||||
Document.prototype.getElementsByTagNameNS = function(namespace, name) {};
|
||||
|
||||
/**
|
||||
* @param {Node} externalNode
|
||||
* @param {boolean} deep
|
||||
* @return {Node}
|
||||
* @param {!Node} externalNode
|
||||
* @param {boolean=} deep
|
||||
* @return {!Node}
|
||||
* @see https://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/core.html#Core-Document-importNode
|
||||
*/
|
||||
Document.prototype.importNode = function(externalNode, deep) {};
|
||||
@@ -72,6 +98,7 @@ Document.prototype.importNode = function(externalNode, deep) {};
|
||||
* @constructor
|
||||
* @implements {IObject<(string|number),T>}
|
||||
* @implements {IArrayLike<T>}
|
||||
* @implements {Iterable<T>}
|
||||
* @template T
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75708506
|
||||
*/
|
||||
@@ -101,26 +128,44 @@ HTMLCollection.prototype.namedItem = function(name) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {IObject<(string|number),HTMLOptionElement>}
|
||||
* @implements {IArrayLike<!HTMLOptionElement>}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-HTML/html.html#HTMLOptionsCollection
|
||||
* @extends {HTMLCollection<HTMLOptionElement>}
|
||||
* @see https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#htmloptionscollection
|
||||
*/
|
||||
function HTMLOptionsCollection() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-HTML/html.html#HTMLOptionsCollection-length
|
||||
* @see https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmloptionscollection-length
|
||||
* @nosideeffects
|
||||
*/
|
||||
HTMLOptionsCollection.prototype.length;
|
||||
|
||||
/**
|
||||
* @param {HTMLOptionElement|HTMLOptGroupElement} element
|
||||
* @param {HTMLElement|number=} before
|
||||
* @return {undefined}
|
||||
* @see https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmloptionscollection-add
|
||||
*/
|
||||
HTMLOptionsCollection.prototype.add = function(element, before) {};
|
||||
|
||||
/**
|
||||
* NOTE(tjgq): The HTMLOptionsCollection#item method is inherited from
|
||||
* HTMLCollection, but it must be declared explicitly to work around an error
|
||||
* when building a jsinterop library for GWT.
|
||||
* @param {number} index
|
||||
* @return {Node}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-HTML/html.html#HTMLOptionsCollection-item
|
||||
* @return {HTMLOptionElement}
|
||||
* @override
|
||||
* @nosideeffects
|
||||
*/
|
||||
HTMLOptionsCollection.prototype.item = function(index) {};
|
||||
|
||||
/**
|
||||
* @param {number} index
|
||||
* @return {undefined}
|
||||
* @see https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmloptionscollection-remove
|
||||
*/
|
||||
HTMLOptionsCollection.prototype.remove = function(index) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Document}
|
||||
@@ -205,29 +250,6 @@ HTMLDocument.prototype.cookie;
|
||||
*/
|
||||
HTMLDocument.prototype.open = function(opt_mimeType, opt_replace) {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-98948567
|
||||
* @override
|
||||
*/
|
||||
HTMLDocument.prototype.close = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} text
|
||||
* @return {undefined}
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75233634
|
||||
* @override
|
||||
*/
|
||||
HTMLDocument.prototype.write = function(text) {};
|
||||
|
||||
/**
|
||||
* @param {string} text
|
||||
* @return {undefined}
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-35318390
|
||||
* @override
|
||||
*/
|
||||
HTMLDocument.prototype.writeln = function(text) {};
|
||||
|
||||
/**
|
||||
* @param {string} elementName
|
||||
* @return {!NodeList<!Element>}
|
||||
@@ -236,30 +258,6 @@ HTMLDocument.prototype.writeln = function(text) {};
|
||||
*/
|
||||
HTMLDocument.prototype.getElementsByName = function(elementName) {};
|
||||
|
||||
/**
|
||||
* @param {Node} root
|
||||
* @param {number=} whatToShow
|
||||
* @param {NodeFilter=} filter
|
||||
* @param {boolean=} entityReferenceExpansion
|
||||
* @return {!NodeIterator}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-Document
|
||||
* @nosideeffects
|
||||
*/
|
||||
HTMLDocument.prototype.createNodeIterator = function(
|
||||
root, whatToShow, filter, entityReferenceExpansion) {};
|
||||
|
||||
/**
|
||||
* @param {Node} root
|
||||
* @param {number=} whatToShow
|
||||
* @param {NodeFilter=} filter
|
||||
* @param {boolean=} entityReferenceExpansion
|
||||
* @return {!TreeWalker}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-Document
|
||||
* @nosideeffects
|
||||
*/
|
||||
HTMLDocument.prototype.createTreeWalker = function(
|
||||
root, whatToShow, filter, entityReferenceExpansion) {};
|
||||
|
||||
|
||||
/** @typedef {{
|
||||
createNodeIterator: function(Node, number=, NodeFilter=, boolean=) : NodeIterator,
|
||||
@@ -268,7 +266,7 @@ HTMLDocument.prototype.createTreeWalker = function(
|
||||
var TraversalDocument;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @record
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeFilter
|
||||
*/
|
||||
function NodeFilter() {}
|
||||
@@ -405,13 +403,6 @@ TreeWalker.prototype.currentNode;
|
||||
*/
|
||||
function HTMLElement() {}
|
||||
|
||||
/**
|
||||
* @implicitCast
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-63534901
|
||||
*/
|
||||
HTMLElement.prototype.id;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-78276800
|
||||
@@ -497,6 +488,7 @@ HTMLLinkElement.prototype.charset;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-33532588
|
||||
*/
|
||||
HTMLLinkElement.prototype.href;
|
||||
@@ -540,6 +532,12 @@ HTMLLinkElement.prototype.type;
|
||||
/** @type {StyleSheet} */
|
||||
HTMLLinkElement.prototype.sheet;
|
||||
|
||||
/**
|
||||
* @type {!DOMTokenList}
|
||||
* @see https://github.com/WICG/webpackage/blob/master/explainers/subresource-loading.md
|
||||
*/
|
||||
HTMLLinkElement.prototype.resources;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {HTMLElement}
|
||||
@@ -593,6 +591,7 @@ function HTMLBaseElement() {}
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-65382887
|
||||
*/
|
||||
HTMLBaseElement.prototype.href;
|
||||
@@ -710,7 +709,6 @@ function HTMLFormControlsCollection() {}
|
||||
* @see https://html.spec.whatwg.org/multipage/infrastructure.html#dom-htmlformcontrolscollection-nameditem
|
||||
* @nosideeffects
|
||||
* @override
|
||||
* @suppress {newCheckTypes}
|
||||
*/
|
||||
HTMLFormControlsCollection.prototype.namedItem = function(name) {};
|
||||
|
||||
@@ -722,7 +720,7 @@ HTMLFormControlsCollection.prototype.namedItem = function(name) {};
|
||||
function HTMLFormElement() {}
|
||||
|
||||
/**
|
||||
* @type {HTMLFormControlsCollection<!HTMLElement>}
|
||||
* @type {!HTMLFormControlsCollection<!HTMLElement>}
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-76728479
|
||||
*/
|
||||
HTMLFormElement.prototype.elements;
|
||||
@@ -747,6 +745,7 @@ HTMLFormElement.prototype.acceptCharset;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-74049184
|
||||
*/
|
||||
HTMLFormElement.prototype.action;
|
||||
@@ -954,6 +953,20 @@ HTMLOptionElement.prototype.text;
|
||||
*/
|
||||
HTMLOptionElement.prototype.value;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {HTMLOptionElement}
|
||||
* @param {*=} opt_text
|
||||
* @param {*=} opt_value
|
||||
* @param {*=} opt_defaultSelected
|
||||
* @param {*=} opt_selected
|
||||
*/
|
||||
function Option(opt_text, opt_value, opt_defaultSelected, opt_selected) {}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {HTMLElement}
|
||||
@@ -1041,6 +1054,7 @@ HTMLInputElement.prototype.size;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-97320704
|
||||
*/
|
||||
HTMLInputElement.prototype.src;
|
||||
@@ -1618,6 +1632,7 @@ HTMLAnchorElement.prototype.coords;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-88517319
|
||||
*/
|
||||
HTMLAnchorElement.prototype.href;
|
||||
@@ -1803,6 +1818,7 @@ HTMLObjectElement.prototype.code;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-25709136
|
||||
*/
|
||||
HTMLObjectElement.prototype.codeBase;
|
||||
@@ -1821,6 +1837,7 @@ HTMLObjectElement.prototype.contentDocument;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-81766986
|
||||
*/
|
||||
HTMLObjectElement.prototype.data;
|
||||
@@ -2045,6 +2062,7 @@ HTMLAreaElement.prototype.coords;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-34672936
|
||||
*/
|
||||
HTMLAreaElement.prototype.href;
|
||||
@@ -2104,14 +2122,21 @@ HTMLScriptElement.prototype.event;
|
||||
*/
|
||||
HTMLScriptElement.prototype.htmlFor;
|
||||
|
||||
/**
|
||||
* @type {?function(!Event)}
|
||||
*/
|
||||
HTMLScriptElement.prototype.onreadystatechange;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75147231
|
||||
*/
|
||||
HTMLScriptElement.prototype.src;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-46872999
|
||||
*/
|
||||
HTMLScriptElement.prototype.text;
|
||||
@@ -2436,7 +2461,7 @@ HTMLTableRowElement.prototype.deleteCell = function(index) {};
|
||||
|
||||
/**
|
||||
* @param {number} index
|
||||
* @return {HTMLElement}
|
||||
* @return {!HTMLElement}
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-68927016
|
||||
*/
|
||||
HTMLTableRowElement.prototype.insertCell = function(index) {};
|
||||
@@ -2616,6 +2641,7 @@ HTMLFrameElement.prototype.scrolling;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-78799535
|
||||
*/
|
||||
HTMLFrameElement.prototype.src;
|
||||
@@ -2684,6 +2710,7 @@ HTMLIFrameElement.prototype.scrolling;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-43933957
|
||||
*/
|
||||
HTMLIFrameElement.prototype.src;
|
||||
@@ -2696,31 +2723,253 @@ HTMLIFrameElement.prototype.src;
|
||||
HTMLIFrameElement.prototype.width;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.INVALID_STATE_ERR = 11;
|
||||
DOMException.INVALID_STATE_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.SYNTAX_ERR = 12;
|
||||
DOMException.SYNTAX_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.INVALID_MODIFICATION_ERR = 13;
|
||||
DOMException.INVALID_MODIFICATION_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.NAMESPACE_ERR = 14;
|
||||
DOMException.NAMESPACE_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.INVALID_ACCESS_ERR = 15;
|
||||
DOMException.INVALID_ACCESS_ERR;
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.closed
|
||||
*/
|
||||
Window.prototype.closed;
|
||||
|
||||
/**
|
||||
* @type {HTMLObjectElement|HTMLIFrameElement|null}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.frameElement
|
||||
*/
|
||||
Window.prototype.frameElement;
|
||||
|
||||
/**
|
||||
* Allows lookup of frames by index or by name.
|
||||
* @type {!Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.frames
|
||||
*/
|
||||
Window.prototype.frames;
|
||||
|
||||
/**
|
||||
* @type {!History}
|
||||
* @suppress {duplicate}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.history
|
||||
*/
|
||||
var history;
|
||||
|
||||
/**
|
||||
* @type {!History}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.history
|
||||
*/
|
||||
Window.prototype.history;
|
||||
|
||||
/**
|
||||
* Returns the number of frames (either frame or iframe elements) in the
|
||||
* window.
|
||||
*
|
||||
* @type {number}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.length
|
||||
*/
|
||||
Window.prototype.length;
|
||||
|
||||
/**
|
||||
* Location has an exception in the DeclaredGlobalExternsOnWindow pass
|
||||
* so we have to manually include it:
|
||||
* https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/DeclaredGlobalExternsOnWindow.java#L116
|
||||
*
|
||||
* @type {!Location}
|
||||
* @implicitCast
|
||||
* @see https://developer.mozilla.org/en/DOM/window.location
|
||||
*/
|
||||
Window.prototype.location;
|
||||
|
||||
/**
|
||||
|
||||
* @type {string}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.name
|
||||
*/
|
||||
Window.prototype.name;
|
||||
|
||||
/**
|
||||
* @type {!Navigator}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.navigator
|
||||
*/
|
||||
Window.prototype.navigator;
|
||||
|
||||
/**
|
||||
* @type {?Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.opener
|
||||
*/
|
||||
Window.prototype.opener;
|
||||
|
||||
/**
|
||||
* @type {!Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.parent
|
||||
*/
|
||||
Window.prototype.parent;
|
||||
|
||||
/**
|
||||
* @type {!Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.self
|
||||
*/
|
||||
Window.prototype.self;
|
||||
|
||||
/**
|
||||
* @type {?string}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.status
|
||||
*/
|
||||
Window.prototype.status;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @see https://html.spec.whatwg.org/multipage/window-object.html#the-status-bar-barprop-object
|
||||
*/
|
||||
function BarProp() {}
|
||||
|
||||
/** @const {boolean} */
|
||||
BarProp.prototype.visible;
|
||||
|
||||
/**
|
||||
* @type {!BarProp}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.locationbar
|
||||
*/
|
||||
Window.prototype.locationbar;
|
||||
|
||||
/**
|
||||
* @type {!BarProp}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.menubar
|
||||
*/
|
||||
Window.prototype.menubar;
|
||||
|
||||
/**
|
||||
* @type {!BarProp}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.personalbar
|
||||
*/
|
||||
Window.prototype.personalbar;
|
||||
|
||||
|
||||
/**
|
||||
* @type {!BarProp}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.scrollbars
|
||||
*/
|
||||
Window.prototype.scrollbars;
|
||||
|
||||
/**
|
||||
* @type {!BarProp}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.statusbar
|
||||
*/
|
||||
Window.prototype.statusbar;
|
||||
|
||||
/**
|
||||
* @type {!BarProp}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.toolbar
|
||||
*/
|
||||
Window.prototype.toolbar;
|
||||
|
||||
/**
|
||||
* @type {!Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.self
|
||||
*/
|
||||
Window.prototype.top;
|
||||
|
||||
/**
|
||||
* @type {!Window}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.self
|
||||
*/
|
||||
Window.prototype.window;
|
||||
|
||||
/**
|
||||
* @param {*} message
|
||||
* @see https://developer.mozilla.org/en/DOM/window.alert
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.alert = function(message) {};
|
||||
|
||||
/**
|
||||
* @param {*} message
|
||||
* @return {boolean}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.confirm
|
||||
*/
|
||||
Window.prototype.confirm = function(message) {};
|
||||
|
||||
/**
|
||||
* @param {string} message
|
||||
* @param {string=} value
|
||||
* @return {?string}
|
||||
* @see https://developer.mozilla.org/en/DOM/window.prompt
|
||||
*/
|
||||
Window.prototype.prompt = function(message, value) {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.blur
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.blur = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.close
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.close = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en/DOM/window.focus
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.focus = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/print
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.print = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/stop
|
||||
* @return {undefined}
|
||||
*/
|
||||
Window.prototype.stop = function() {};
|
||||
|
||||
/**
|
||||
* @param {*=} url
|
||||
* @param {string=} windowName
|
||||
* @param {string=} windowFeatures
|
||||
* @param {boolean=} replace
|
||||
* @return {Window}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx
|
||||
*/
|
||||
Window.prototype.open = function(url, windowName, windowFeatures, replace) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML
|
||||
* @implicitCast
|
||||
*/
|
||||
Element.prototype.innerHTML;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @implicitCast
|
||||
* @see https://w3c.github.io/DOM-Parsing/#extensions-to-the-element-interface
|
||||
*/
|
||||
Element.prototype.outerHTML;
|
||||
|
||||
@@ -32,16 +32,16 @@
|
||||
DOMException.prototype.code;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.VALIDATION_ERR = 16;
|
||||
DOMException.VALIDATION_ERR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF
|
||||
*/
|
||||
DOMException.TYPE_MISMATCH_ERR = 17;
|
||||
DOMException.TYPE_MISMATCH_ERR;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -72,52 +72,6 @@ DOMStringList.prototype.contains = function(str) {};
|
||||
*/
|
||||
DOMStringList.prototype.item = function(index) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {IArrayLike<string>}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList
|
||||
*/
|
||||
function NameList() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-length
|
||||
*/
|
||||
NameList.prototype.length;
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @return {boolean}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-contains
|
||||
* @nosideeffects
|
||||
*/
|
||||
NameList.prototype.contains = function(str) {};
|
||||
|
||||
/**
|
||||
* @param {?string} namespaceURI
|
||||
* @param {string} name
|
||||
* @return {boolean}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-containsNS
|
||||
* @nosideeffects
|
||||
*/
|
||||
NameList.prototype.containsNS = function(namespaceURI, name) {};
|
||||
|
||||
/**
|
||||
* @param {number} index
|
||||
* @return {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-getName
|
||||
* @nosideeffects
|
||||
*/
|
||||
NameList.prototype.getName = function(index) {};
|
||||
|
||||
/**
|
||||
* @param {number} index
|
||||
* @return {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-getNamespaceURI
|
||||
* @nosideeffects
|
||||
*/
|
||||
NameList.prototype.getNamespaceURI = function(index) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {IArrayLike<!DOMImplementation>}
|
||||
@@ -148,9 +102,9 @@ function DOMImplementationSource() {}
|
||||
/**
|
||||
* @param {?string} namespaceURI
|
||||
* @param {string} publicId
|
||||
* @param {DocumentType} doctype
|
||||
* @param {DocumentType=} doctype
|
||||
* @return {Document}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocument
|
||||
* @see https://dom.spec.whatwg.org/#ref-for-dom-domimplementation-createdocument%E2%91%A0
|
||||
* @nosideeffects
|
||||
*/
|
||||
DOMImplementation.prototype.createDocument = function(namespaceURI, publicId, doctype) {};
|
||||
@@ -181,15 +135,6 @@ DOMImplementationSource.prototype.getDOMImplementation = function(features) {};
|
||||
*/
|
||||
DOMImplementationSource.prototype.getDOMImplementationList = function(features) {};
|
||||
|
||||
/**
|
||||
* @param {string} feature
|
||||
* @param {string} version
|
||||
* @return {Object}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementation3-getFeature
|
||||
* @nosideeffects
|
||||
*/
|
||||
DOMImplementation.prototype.getFeature = function(feature, version) {};
|
||||
|
||||
/**
|
||||
* @param {Node} externalNode
|
||||
* @return {Node}
|
||||
@@ -203,24 +148,12 @@ Document.prototype.adoptNode = function(externalNode) {};
|
||||
*/
|
||||
Document.prototype.documentURI;
|
||||
|
||||
/**
|
||||
* @type {DOMConfiguration}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-domConfig
|
||||
*/
|
||||
Document.prototype.domConfig;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-inputEncoding
|
||||
*/
|
||||
Document.prototype.inputEncoding;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-strictErrorChecking
|
||||
*/
|
||||
Document.prototype.strictErrorChecking;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-encoding
|
||||
@@ -239,21 +172,6 @@ Document.prototype.xmlStandalone;
|
||||
*/
|
||||
Document.prototype.xmlVersion;
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-normalizeDocument
|
||||
*/
|
||||
Document.prototype.normalizeDocument = function() {};
|
||||
|
||||
/**
|
||||
* @param {Node} n
|
||||
* @param {?string} namespaceURI
|
||||
* @param {string} qualifiedName
|
||||
* @return {Node}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-renameNode
|
||||
*/
|
||||
Document.prototype.renameNode = function(n, namespaceURI, qualifiedName) {};
|
||||
|
||||
/**
|
||||
* @type {?string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-baseURI
|
||||
@@ -286,40 +204,40 @@ Node.prototype.prefix;
|
||||
Node.prototype.textContent;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_DISCONNECTED
|
||||
*/
|
||||
Node.DOCUMENT_POSITION_DISCONNECTED = 0x01;
|
||||
Node.DOCUMENT_POSITION_DISCONNECTED;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_PRECEDING
|
||||
*/
|
||||
Node.DOCUMENT_POSITION_PRECEDING = 0x02;
|
||||
Node.DOCUMENT_POSITION_PRECEDING;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_FOLLOWING
|
||||
*/
|
||||
Node.DOCUMENT_POSITION_FOLLOWING = 0x04;
|
||||
Node.DOCUMENT_POSITION_FOLLOWING;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_CONTAINS
|
||||
*/
|
||||
Node.DOCUMENT_POSITION_CONTAINS = 0x08;
|
||||
Node.DOCUMENT_POSITION_CONTAINS;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_CONTAINED_BY
|
||||
*/
|
||||
Node.DOCUMENT_POSITION_CONTAINED_BY = 0x10;
|
||||
Node.DOCUMENT_POSITION_CONTAINED_BY;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
|
||||
*/
|
||||
Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
|
||||
Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;
|
||||
|
||||
/**
|
||||
* @param {Node} other
|
||||
@@ -377,15 +295,6 @@ Node.prototype.isEqualNode = function(arg) {};
|
||||
*/
|
||||
Node.prototype.isSameNode = function(other) {};
|
||||
|
||||
/**
|
||||
* @param {string} feature
|
||||
* @param {string} version
|
||||
* @return {boolean}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-Node-supports
|
||||
* @nosideeffects
|
||||
*/
|
||||
Node.prototype.isSupported = function(feature, version) {};
|
||||
|
||||
/**
|
||||
* @param {string} prefix
|
||||
* @return {string}
|
||||
@@ -408,15 +317,6 @@ Node.prototype.lookupPrefix = function(namespaceURI) {};
|
||||
*/
|
||||
Node.prototype.normalize = function() {};
|
||||
|
||||
/**
|
||||
* @param {Object} key
|
||||
* @param {Object} data
|
||||
* @param {UserDataHandler} handler
|
||||
* @return {Object}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-setUserData'
|
||||
*/
|
||||
Node.prototype.setUserData = function(key, data, handler) {};
|
||||
|
||||
/**
|
||||
* @param {string} query
|
||||
* @return {?Element}
|
||||
@@ -445,18 +345,6 @@ Attr.prototype.ownerElement;
|
||||
*/
|
||||
Attr.prototype.isId;
|
||||
|
||||
/**
|
||||
* @type {TypeInfo}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Attr-schemaTypeInfo
|
||||
*/
|
||||
Attr.prototype.schemaTypeInfo;
|
||||
|
||||
/**
|
||||
* @type {TypeInfo}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Element-schemaTypeInfo
|
||||
*/
|
||||
Element.prototype.schemaTypeInfo;
|
||||
|
||||
/**
|
||||
* @param {?string} namespaceURI
|
||||
* @param {string} localName
|
||||
@@ -527,144 +415,12 @@ Element.prototype.setAttributeNodeNS = function(newAttr) {};
|
||||
*/
|
||||
Element.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {boolean} isId
|
||||
* @return {undefined}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetIdAttr
|
||||
*/
|
||||
Element.prototype.setIdAttribute = function(name, isId) {};
|
||||
|
||||
/**
|
||||
* @param {Attr} idAttr
|
||||
* @param {boolean} isId
|
||||
* @return {undefined}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetIdAttrNode
|
||||
*/
|
||||
Element.prototype.setIdAttributeNode = function(idAttr, isId) {};
|
||||
|
||||
/**
|
||||
* @param {?string} namespaceURI
|
||||
* @param {string} localName
|
||||
* @param {boolean} isId
|
||||
* @return {undefined}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetIdAttrNS
|
||||
*/
|
||||
Element.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Text3-wholeText
|
||||
*/
|
||||
Text.prototype.wholeText;
|
||||
|
||||
/**
|
||||
* @param {string} newText
|
||||
* @return {Text}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Text3-replaceWholeText
|
||||
*/
|
||||
Text.prototype.replaceWholeText = function(newText) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo
|
||||
*/
|
||||
function TypeInfo() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_EXTENSION
|
||||
*/
|
||||
TypeInfo.prototype.DERIVATION_EXTENSION;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_LIST
|
||||
*/
|
||||
TypeInfo.prototype.DERIVATION_LIST;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_RESTRICTION
|
||||
*/
|
||||
TypeInfo.prototype.DERIVATION_RESTRICTION;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_UNION
|
||||
*/
|
||||
TypeInfo.prototype.DERIVATION_UNION;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-typeName
|
||||
*/
|
||||
TypeInfo.prototype.typeName;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-typeNamespace
|
||||
*/
|
||||
TypeInfo.prototype.typeNamespace;
|
||||
|
||||
/**
|
||||
* @param {string} typeNamespaceArg
|
||||
* @param {string} typeNameArg
|
||||
* @param {number} derivationMethod
|
||||
* @return {boolean}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-isDerivedFrom
|
||||
* @nosideeffects
|
||||
*/
|
||||
TypeInfo.prototype.isDerivedFrom = function(typeNamespaceArg, typeNameArg, derivationMethod) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler
|
||||
*/
|
||||
function UserDataHandler() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-CLONED
|
||||
*/
|
||||
UserDataHandler.prototype.NODE_CLONED = 1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-IMPORTED
|
||||
*/
|
||||
UserDataHandler.prototype.NODE_IMPORTED = 2;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-DELETED
|
||||
*/
|
||||
UserDataHandler.prototype.NODE_DELETED = 3;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-RENAMED
|
||||
*/
|
||||
UserDataHandler.prototype.NODE_RENAMED = 4;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-ADOPTED
|
||||
*/
|
||||
UserDataHandler.prototype.NODE_ADOPTED = 5;
|
||||
|
||||
/**
|
||||
* @param {number} operation
|
||||
* @param {string} key
|
||||
* @param {*=} opt_data
|
||||
* @param {?Node=} opt_src
|
||||
* @param {?Node=} opt_dst
|
||||
* @return {undefined}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-handleUserDataEvent
|
||||
*/
|
||||
UserDataHandler.prototype.handle = function(operation, key, opt_data,
|
||||
opt_src, opt_dst) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-Interfaces-DOMError
|
||||
@@ -696,22 +452,22 @@ DOMError.prototype.relatedData;
|
||||
DOMError.prototype.relatedException;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-severity-warning
|
||||
*/
|
||||
DOMError.SEVERITY_WARNING = 1;
|
||||
DOMError.SEVERITY_WARNING;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-severity-error
|
||||
*/
|
||||
DOMError.SEVERITY_ERROR = 2;
|
||||
DOMError.SEVERITY_ERROR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-severity-fatal-error
|
||||
*/
|
||||
DOMError.SEVERITY_FATAL_ERROR = 3;
|
||||
DOMError.SEVERITY_FATAL_ERROR;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -786,48 +542,6 @@ DOMLocator.prototype.uri;
|
||||
*/
|
||||
DOMLocator.prototype.utf16Offset;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration
|
||||
*/
|
||||
function DOMConfiguration() {}
|
||||
|
||||
/**
|
||||
* @type {DOMStringList}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-parameterNames
|
||||
*/
|
||||
DOMConfiguration.prototype.parameterNames;
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {boolean}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-canSetParameter
|
||||
* @nosideeffects
|
||||
*/
|
||||
DOMConfiguration.prototype.canSetParameter = function(name) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {*}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-getParameter
|
||||
* @nosideeffects
|
||||
*/
|
||||
DOMConfiguration.prototype.getParameter = function(name) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {*} value
|
||||
* @return {*}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-property
|
||||
*/
|
||||
DOMConfiguration.prototype.setParameter = function(name, value) {};
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-Core-DocType-internalSubset
|
||||
*/
|
||||
DocumentType.prototype.internalSubset;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-Core-DocType-publicId
|
||||
@@ -839,21 +553,3 @@ DocumentType.prototype.publicId;
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-Core-DocType-systemId
|
||||
*/
|
||||
DocumentType.prototype.systemId;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Entity3-inputEncoding
|
||||
*/
|
||||
Entity.prototype.inputEncoding;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Entity3-encoding
|
||||
*/
|
||||
Entity.prototype.xmlEncoding;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Entity3-version
|
||||
*/
|
||||
Entity.prototype.xmlVersion;
|
||||
|
||||
@@ -46,3 +46,223 @@ Element.prototype.remove = function() {};
|
||||
* @see https://www.w3.org/TR/domcore/#dom-childnode-remove
|
||||
*/
|
||||
CharacterData.prototype.remove = function() {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-childnode-replacewith
|
||||
*/
|
||||
DocumentType.prototype.replaceWith = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @const {string}
|
||||
* @see https://www.w3.org/TR/2015/REC-dom-20151119/#sec-domerror
|
||||
*/
|
||||
DOMException.prototype.name;
|
||||
|
||||
/**
|
||||
* @const {string}
|
||||
* @see https://www.w3.org/TR/2015/REC-dom-20151119/#sec-domerror
|
||||
*/
|
||||
DOMException.prototype.message;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see https://www.w3.org/TR/2015/REC-dom-20151119/#dfn-error-names-table
|
||||
*/
|
||||
DOMException.SECURITY_ERR;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see https://www.w3.org/TR/2015/REC-dom-20151119/#dfn-error-names-table
|
||||
*/
|
||||
DOMException.NETWORK_ERR;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see https://www.w3.org/TR/2015/REC-dom-20151119/#dfn-error-names-table
|
||||
*/
|
||||
DOMException.ABORT_ERR;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see https://www.w3.org/TR/2015/REC-dom-20151119/#dfn-error-names-table
|
||||
*/
|
||||
DOMException.URL_MISMATCH_ERR;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see https://www.w3.org/TR/2015/REC-dom-20151119/#dfn-error-names-table
|
||||
*/
|
||||
DOMException.QUOTA_EXCEEDED_ERR;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see https://www.w3.org/TR/2015/REC-dom-20151119/#dfn-error-names-table
|
||||
*/
|
||||
DOMException.TIMEOUT_ERR;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see https://www.w3.org/TR/2015/REC-dom-20151119/#dfn-error-names-table
|
||||
*/
|
||||
DOMException.INVALID_NODE_TYPE_ERR;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see https://www.w3.org/TR/2015/REC-dom-20151119/#dfn-error-names-table
|
||||
*/
|
||||
DOMException.DATA_CLONE_ERR;
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-childnode-replacewith
|
||||
*/
|
||||
Element.prototype.replaceWith = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-childnode-replacewith
|
||||
*/
|
||||
CharacterData.prototype.replaceWith = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @return {!Array<string>}
|
||||
* @see https://dom.spec.whatwg.org/#dom-element-getattributenames
|
||||
*/
|
||||
Element.prototype.getAttributeNames = function() {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-parentnode-append
|
||||
*/
|
||||
Element.prototype.append = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-parentnode-append
|
||||
*/
|
||||
Document.prototype.append = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-parentnode-append
|
||||
*/
|
||||
DocumentFragment.prototype.append = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-parentnode-prepend
|
||||
*/
|
||||
Element.prototype.prepend = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-parentnode-prepend
|
||||
*/
|
||||
Document.prototype.prepend = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-parentnode-prepend
|
||||
*/
|
||||
DocumentFragment.prototype.prepend = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-childnode-before
|
||||
*/
|
||||
Element.prototype.before = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-childnode-before
|
||||
*/
|
||||
DocumentType.prototype.before = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-childnode-before
|
||||
*/
|
||||
CharacterData.prototype.before = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-childnode-after
|
||||
*/
|
||||
Element.prototype.after = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-childnode-after
|
||||
*/
|
||||
DocumentType.prototype.after = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {...(!Node|string)} nodes
|
||||
* @return {undefined}
|
||||
* @see https://dom.spec.whatwg.org/#dom-childnode-after
|
||||
*/
|
||||
CharacterData.prototype.after = function(nodes) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {boolean=} force
|
||||
* @return {boolean}
|
||||
* @throws {DOMException}
|
||||
* @see https://dom.spec.whatwg.org/#dom-element-toggleattribute
|
||||
*/
|
||||
Element.prototype.toggleAttribute = function(name, force) {};
|
||||
|
||||
/**
|
||||
* @type {Element}
|
||||
* @see http://msdn.microsoft.com/en-us/library/ms534327(VS.85).aspx
|
||||
*/
|
||||
Node.prototype.parentElement;
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {!HTMLCollection<!Element>}
|
||||
* @nosideeffects
|
||||
* @see https://dom.spec.whatwg.org/#dom-document-getelementsbyclassname-classnames-classnames
|
||||
*/
|
||||
Document.prototype.getElementsByClassName = function(name) {};
|
||||
|
||||
/**
|
||||
* @param {string} classNames
|
||||
* @return {!HTMLCollection<!Element>}
|
||||
* @nosideeffects
|
||||
* @see https://dom.spec.whatwg.org/#dom-element-getelementsbyclassname-classnames-classnames
|
||||
*/
|
||||
Element.prototype.getElementsByClassName = function(classNames) {};
|
||||
|
||||
/**
|
||||
* @param {string} where
|
||||
* @param {Element} element
|
||||
* @return {!Element}
|
||||
* @throws {DOMException}
|
||||
* @see https://dom.spec.whatwg.org/#dom-element-insertadjacentelement
|
||||
*/
|
||||
Element.prototype.insertAdjacentElement = function(where, element) {};
|
||||
|
||||
/**
|
||||
* @param {string} where
|
||||
* @param {string} data
|
||||
* @return {undefined}
|
||||
* @throws {DOMException}
|
||||
* @see https://dom.spec.whatwg.org/#dom-element-insertadjacenttext
|
||||
*/
|
||||
Element.prototype.insertAdjacentText = function(where, data) {};
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright 2015 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's Encoding specification
|
||||
* https://encoding.spec.whatwg.org
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string=} encoding
|
||||
* @param {Object=} options
|
||||
*/
|
||||
function TextDecoder(encoding, options) {}
|
||||
|
||||
/** @type {string} **/ TextDecoder.prototype.encoding;
|
||||
/** @type {boolean} **/ TextDecoder.prototype.fatal;
|
||||
/** @type {boolean} **/ TextDecoder.prototype.ignoreBOM;
|
||||
|
||||
/**
|
||||
* @param {!Uint8Array} input
|
||||
* @param {Object=} options
|
||||
* @return {string}
|
||||
*/
|
||||
TextDecoder.prototype.decode = function decode(input, options) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string=} encoding
|
||||
* @param {Object=} options
|
||||
*/
|
||||
function TextEncoder(encoding, options) {}
|
||||
|
||||
/** @type {string} **/ TextEncoder.prototype.encoding;
|
||||
|
||||
/**
|
||||
* @param {string} input
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
TextEncoder.prototype.encode = function(input) {};
|
||||
@@ -26,33 +26,38 @@
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @see https://dom.spec.whatwg.org/#interface-eventtarget
|
||||
*/
|
||||
function EventTarget() {}
|
||||
|
||||
/**
|
||||
* TODO(tbreisacher): Change the type of useCapture to be
|
||||
* {boolean|!EventListenerOptions}, here and in removeEventListener.
|
||||
*
|
||||
* @param {string} type
|
||||
* @param {EventListener|function(!Event):(boolean|undefined)} listener
|
||||
* @param {boolean} useCapture
|
||||
* @param {EventListener|function(this:THIS, !Event):*} listener
|
||||
* @param {(boolean|!AddEventListenerOptions)=} opt_options
|
||||
* @return {undefined}
|
||||
* @this {THIS}
|
||||
* @template THIS
|
||||
* @see https://dom.spec.whatwg.org/#dom-eventtarget-addeventlistener
|
||||
*/
|
||||
EventTarget.prototype.addEventListener = function(type, listener, useCapture)
|
||||
{};
|
||||
EventTarget.prototype.addEventListener = function(type, listener, opt_options) {
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} type
|
||||
* @param {EventListener|function(!Event):(boolean|undefined)} listener
|
||||
* @param {boolean} useCapture
|
||||
* @param {EventListener|function(this:THIS, !Event):*} listener
|
||||
* @param {(boolean|!EventListenerOptions)=} opt_options
|
||||
* @return {undefined}
|
||||
* @this {THIS}
|
||||
* @template THIS
|
||||
* @see https://dom.spec.whatwg.org/#dom-eventtarget-removeeventlistener
|
||||
*/
|
||||
EventTarget.prototype.removeEventListener = function(type, listener, useCapture)
|
||||
{};
|
||||
EventTarget.prototype.removeEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {!Event} evt
|
||||
* @return {boolean}
|
||||
* @see https://dom.spec.whatwg.org/#dom-eventtarget-dispatchevent
|
||||
*/
|
||||
EventTarget.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
@@ -99,24 +104,23 @@ EventInit.prototype.composed;
|
||||
function Event(type, opt_eventInitDict) {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html
|
||||
*/
|
||||
Event.CAPTURING_PHASE;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html
|
||||
*/
|
||||
Event.AT_TARGET;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html
|
||||
*/
|
||||
Event.BUBBLING_PHASE;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html
|
||||
*/
|
||||
Event.CAPTURING_PHASE;
|
||||
|
||||
|
||||
/** @type {string} */
|
||||
Event.prototype.type;
|
||||
|
||||
@@ -163,8 +167,8 @@ Event.prototype.preventDefault = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} eventTypeArg
|
||||
* @param {boolean} canBubbleArg
|
||||
* @param {boolean} cancelableArg
|
||||
* @param {boolean=} canBubbleArg
|
||||
* @param {boolean=} cancelableArg
|
||||
* @return {undefined}
|
||||
*/
|
||||
Event.prototype.initEvent = function(eventTypeArg, canBubbleArg, cancelableArg) {};
|
||||
@@ -172,18 +176,20 @@ Event.prototype.initEvent = function(eventTypeArg, canBubbleArg, cancelableArg)
|
||||
/**
|
||||
* @record
|
||||
* @extends {EventInit}
|
||||
* @template T
|
||||
* @see https://dom.spec.whatwg.org/#dictdef-customeventinit
|
||||
*/
|
||||
function CustomEventInit() {}
|
||||
|
||||
/** @type {(*|undefined)} */
|
||||
/** @type {(T|undefined)} */
|
||||
CustomEventInit.prototype.detail;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Event}
|
||||
* @param {string} type
|
||||
* @param {CustomEventInit=} opt_eventInitDict
|
||||
* @param {CustomEventInit<T>=} opt_eventInitDict
|
||||
* @template T
|
||||
* @see http://www.w3.org/TR/DOM-Level-3-Events/#interface-CustomEvent
|
||||
*/
|
||||
function CustomEvent(type, opt_eventInitDict) {}
|
||||
@@ -192,14 +198,14 @@ function CustomEvent(type, opt_eventInitDict) {}
|
||||
* @param {string} eventType
|
||||
* @param {boolean} bubbles
|
||||
* @param {boolean} cancelable
|
||||
* @param {*} detail
|
||||
* @param {T} detail
|
||||
* @return {undefined}
|
||||
*/
|
||||
CustomEvent.prototype.initCustomEvent = function(
|
||||
eventType, bubbles, cancelable, detail) {};
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
* @type {T}
|
||||
*/
|
||||
CustomEvent.prototype.detail;
|
||||
|
||||
@@ -430,6 +436,7 @@ KeyboardEventInit.prototype.char;
|
||||
KeyboardEventInit.prototype.locale;
|
||||
|
||||
/**
|
||||
* @see https://w3c.github.io/uievents/#idl-keyboardevent
|
||||
* @constructor
|
||||
* @extends {UIEvent}
|
||||
* @param {string} type
|
||||
@@ -452,6 +459,18 @@ KeyboardEvent.prototype.altKey;
|
||||
/** @type {boolean} */
|
||||
KeyboardEvent.prototype.metaKey;
|
||||
|
||||
/** @type {number} */
|
||||
KeyboardEvent.DOM_KEY_LOCATION_STANDARD;
|
||||
|
||||
/** @type {number} */
|
||||
KeyboardEvent.DOM_KEY_LOCATION_LEFT;
|
||||
|
||||
/** @type {number} */
|
||||
KeyboardEvent.DOM_KEY_LOCATION_RIGHT;
|
||||
|
||||
/** @type {number} */
|
||||
KeyboardEvent.DOM_KEY_LOCATION_NUMPAD;
|
||||
|
||||
/**
|
||||
* @param {string} keyIdentifierArg
|
||||
* @return {boolean}
|
||||
@@ -552,3 +571,33 @@ InputEvent.prototype.inputType;
|
||||
|
||||
/** @type {?DataTransfer} */
|
||||
InputEvent.prototype.dataTransfer;
|
||||
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {EventInit}
|
||||
* @see https://html.spec.whatwg.org/multipage/webappapis.html#promiserejectioneventinit
|
||||
*/
|
||||
function PromiseRejectionEventInit() {}
|
||||
|
||||
/** @type {undefined|!Promise<*>} */
|
||||
PromiseRejectionEventInit.prototype.promise;
|
||||
|
||||
/** @type {*} */
|
||||
PromiseRejectionEventInit.prototype.reason;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Event}
|
||||
* @param {string} type
|
||||
* @param {PromiseRejectionEventInit=} eventInitDict
|
||||
* @see https://html.spec.whatwg.org/multipage/webappapis.html#promiserejectionevent
|
||||
*/
|
||||
function PromiseRejectionEvent(type, eventInitDict) {}
|
||||
|
||||
/** @type {!Promise<*>} */
|
||||
PromiseRejectionEvent.prototype.promise;
|
||||
|
||||
/** @type {*} */
|
||||
PromiseRejectionEvent.prototype.reason;
|
||||
110
javascript/externs/web/w3c_eventsource.js
Normal file
110
javascript/externs/web/w3c_eventsource.js
Normal file
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's EventSource API.
|
||||
* @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/** @record */
|
||||
function EventSourceInit() {};
|
||||
|
||||
/** @type {(boolean|undefined)} */
|
||||
EventSourceInit.prototype.withCredentials;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {EventTarget}
|
||||
* @param {string} url
|
||||
* @param {EventSourceInit=} opt_eventSourceInitDict
|
||||
*/
|
||||
function EventSource(url, opt_eventSourceInitDict) {}
|
||||
|
||||
/** @override */
|
||||
EventSource.prototype.addEventListener = function(type, listener, opt_options) {
|
||||
};
|
||||
|
||||
/** @override */
|
||||
EventSource.prototype.removeEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/** @override */
|
||||
EventSource.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
/**
|
||||
* @const {string}
|
||||
*/
|
||||
EventSource.prototype.url;
|
||||
|
||||
/** @const {boolean} */
|
||||
EventSource.prototype.withCredentials;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
*/
|
||||
EventSource.prototype.CONNECTING;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
*/
|
||||
EventSource.CONNECTING;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
*/
|
||||
EventSource.prototype.OPEN;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
*/
|
||||
EventSource.OPEN;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
*/
|
||||
EventSource.prototype.CLOSED;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
*/
|
||||
EventSource.CLOSED;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
*/
|
||||
EventSource.prototype.readyState;
|
||||
|
||||
/**
|
||||
* @type {?function(!Event): void}
|
||||
*/
|
||||
EventSource.prototype.onopen = function(e) {};
|
||||
|
||||
/**
|
||||
* @type {?function(!MessageEvent<string>): void}
|
||||
*/
|
||||
EventSource.prototype.onmessage = function(e) {};
|
||||
|
||||
/**
|
||||
* @type {?function(!Event): void}
|
||||
*/
|
||||
EventSource.prototype.onerror = function(e) {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
*/
|
||||
EventSource.prototype.close = function() {};
|
||||
295
javascript/externs/web/w3c_fileapi.js
Normal file
295
javascript/externs/web/w3c_fileapi.js
Normal file
@@ -0,0 +1,295 @@
|
||||
/*
|
||||
* Copyright 2010 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
/**
|
||||
* @fileoverview Definitions for objects in the File API, File Writer API, and
|
||||
* File System API. Details of the API are at:
|
||||
* http://www.w3.org/TR/FileAPI/
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/** @record */
|
||||
function BlobPropertyBag() {};
|
||||
|
||||
/** @type {(string|undefined)} */
|
||||
BlobPropertyBag.prototype.type;
|
||||
|
||||
/**
|
||||
* @see http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
|
||||
* @param {Array<ArrayBuffer|ArrayBufferView|Blob|string>=} opt_blobParts
|
||||
* @param {BlobPropertyBag=} opt_options
|
||||
* @constructor
|
||||
* @nosideeffects
|
||||
*/
|
||||
function Blob(opt_blobParts, opt_options) {}
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-size
|
||||
* @type {number}
|
||||
*/
|
||||
Blob.prototype.size;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-type
|
||||
* @type {string}
|
||||
*/
|
||||
Blob.prototype.type;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-slice
|
||||
* @param {number=} start
|
||||
* @param {number=} length
|
||||
* @param {string=} opt_contentType
|
||||
* @return {!Blob}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Blob.prototype.slice = function(start, length, opt_contentType) {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#arraybuffer-method-algo
|
||||
* @return {!Promise<!ArrayBuffer>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Blob.prototype.arrayBuffer = function() {};
|
||||
|
||||
/**
|
||||
* @see https://www.w3.org/TR/FileAPI/#dom-blob-text
|
||||
* @return {!Promise<string>}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Blob.prototype.text = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {BlobPropertyBag}
|
||||
**/
|
||||
function FilePropertyBag() {};
|
||||
|
||||
/** @type {(number|undefined)} */
|
||||
FilePropertyBag.prototype.lastModified;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-file
|
||||
* @param {!Array<string|!Blob|!ArrayBuffer>=} contents
|
||||
* @param {string=} name
|
||||
* @param {FilePropertyBag=} properties
|
||||
* @constructor
|
||||
* @extends {Blob}
|
||||
*/
|
||||
function File(contents, name, properties) {}
|
||||
|
||||
/**
|
||||
* Chrome uses this instead of name.
|
||||
* @deprecated Use name instead.
|
||||
* @type {string}
|
||||
*/
|
||||
File.prototype.fileName;
|
||||
|
||||
/**
|
||||
* Chrome uses this instead of size.
|
||||
* @deprecated Use size instead.
|
||||
* @type {string}
|
||||
*/
|
||||
File.prototype.fileSize;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-name
|
||||
* @type {string}
|
||||
*/
|
||||
File.prototype.name;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-lastModifiedDate
|
||||
* @type {Date}
|
||||
*/
|
||||
File.prototype.lastModifiedDate;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-lastModified
|
||||
* @type {number}
|
||||
*/
|
||||
File.prototype.lastModified;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-filereader
|
||||
* @constructor
|
||||
* @implements {EventTarget}
|
||||
*/
|
||||
function FileReader() {}
|
||||
|
||||
/** @override */
|
||||
FileReader.prototype.addEventListener = function(type, listener, opt_options) {
|
||||
};
|
||||
|
||||
/** @override */
|
||||
FileReader.prototype.removeEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/** @override */
|
||||
FileReader.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsArrayBuffer
|
||||
* @param {!Blob} blob
|
||||
* @return {undefined}
|
||||
*/
|
||||
FileReader.prototype.readAsArrayBuffer = function(blob) {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsBinaryStringAsync
|
||||
* @param {!Blob} blob
|
||||
* @return {undefined}
|
||||
*/
|
||||
FileReader.prototype.readAsBinaryString = function(blob) {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsText
|
||||
* @param {!Blob} blob
|
||||
* @param {string=} encoding
|
||||
* @return {undefined}
|
||||
*/
|
||||
FileReader.prototype.readAsText = function(blob, encoding) {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsDataURL
|
||||
* @param {!Blob} blob
|
||||
* @return {undefined}
|
||||
*/
|
||||
FileReader.prototype.readAsDataURL = function(blob) {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-abort
|
||||
* @return {undefined}
|
||||
*/
|
||||
FileReader.prototype.abort = function() {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-empty
|
||||
* @const {number}
|
||||
*/
|
||||
FileReader.prototype.EMPTY;
|
||||
|
||||
/** @const {number} */
|
||||
FileReader.EMPTY;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-loading
|
||||
* @const {number}
|
||||
*/
|
||||
FileReader.prototype.LOADING;
|
||||
|
||||
/** @const {number} */
|
||||
FileReader.LOADING;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-done
|
||||
* @const {number}
|
||||
*/
|
||||
FileReader.prototype.DONE;
|
||||
|
||||
/** @const {number} */
|
||||
FileReader.DONE;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-readystate
|
||||
* @type {number}
|
||||
*/
|
||||
FileReader.prototype.readyState;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-result
|
||||
* @type {string|Blob|ArrayBuffer}
|
||||
*/
|
||||
FileReader.prototype.result;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-error
|
||||
* @type {DOMError}
|
||||
*/
|
||||
FileReader.prototype.error;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-onloadstart
|
||||
* @type {?function(!ProgressEvent<!FileReader>)}
|
||||
*/
|
||||
FileReader.prototype.onloadstart;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-onprogress
|
||||
* @type {?function(!ProgressEvent<!FileReader>)}
|
||||
*/
|
||||
FileReader.prototype.onprogress;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-onload
|
||||
* @type {?function(!ProgressEvent<!FileReader>)}
|
||||
*/
|
||||
FileReader.prototype.onload;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-onabort
|
||||
* @type {?function(!ProgressEvent<!FileReader>)}
|
||||
*/
|
||||
FileReader.prototype.onabort;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-onerror
|
||||
* @type {?function(!ProgressEvent<!FileReader>)}
|
||||
*/
|
||||
FileReader.prototype.onerror;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-onloadend
|
||||
* @type {?function(!ProgressEvent<!FileReader>)}
|
||||
*/
|
||||
FileReader.prototype.onloadend;
|
||||
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#FileReaderSyncSync
|
||||
* @constructor
|
||||
*/
|
||||
function FileReaderSync() {}
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsArrayBufferSync
|
||||
* @param {!Blob} blob
|
||||
* @return {!ArrayBuffer}
|
||||
*/
|
||||
FileReaderSync.prototype.readAsArrayBuffer = function(blob) {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsBinaryStringSync
|
||||
* @param {!Blob} blob
|
||||
* @return {string}
|
||||
*/
|
||||
FileReaderSync.prototype.readAsBinaryString = function(blob) {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsTextSync
|
||||
* @param {!Blob} blob
|
||||
* @param {string=} encoding
|
||||
* @return {string}
|
||||
*/
|
||||
FileReaderSync.prototype.readAsText = function(blob, encoding) {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsDataURLSync
|
||||
* @param {!Blob} blob
|
||||
* @return {string}
|
||||
*/
|
||||
FileReaderSync.prototype.readAsDataURL = function(blob) {};
|
||||
@@ -27,8 +27,18 @@
|
||||
function Geolocation() {}
|
||||
|
||||
/**
|
||||
* @param {function(!GeolocationPosition)} successCallback
|
||||
* @param {(function(!GeolocationPositionError)|null)=} opt_errorCallback
|
||||
* @typedef {function(!GeolocationPosition): void}
|
||||
*/
|
||||
var PositionCallback;
|
||||
|
||||
/**
|
||||
* @typedef {function(!GeolocationPositionError): void}
|
||||
*/
|
||||
var PositionErrorCallback;
|
||||
|
||||
/**
|
||||
* @param {PositionCallback} successCallback
|
||||
* @param {PositionErrorCallback=} opt_errorCallback
|
||||
* @param {GeolocationPositionOptions=} opt_options
|
||||
* @return {undefined}
|
||||
*/
|
||||
@@ -37,8 +47,8 @@ Geolocation.prototype.getCurrentPosition = function(successCallback,
|
||||
opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {function(!GeolocationPosition)} successCallback
|
||||
* @param {(function(!GeolocationPositionError)|null)=} opt_errorCallback
|
||||
* @param {PositionCallback} successCallback
|
||||
* @param {PositionErrorCallback=} opt_errorCallback
|
||||
* @param {GeolocationPositionOptions=} opt_options
|
||||
* @return {number}
|
||||
*/
|
||||
@@ -54,7 +64,7 @@ Geolocation.prototype.clearWatch = function(watchId) {};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @record
|
||||
* @see http://www.w3.org/TR/geolocation-API/#coordinates
|
||||
*/
|
||||
function GeolocationCoordinates() {}
|
||||
@@ -64,24 +74,24 @@ GeolocationCoordinates.prototype.latitude;
|
||||
GeolocationCoordinates.prototype.longitude;
|
||||
/** @type {number} */
|
||||
GeolocationCoordinates.prototype.accuracy;
|
||||
/** @type {number} */
|
||||
/** @type {number|null} */
|
||||
GeolocationCoordinates.prototype.altitude;
|
||||
/** @type {number} */
|
||||
/** @type {number|null} */
|
||||
GeolocationCoordinates.prototype.altitudeAccuracy;
|
||||
/** @type {number} */
|
||||
/** @type {number|null} */
|
||||
GeolocationCoordinates.prototype.heading;
|
||||
/** @type {number} */
|
||||
/** @type {number|null} */
|
||||
GeolocationCoordinates.prototype.speed;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @record
|
||||
* @see http://www.w3.org/TR/geolocation-API/#position
|
||||
*/
|
||||
function GeolocationPosition() {}
|
||||
/** @type {GeolocationCoordinates} */
|
||||
GeolocationPosition.prototype.coords;
|
||||
/** @type {Date} */
|
||||
/** @type {number} */
|
||||
GeolocationPosition.prototype.timestamp;
|
||||
|
||||
|
||||
@@ -99,7 +109,7 @@ GeolocationPositionOptions.prototype.timeout;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @record
|
||||
* @see http://www.w3.org/TR/geolocation-API/#position-error
|
||||
*/
|
||||
function GeolocationPositionError() {}
|
||||
@@ -107,13 +117,13 @@ function GeolocationPositionError() {}
|
||||
GeolocationPositionError.prototype.code;
|
||||
/** @type {string} */
|
||||
GeolocationPositionError.prototype.message;
|
||||
/** @type {number} */
|
||||
/** @const {number} */
|
||||
GeolocationPositionError.prototype.UNKNOWN_ERROR;
|
||||
/** @type {number} */
|
||||
/** @const {number} */
|
||||
GeolocationPositionError.prototype.PERMISSION_DENIED;
|
||||
/** @type {number} */
|
||||
/** @const {number} */
|
||||
GeolocationPositionError.prototype.POSITION_UNAVAILABLE;
|
||||
/** @type {number} */
|
||||
/** @const {number} */
|
||||
GeolocationPositionError.prototype.TIMEOUT;
|
||||
|
||||
/** @type {Geolocation} */
|
||||
|
||||
899
javascript/externs/web/w3c_geometry1.js
Normal file
899
javascript/externs/web/w3c_geometry1.js
Normal file
@@ -0,0 +1,899 @@
|
||||
/*
|
||||
* Copyright 2018 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's Geometry Interfaces Module Level 1 spec.
|
||||
* The whole file has been fully type annotated. Created from
|
||||
* https://www.w3.org/TR/geometry-1/
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @deprecated ClientRect has been replaced by DOMRect in the latest spec.
|
||||
* @constructor
|
||||
* @see https://www.w3.org/TR/cssom-view/#changes-from-2011-08-04
|
||||
*/
|
||||
function ClientRect() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-top
|
||||
*/
|
||||
ClientRect.prototype.top;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-right
|
||||
*/
|
||||
ClientRect.prototype.right;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-bottom
|
||||
*/
|
||||
ClientRect.prototype.bottom;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-left
|
||||
*/
|
||||
ClientRect.prototype.left;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-width
|
||||
*/
|
||||
ClientRect.prototype.width;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/cssom-view/#dom-clientrect-height
|
||||
*/
|
||||
ClientRect.prototype.height;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ClientRect} for backwards compatibility
|
||||
* @param {number=} x
|
||||
* @param {number=} y
|
||||
* @param {number=} width
|
||||
* @param {number=} height
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-domrectreadonly
|
||||
*/
|
||||
function DOMRectReadOnly(x, y, width, height) {}
|
||||
|
||||
/**
|
||||
* @param {!DOMRectInit} other
|
||||
* @return {!DOMRectReadOnly}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-fromrect
|
||||
*/
|
||||
DOMRectReadOnly.prototype.fromRect = function(other) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-x
|
||||
*/
|
||||
DOMRectReadOnly.prototype.x;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-y
|
||||
*/
|
||||
DOMRectReadOnly.prototype.y;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-width
|
||||
*/
|
||||
DOMRectReadOnly.prototype.width;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-height
|
||||
*/
|
||||
DOMRectReadOnly.prototype.height;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-top
|
||||
*/
|
||||
DOMRectReadOnly.prototype.top;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-right
|
||||
*/
|
||||
DOMRectReadOnly.prototype.right;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-bottom
|
||||
*/
|
||||
DOMRectReadOnly.prototype.bottom;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-left
|
||||
*/
|
||||
DOMRectReadOnly.prototype.left;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {DOMRectReadOnly}
|
||||
* @param {number=} x
|
||||
* @param {number=} y
|
||||
* @param {number=} width
|
||||
* @param {number=} height
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrect-domrect
|
||||
*/
|
||||
function DOMRect(x, y, width, height) {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrect-x
|
||||
*/
|
||||
DOMRect.prototype.x;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrect-y
|
||||
*/
|
||||
DOMRect.prototype.y;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrect-width
|
||||
*/
|
||||
DOMRect.prototype.width;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrect-height
|
||||
*/
|
||||
DOMRect.prototype.height;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-top
|
||||
*/
|
||||
DOMRect.prototype.top;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-right
|
||||
*/
|
||||
DOMRect.prototype.right;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-bottom
|
||||
*/
|
||||
DOMRect.prototype.bottom;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectreadonly-left
|
||||
*/
|
||||
DOMRect.prototype.left;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see https://www.w3.org/TR/geometry-1/#dictdef-domrectinit
|
||||
*/
|
||||
function DOMRectInit() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectinit-x
|
||||
*/
|
||||
DOMRectInit.prototype.x;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectinit-y
|
||||
*/
|
||||
DOMRectInit.prototype.y;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectinit-width
|
||||
*/
|
||||
DOMRectInit.prototype.width;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-domrectinit-height
|
||||
*/
|
||||
DOMRectInit.prototype.height;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {number=} x
|
||||
* @param {number=} y
|
||||
* @param {number=} z
|
||||
* @param {number=} w
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-dompointreadonly
|
||||
*/
|
||||
function DOMPointReadOnly(x, y, z, w) {}
|
||||
|
||||
/**
|
||||
* @param {!DOMPointInit} other
|
||||
* @return {!DOMPointReadOnly}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-frompoint
|
||||
*/
|
||||
DOMPointReadOnly.prototype.fromPoint = function(other) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-x
|
||||
*/
|
||||
DOMPointReadOnly.prototype.x;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-y
|
||||
*/
|
||||
DOMPointReadOnly.prototype.y;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-z
|
||||
*/
|
||||
DOMPointReadOnly.prototype.z;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-w
|
||||
*/
|
||||
DOMPointReadOnly.prototype.w;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {DOMPointReadOnly}
|
||||
* @param {number=} x
|
||||
* @param {number=} y
|
||||
* @param {number=} z
|
||||
* @param {number=} w
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompoint-dompoint
|
||||
*/
|
||||
function DOMPoint(x, y, z, w) {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompoint-x
|
||||
*/
|
||||
DOMPoint.prototype.x;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompoint-y
|
||||
*/
|
||||
DOMPoint.prototype.y;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompoint-z
|
||||
*/
|
||||
DOMPoint.prototype.z;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompoint-w
|
||||
*/
|
||||
DOMPoint.prototype.w;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://www.w3.org/TR/geometry-1/#dictdef-dompointinit
|
||||
*/
|
||||
function DOMPointInit() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompointinit-x
|
||||
*/
|
||||
DOMPointInit.prototype.x;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompointinit-y
|
||||
*/
|
||||
DOMPointInit.prototype.y;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompointinit-z
|
||||
*/
|
||||
DOMPointInit.prototype.z;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dompointinit-w
|
||||
*/
|
||||
DOMPointInit.prototype.w;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {DOMMatrixInit}
|
||||
* @param {string|Array<number>} init
|
||||
* @see https://www.w3.org/TR/geometry-1/#dommatrixreadonly
|
||||
*/
|
||||
function DOMMatrixReadOnly(init) {}
|
||||
|
||||
/**
|
||||
* @param {!DOMMatrixInit} other
|
||||
* @return {!DOMMatrixReadOnly}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-frommatrix
|
||||
*/
|
||||
DOMMatrixReadOnly.fromMatrix = function(other) {};
|
||||
|
||||
/**
|
||||
* @param {!Float32Array} array32
|
||||
* @return {!DOMMatrixReadOnly}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-fromfloat32array
|
||||
*/
|
||||
DOMMatrixReadOnly.fromFloat32Array = function(array32) {};
|
||||
|
||||
/**
|
||||
* @param {!Float64Array} array64
|
||||
* @return {!DOMMatrixReadOnly}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-fromfloat64array
|
||||
*/
|
||||
DOMMatrixReadOnly.fromFloat64Array = function(array64) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-a
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.a;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-b
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.b;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-c
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.c;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-d
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.d;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-e
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.e;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-f
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.f;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m11
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m11;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m12
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m12;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m13
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m13;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m14
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m14;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m21
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m21;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m22
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m22;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m23
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m23;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m24
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m24;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m31
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m31;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m32
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m32;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m33
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m33;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m34
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m34;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m41
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m41;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m42
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m42;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m43
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m43;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-m44
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.m44;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-is2d
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.is2D;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-isidentity
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.isIdentity;
|
||||
|
||||
/**
|
||||
* @param {number=} tx
|
||||
* @param {number=} ty
|
||||
* @param {number=} tz
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-translate
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.translate = function(tx, ty, tz) {};
|
||||
|
||||
/**
|
||||
* @param {number=} scaleX
|
||||
* @param {number=} scaleY
|
||||
* @param {number=} scaleZ
|
||||
* @param {number=} originX
|
||||
* @param {number=} originY
|
||||
* @param {number=} originZ
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-scale
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.scale = function(
|
||||
scaleX, scaleY, scaleZ, originX, originY, originZ) {};
|
||||
|
||||
/**
|
||||
* @param {number=} scaleX
|
||||
* @param {number=} scaleY
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-scalenonuniform
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.scaleNonUniform = function(scaleX, scaleY) {};
|
||||
|
||||
/**
|
||||
* @param {number=} scale
|
||||
* @param {number=} originX
|
||||
* @param {number=} originY
|
||||
* @param {number=} originZ
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-scale3d
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.scale3d = function(
|
||||
scale, originX, originY, originZ) {};
|
||||
|
||||
/**
|
||||
* @param {number=} rotX
|
||||
* @param {number=} rotY
|
||||
* @param {number=} rotZ
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-rotate
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.rotate = function(rotX, rotY, rotZ) {};
|
||||
|
||||
/**
|
||||
* @param {number=} x
|
||||
* @param {number=} y
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-rotatefromvector
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.rotateFromVector = function(x, y) {};
|
||||
|
||||
/**
|
||||
* @param {number=} x
|
||||
* @param {number=} y
|
||||
* @param {number=} z
|
||||
* @param {number=} angle
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-rotateaxisangle
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.rotateAxisAngle = function(x, y, z, angle) {};
|
||||
|
||||
/**
|
||||
* @param {number=} sx
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-skewx
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.skewX = function(sx) {};
|
||||
|
||||
/**
|
||||
* @param {number=} sy
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-skewy
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.skewY = function(sy) {};
|
||||
|
||||
/**
|
||||
* @param {!DOMMatrixInit} other
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-multiply
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.multiply = function(other) {};
|
||||
|
||||
/**
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-flipx
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.flipX = function() {};
|
||||
|
||||
/**
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-flipy
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.flipY = function() {};
|
||||
|
||||
/**
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-inverse
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.inverse = function() {};
|
||||
|
||||
/**
|
||||
* @param {!DOMPointInit} point
|
||||
* @return {!DOMPoint}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-transformpoint
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.transformPoint = function(point) {};
|
||||
|
||||
/**
|
||||
* @return {!Float32Array}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-tofloat32array
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.toFloat32Array = function() {};
|
||||
|
||||
/**
|
||||
* @return {!Float64Array}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-tofloat64array
|
||||
*/
|
||||
DOMMatrixReadOnly.prototype.toFloat64Array = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {DOMMatrixReadOnly}
|
||||
* @param {string|Array<number>} init
|
||||
* @see https://www.w3.org/TR/geometry-1/#dommatrix
|
||||
*/
|
||||
function DOMMatrix(init) {}
|
||||
|
||||
/**
|
||||
* @param {!DOMMatrixInit} other
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-frommatrix
|
||||
*/
|
||||
DOMMatrix.fromMatrix = function(other) {};
|
||||
|
||||
/**
|
||||
* @param {!Float32Array} array32
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-fromfloat32array
|
||||
*/
|
||||
DOMMatrix.fromFloat32Array = function(array32) {};
|
||||
|
||||
/**
|
||||
* @param {!Float64Array} array64
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-fromfloat64array
|
||||
*/
|
||||
DOMMatrix.fromFloat64Array = function(array64) {};
|
||||
|
||||
/**
|
||||
* @param {!DOMMatrixInit} other
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-multiply
|
||||
*/
|
||||
DOMMatrix.prototype.multiplySelf = function(other) {};
|
||||
|
||||
/**
|
||||
* @param {!DOMMatrixInit} other
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-premultiply
|
||||
*/
|
||||
DOMMatrix.prototype.preMultiplySelf = function(other) {};
|
||||
|
||||
/**
|
||||
* @param {number=} tx
|
||||
* @param {number=} ty
|
||||
* @param {number=} tz
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-translate
|
||||
*/
|
||||
DOMMatrix.prototype.translateSelf = function(tx, ty, tz) {};
|
||||
|
||||
/**
|
||||
* @param {number=} scaleX
|
||||
* @param {number=} scaleY
|
||||
* @param {number=} scaleZ
|
||||
* @param {number=} originX
|
||||
* @param {number=} originY
|
||||
* @param {number=} originZ
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-scale
|
||||
*/
|
||||
DOMMatrix.prototype.scaleSelf = function(
|
||||
scaleX, scaleY, scaleZ, originX, originY, originZ) {};
|
||||
|
||||
/**
|
||||
* @param {number=} scale
|
||||
* @param {number=} originX
|
||||
* @param {number=} originY
|
||||
* @param {number=} originZ
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-scale3d
|
||||
*/
|
||||
DOMMatrix.prototype.scale3dSelf = function(scale, originX, originY, originZ) {};
|
||||
|
||||
/**
|
||||
* @param {number=} rotX
|
||||
* @param {number=} rotY
|
||||
* @param {number=} rotZ
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-rotate
|
||||
*/
|
||||
DOMMatrix.prototype.rotateSelf = function(rotX, rotY, rotZ) {};
|
||||
|
||||
/**
|
||||
* @param {number=} x
|
||||
* @param {number=} y
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-rotatefromvector
|
||||
*/
|
||||
DOMMatrix.prototype.rotateFromVectorSelf = function(x, y) {};
|
||||
|
||||
/**
|
||||
* @param {number=} x
|
||||
* @param {number=} y
|
||||
* @param {number=} z
|
||||
* @param {number=} angle
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-rotateaxisangle
|
||||
*/
|
||||
DOMMatrix.prototype.rotateAxisAngleSelf = function(x, y, z, angle) {};
|
||||
|
||||
/**
|
||||
* @param {number=} sx
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-skewx
|
||||
*/
|
||||
DOMMatrix.prototype.skewXSelf = function(sx) {};
|
||||
|
||||
/**
|
||||
* @param {number=} sy
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-skewy
|
||||
*/
|
||||
DOMMatrix.prototype.skewYSelf = function(sy) {};
|
||||
|
||||
/**
|
||||
* @return {!DOMMatrix}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix-inverse
|
||||
*/
|
||||
DOMMatrix.prototype.inverseSelf = function() {};
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://www.w3.org/TR/geometry-1/#dictdef-dommatrix2dinit
|
||||
*/
|
||||
function DOMMatrix2DInit() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-a
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.a;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-b
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.b;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-c
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.c;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-d
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.d;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-e
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.e;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-f
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.f;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-m11
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.m11;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-m12
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.m12;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-m21
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.m21;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-m22
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.m22;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-m41
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.m41;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrix2dinit-m42
|
||||
*/
|
||||
DOMMatrix2DInit.prototype.m42;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {DOMMatrix2DInit}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dictdef-dommatrix
|
||||
*/
|
||||
function DOMMatrixInit() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-m13
|
||||
*/
|
||||
DOMMatrixInit.prototype.m13;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-m14
|
||||
*/
|
||||
DOMMatrixInit.prototype.m14;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-m23
|
||||
*/
|
||||
DOMMatrixInit.prototype.m23;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-m24
|
||||
*/
|
||||
DOMMatrixInit.prototype.m24;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-m31
|
||||
*/
|
||||
DOMMatrixInit.prototype.m31;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-m32
|
||||
*/
|
||||
DOMMatrixInit.prototype.m32;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-m33
|
||||
*/
|
||||
DOMMatrixInit.prototype.m33;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-m34
|
||||
*/
|
||||
DOMMatrixInit.prototype.m34;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-m43
|
||||
*/
|
||||
DOMMatrixInit.prototype.m43;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-m44
|
||||
*/
|
||||
DOMMatrixInit.prototype.m44;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see https://www.w3.org/TR/geometry-1/#dom-dommatrixinit-is2d
|
||||
*/
|
||||
DOMMatrixInit.prototype.is2D;
|
||||
File diff suppressed because it is too large
Load Diff
47
javascript/externs/web/w3c_keyboardlock.js
Normal file
47
javascript/externs/web/w3c_keyboardlock.js
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 2020 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for the W3C Keyboard Lock API.
|
||||
* @see https://wicg.github.io/keyboard-lock/
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* Keyboard API object.
|
||||
* @constructor
|
||||
* @see https://w3c.github.io/keyboard-lock/#keyboard-interface
|
||||
*/
|
||||
function Keyboard() {}
|
||||
|
||||
/**
|
||||
* Lock the specified keys for this page, or all keys if keyCodes is omitted.
|
||||
* @param {?Array<string>=} keyCodes
|
||||
* @return {!Promise<undefined>}
|
||||
*/
|
||||
Keyboard.prototype.lock = function(keyCodes) {};
|
||||
|
||||
/**
|
||||
* Unlock any locked keys.
|
||||
*/
|
||||
Keyboard.prototype.unlock = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {!Keyboard}
|
||||
* @see https://w3c.github.io/keyboard-lock/#API
|
||||
*/
|
||||
Navigator.prototype.keyboard;
|
||||
206
javascript/externs/web/w3c_mediacapabilities.js
Normal file
206
javascript/externs/web/w3c_mediacapabilities.js
Normal file
@@ -0,0 +1,206 @@
|
||||
/*
|
||||
* Copyright 2019 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
/**
|
||||
* @fileoverview MediaCapabilities externs.
|
||||
* Based on {@link https://w3c.github.io/media-capabilities/ MC draft 6 November
|
||||
* 2019}.
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {string}
|
||||
* @see https://w3c.github.io/media-capabilities/#enumdef-hdrmetadatatype
|
||||
*/
|
||||
var HdrMetadataType;
|
||||
|
||||
/**
|
||||
* @typedef {string}
|
||||
* @see https://w3c.github.io/media-capabilities/#enumdef-colorgamut
|
||||
*/
|
||||
var ColorGamut;
|
||||
|
||||
/**
|
||||
* @typedef {string}
|
||||
* @see https://w3c.github.io/media-capabilities/#enumdef-transferfunction
|
||||
*/
|
||||
var TransferFunction;
|
||||
|
||||
/**
|
||||
* @typedef {string}
|
||||
* @see https://w3c.github.io/media-capabilities/#enumdef-mediadecodingtype
|
||||
*/
|
||||
var MediaDecodingType;
|
||||
|
||||
/**
|
||||
* @typedef {string}
|
||||
* @see https://w3c.github.io/media-capabilities/#enumdef-mediaencodingtype
|
||||
*/
|
||||
var MediaEncodingType;
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* contentType: string,
|
||||
* width: number,
|
||||
* height: number,
|
||||
* bitrate: number,
|
||||
* framerate: number,
|
||||
* hasAlphaChannel: (boolean|undefined),
|
||||
* hdrMetadataType: (!HdrMetadataType|undefined),
|
||||
* colorGamut: (!ColorGamut|undefined),
|
||||
* transferFunction: (!TransferFunction|undefined)
|
||||
* }}
|
||||
* @see https://w3c.github.io/media-capabilities/#dictdef-videoconfiguration
|
||||
*/
|
||||
var VideoConfiguration;
|
||||
|
||||
// NOTE: channels definition below is not yet stable in the spec as of Dec 2019.
|
||||
// "The channels needs to be defined as a double (2.1, 4.1, 5.1, ...), an
|
||||
// unsigned short (number of channels) or as an enum value. The current
|
||||
// definition is a placeholder."
|
||||
/**
|
||||
* @typedef {{
|
||||
* contentType: string,
|
||||
* channels: (*|undefined),
|
||||
* bitrate: (number|undefined),
|
||||
* samplerate: (number|undefined),
|
||||
* spatialRendering: (boolean|undefined)
|
||||
* }}
|
||||
* @see https://w3c.github.io/media-capabilities/#dictdef-audioconfiguration
|
||||
*/
|
||||
var AudioConfiguration;
|
||||
|
||||
// NOTE: encryptionScheme is not yet in the MC spec as of Dec 2019, but has
|
||||
// already landed in EME and should be in MC soon.
|
||||
// https://github.com/w3c/media-capabilities/issues/100
|
||||
/**
|
||||
* @typedef {{
|
||||
* robustness: (string|undefined),
|
||||
* encryptionScheme: (string|undefined)
|
||||
* }}
|
||||
* @see https://w3c.github.io/media-capabilities/#dictdef-keysystemtrackconfiguration
|
||||
*/
|
||||
var KeySystemTrackConfiguration;
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* keySystem: string,
|
||||
* initDataType: (string|undefined),
|
||||
* distinctiveIdentifier: (string|undefined),
|
||||
* persistentState: (string|undefined),
|
||||
* sessionTypes: (!Array<string>|undefined),
|
||||
* audio: (!KeySystemTrackConfiguration|undefined),
|
||||
* video: (!KeySystemTrackConfiguration|undefined)
|
||||
* }}
|
||||
* @see https://w3c.github.io/media-capabilities/#dictdef-mediacapabilitieskeysystemconfiguration
|
||||
*/
|
||||
var MediaCapabilitiesKeySystemConfiguration;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/media-capabilities/#dictdef-mediaconfiguration
|
||||
*/
|
||||
function MediaConfiguration() {}
|
||||
|
||||
/** @type {!VideoConfiguration|undefined} */
|
||||
MediaConfiguration.prototype.video;
|
||||
|
||||
/** @type {!AudioConfiguration|undefined} */
|
||||
MediaConfiguration.prototype.audio;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {MediaConfiguration}
|
||||
* @see https://w3c.github.io/media-capabilities/#dictdef-mediadecodingconfiguration
|
||||
*/
|
||||
function MediaDecodingConfiguration() {}
|
||||
|
||||
/** @type {!MediaDecodingType} */
|
||||
MediaDecodingConfiguration.prototype.type;
|
||||
|
||||
/** @type {!MediaCapabilitiesKeySystemConfiguration|undefined} */
|
||||
MediaDecodingConfiguration.prototype.keySystemConfiguration;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {MediaConfiguration}
|
||||
* @see https://w3c.github.io/media-capabilities/#dictdef-mediaencodingconfiguration
|
||||
*/
|
||||
function MediaEncodingConfiguration() {}
|
||||
|
||||
/** @type {!MediaEncodingType} */
|
||||
MediaEncodingConfiguration.prototype.type;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/media-capabilities/#dictdef-mediacapabilitiesinfo
|
||||
*/
|
||||
function MediaCapabilitiesInfo() {}
|
||||
|
||||
/** @type {boolean} */
|
||||
MediaCapabilitiesInfo.prototype.supported;
|
||||
|
||||
/** @type {boolean} */
|
||||
MediaCapabilitiesInfo.prototype.smooth;
|
||||
|
||||
/** @type {boolean} */
|
||||
MediaCapabilitiesInfo.prototype.powerEfficient;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {MediaCapabilitiesInfo}
|
||||
* @see https://w3c.github.io/media-capabilities/#dictdef-mediacapabilitiesdecodinginfo
|
||||
*/
|
||||
function MediaCapabilitiesDecodingInfo() {}
|
||||
|
||||
/** @type {?MediaKeySystemAccess} */
|
||||
MediaCapabilitiesDecodingInfo.prototype.keySystemAccess;
|
||||
|
||||
/** @type {!MediaDecodingConfiguration} */
|
||||
MediaCapabilitiesDecodingInfo.prototype.configuration;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {MediaCapabilitiesInfo}
|
||||
* @see https://w3c.github.io/media-capabilities/#dictdef-mediacapabilitiesencodinginfo
|
||||
*/
|
||||
function MediaCapabilitiesEncodingInfo() {}
|
||||
|
||||
/** @type {!MediaEncodingConfiguration} */
|
||||
MediaCapabilitiesEncodingInfo.prototype.configuration;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @see https://w3c.github.io/media-capabilities/#mediacapabilities
|
||||
*/
|
||||
function MediaCapabilities() {}
|
||||
|
||||
/**
|
||||
* @param {!MediaDecodingConfiguration} configuration
|
||||
* @return {!Promise<!MediaCapabilitiesDecodingInfo>}
|
||||
*/
|
||||
MediaCapabilities.prototype.decodingInfo = function(configuration) {};
|
||||
|
||||
/**
|
||||
* @param {!MediaEncodingConfiguration} configuration
|
||||
* @return {!Promise<!MediaCapabilitiesEncodingInfo>}
|
||||
*/
|
||||
MediaCapabilities.prototype.encodingInfo = function(configuration) {};
|
||||
|
||||
/** @const {?MediaCapabilities} */
|
||||
Navigator.prototype.mediaCapabilities;
|
||||
|
||||
/** @const {?MediaCapabilities} */
|
||||
WorkerNavigator.prototype.mediaCapabilities;
|
||||
@@ -58,6 +58,7 @@ function PerformanceEntry() {}
|
||||
/** @type {number} */ PerformanceEntry.prototype.duration;
|
||||
|
||||
/**
|
||||
* https://www.w3.org/TR/resource-timing-2/#performanceresourcetiming
|
||||
* @constructor
|
||||
* @extends {PerformanceEntry}
|
||||
*/
|
||||
@@ -75,27 +76,138 @@ PerformanceResourceTiming.prototype.secureConnectionStart;
|
||||
/** @type {number} */ PerformanceResourceTiming.prototype.responseStart;
|
||||
/** @type {number} */ PerformanceResourceTiming.prototype.responseEnd;
|
||||
/** @type {string} */ PerformanceResourceTiming.prototype.initiatorType;
|
||||
/** @type {number|undefined} */
|
||||
PerformanceResourceTiming.prototype.transferSize;
|
||||
/** @type {number|undefined} */
|
||||
PerformanceResourceTiming.prototype.encodedBodySize;
|
||||
/** @type {number|undefined} */
|
||||
PerformanceResourceTiming.prototype.decodedBodySize;
|
||||
/** @type {number|undefined} */
|
||||
PerformanceResourceTiming.prototype.workerStart;
|
||||
/** @type {string} */ PerformanceResourceTiming.prototype.nextHopProtocol;
|
||||
|
||||
/**
|
||||
* Possible values are 'navigate', 'reload', 'back_forward', and 'prerender'.
|
||||
* See https://w3c.github.io/navigation-timing/#sec-performance-navigation-types
|
||||
* @typedef {string}
|
||||
*/
|
||||
var NavigationType;
|
||||
|
||||
/**
|
||||
* https://w3c.github.io/navigation-timing/#sec-PerformanceNavigationTiming
|
||||
* @constructor
|
||||
* @extends {PerformanceResourceTiming}
|
||||
*/
|
||||
function PerformanceNavigationTiming() {}
|
||||
/** @type {number} */ PerformanceNavigationTiming.prototype.unloadEventStart;
|
||||
/** @type {number} */ PerformanceNavigationTiming.prototype.unloadEventEnd;
|
||||
/** @type {number} */ PerformanceNavigationTiming.prototype.domInteractive;
|
||||
/** @type {number} */ PerformanceNavigationTiming.prototype
|
||||
.domContentLoadedEventStart;
|
||||
/** @type {number} */ PerformanceNavigationTiming.prototype
|
||||
.domContentLoadedEventEnd;
|
||||
/** @type {number} */ PerformanceNavigationTiming.prototype.domComplete;
|
||||
/** @type {number} */ PerformanceNavigationTiming.prototype.loadEventStart;
|
||||
/** @type {number} */ PerformanceNavigationTiming.prototype.loadEventEnd;
|
||||
/** @type {NavigationType} */ PerformanceNavigationTiming.prototype.type;
|
||||
/** @type {number} */ PerformanceNavigationTiming.prototype.redirectCount;
|
||||
|
||||
/**
|
||||
* https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
|
||||
* @constructor
|
||||
* @extends {PerformanceEntry}
|
||||
*/
|
||||
function PerformancePaintTiming() {}
|
||||
|
||||
/** @constructor */
|
||||
function PerformanceNavigation() {}
|
||||
/** @type {number} */ PerformanceNavigation.prototype.TYPE_NAVIGATE = 0;
|
||||
/** @type {number} */ PerformanceNavigation.prototype.TYPE_RELOAD = 1;
|
||||
/** @type {number} */ PerformanceNavigation.prototype.TYPE_BACK_FORWARD = 2;
|
||||
/** @type {number} */ PerformanceNavigation.prototype.TYPE_RESERVED = 255;
|
||||
/** @const {number} */ PerformanceNavigation.TYPE_NAVIGATE;
|
||||
/** @const {number} */ PerformanceNavigation.prototype.TYPE_NAVIGATE;
|
||||
/** @const {number} */ PerformanceNavigation.TYPE_RELOAD;
|
||||
/** @const {number} */ PerformanceNavigation.prototype.TYPE_RELOAD;
|
||||
/** @const {number} */ PerformanceNavigation.TYPE_BACK_FORWARD;
|
||||
/** @const {number} */ PerformanceNavigation.prototype.TYPE_BACK_FORWARD;
|
||||
/** @const {number} */ PerformanceNavigation.TYPE_RESERVED;
|
||||
/** @const {number} */ PerformanceNavigation.prototype.TYPE_RESERVED;
|
||||
/** @type {number} */ PerformanceNavigation.prototype.type;
|
||||
/** @type {number} */ PerformanceNavigation.prototype.redirectCount;
|
||||
|
||||
// Only available in WebKit, and only with the --enable-memory-info flag.
|
||||
/** @constructor */
|
||||
function PerformanceMemory() {}
|
||||
/** @type {number} */ PerformanceMemory.prototype.jsHeapSizeLimit;
|
||||
/** @type {number} */ PerformanceMemory.prototype.totalJSHeapSize;
|
||||
/** @type {number} */ PerformanceMemory.prototype.usedJSHeapSize;
|
||||
/**
|
||||
* https://w3c.github.io/longtasks/#taskattributiontiming
|
||||
* @constructor
|
||||
* @extends {PerformanceEntry}
|
||||
*/
|
||||
function TaskAttributionTiming() {}
|
||||
/** @type {string} */ TaskAttributionTiming.prototype.containerId;
|
||||
/** @type {string} */ TaskAttributionTiming.prototype.containerName;
|
||||
/** @type {string} */ TaskAttributionTiming.prototype.containerSrc;
|
||||
/** @type {string} */ TaskAttributionTiming.prototype.containerType;
|
||||
|
||||
/**
|
||||
* https://w3c.github.io/longtasks/#performancelongtasktiming
|
||||
* @constructor
|
||||
* @extends {PerformanceEntry}
|
||||
*/
|
||||
function PerformanceLongTaskTiming() {}
|
||||
/** @type {!Array<!TaskAttributionTiming>} */
|
||||
PerformanceLongTaskTiming.prototype.attribution;
|
||||
|
||||
/**
|
||||
* https://wicg.github.io/layout-instability/#sec-layout-shift
|
||||
* @constructor
|
||||
* @extends {PerformanceEntry}
|
||||
*/
|
||||
function LayoutShift() {}
|
||||
/** @type {number} */ LayoutShift.prototype.value;
|
||||
/** @type {boolean} */ LayoutShift.prototype.hadRecentInput;
|
||||
/** @type {number} */ LayoutShift.prototype.lastInputTime;
|
||||
/** @type {!Array<!LayoutShiftAttribution>} */ LayoutShift.prototype.sources;
|
||||
|
||||
/**
|
||||
* https://wicg.github.io/layout-instability/#sec-layout-shift
|
||||
* @constructor
|
||||
*/
|
||||
function LayoutShiftAttribution() {}
|
||||
/** @type {?Node} */ LayoutShiftAttribution.prototype.node;
|
||||
/** @type {!DOMRectReadOnly} */ LayoutShiftAttribution.prototype.previousRect;
|
||||
/** @type {!DOMRectReadOnly} */ LayoutShiftAttribution.prototype.currentRect;
|
||||
|
||||
/**
|
||||
* https://wicg.github.io/largest-contentful-paint/#largestcontentfulpaint
|
||||
* @constructor
|
||||
* @extends {PerformanceEntry}
|
||||
*/
|
||||
function LargestContentfulPaint() {}
|
||||
/** @type {number} */ LargestContentfulPaint.prototype.renderTime;
|
||||
/** @type {number} */ LargestContentfulPaint.prototype.loadTime;
|
||||
/** @type {number} */ LargestContentfulPaint.prototype.size;
|
||||
/** @type {string} */ LargestContentfulPaint.prototype.id;
|
||||
/** @type {string} */ LargestContentfulPaint.prototype.url;
|
||||
/** @type {?Element} */ LargestContentfulPaint.prototype.element;
|
||||
|
||||
/**
|
||||
* https://wicg.github.io/event-timing/#sec-performance-event-timing
|
||||
* @constructor
|
||||
* @extends {PerformanceEntry}
|
||||
*/
|
||||
function PerformanceEventTiming() {}
|
||||
/** @type {number} */ PerformanceEventTiming.prototype.processingStart;
|
||||
/** @type {number} */ PerformanceEventTiming.prototype.processingEnd;
|
||||
/** @type {boolean} */ PerformanceEventTiming.prototype.cancelable;
|
||||
/** @type {?Node} */ PerformanceEventTiming.prototype.target;
|
||||
|
||||
/** @constructor */
|
||||
function Performance() {}
|
||||
/** @type {PerformanceTiming} */ Performance.prototype.timing;
|
||||
/** @type {PerformanceNavigation} */ Performance.prototype.navigation;
|
||||
|
||||
/** @type {PerformanceTiming} */
|
||||
Performance.prototype.timing;
|
||||
|
||||
/** @type {PerformanceNavigation} */
|
||||
Performance.prototype.navigation;
|
||||
|
||||
/** @type {number} */
|
||||
Performance.prototype.timeOrigin;
|
||||
|
||||
|
||||
/**
|
||||
* Clears the buffer used to store the current list of
|
||||
@@ -105,10 +217,10 @@ function Performance() {}
|
||||
Performance.prototype.clearResourceTimings = function() {};
|
||||
|
||||
/**
|
||||
* Clear out the buffer of performance timing events for webkit browsers.
|
||||
* @return {undefined}
|
||||
* A callback that is invoked when the resourcetimingbufferfull event is fired.
|
||||
* @type {?function(Event)}
|
||||
*/
|
||||
Performance.prototype.webkitClearResourceTimings = function() {};
|
||||
Performance.prototype.onresourcetimingbufferfull = function() {};
|
||||
|
||||
/**
|
||||
* Set the maximum number of PerformanceResourceTiming resources that may be
|
||||
@@ -119,46 +231,37 @@ Performance.prototype.webkitClearResourceTimings = function() {};
|
||||
Performance.prototype.setResourceTimingBufferSize = function(maxSize) {};
|
||||
|
||||
/**
|
||||
* @return {Array<PerformanceEntry>} A copy of the PerformanceEntry list,
|
||||
* @return {!Array<!PerformanceEntry>} A copy of the PerformanceEntry list,
|
||||
* in chronological order with respect to startTime.
|
||||
* @nosideeffects
|
||||
*/
|
||||
Performance.prototype.getEntries = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} entryType Only return {@code PerformanceEntry}s with this
|
||||
* @param {string} entryType Only return `PerformanceEntry`s with this
|
||||
* entryType.
|
||||
* @return {Array<PerformanceEntry>} A copy of the PerformanceEntry list,
|
||||
* @return {!Array<!PerformanceEntry>} A copy of the PerformanceEntry list,
|
||||
* in chronological order with respect to startTime.
|
||||
* @nosideeffects
|
||||
*/
|
||||
Performance.prototype.getEntriesByType = function(entryType) {};
|
||||
|
||||
/**
|
||||
* @param {string} name Only return {@code PerformanceEntry}s with this name.
|
||||
* @param {string=} opt_entryType Only return {@code PerformanceEntry}s with
|
||||
* @param {string} name Only return `PerformanceEntry`s with this name.
|
||||
* @param {string=} opt_entryType Only return `PerformanceEntry`s with
|
||||
* this entryType.
|
||||
* @return {Array<PerformanceEntry>} PerformanceEntry list in chronological
|
||||
* @return {!Array<!PerformanceEntry>} PerformanceEntry list in chronological
|
||||
* order with respect to startTime.
|
||||
* @nosideeffects
|
||||
*/
|
||||
Performance.prototype.getEntriesByName = function(name, opt_entryType) {};
|
||||
|
||||
// Only available in WebKit, and only with the --enable-memory-info flag.
|
||||
/** @type {PerformanceMemory} */ Performance.prototype.memory;
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Performance.prototype.now = function() {};
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
* @nosideeffects
|
||||
*/
|
||||
Performance.prototype.webkitNow = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} markName
|
||||
* @return {undefined}
|
||||
@@ -177,8 +280,8 @@ Performance.prototype.clearMarks = function(opt_markName) {};
|
||||
* @param {string=} opt_endMark
|
||||
* @return {undefined}
|
||||
*/
|
||||
Performance.prototype.measure =
|
||||
function(measureName, opt_startMark, opt_endMark) {};
|
||||
Performance.prototype.measure = function(
|
||||
measureName, opt_startMark, opt_endMark) {};
|
||||
|
||||
/**
|
||||
* @param {string=} opt_measureName
|
||||
@@ -194,3 +297,73 @@ Window.prototype.performance;
|
||||
* @suppress {duplicate}
|
||||
*/
|
||||
var performance;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Performance}
|
||||
*/
|
||||
function WorkerPerformance() {}
|
||||
|
||||
/**
|
||||
* @typedef {function(!PerformanceObserverEntryList, !PerformanceObserver): void}
|
||||
*/
|
||||
var PerformanceObserverCallback;
|
||||
|
||||
/**
|
||||
* See:
|
||||
* https://w3c.github.io/performance-timeline/#the-performanceobserver-interface
|
||||
* @constructor
|
||||
* @param {!PerformanceObserverCallback} callback
|
||||
*/
|
||||
function PerformanceObserver(callback) {}
|
||||
|
||||
/**
|
||||
* @param {!PerformanceObserverInit} options
|
||||
*/
|
||||
PerformanceObserver.prototype.observe = function(options) {};
|
||||
|
||||
/** @return {void} */
|
||||
PerformanceObserver.prototype.disconnect = function() {};
|
||||
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/takeRecords
|
||||
* @see https://www.w3.org/TR/performance-timeline-2/#takerecords-method
|
||||
* @return {!Array<!PerformanceEntry>} The current PerformanceEntry list stored
|
||||
* in the performance observer buffer, emptying it out.
|
||||
*/
|
||||
PerformanceObserver.prototype.takeRecords = function() {};
|
||||
|
||||
/** @const {!Array<string>} */
|
||||
PerformanceObserver.prototype.supportedEntryTypes;
|
||||
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
function PerformanceObserverInit() {}
|
||||
|
||||
/** @type {undefined|!Array<string>} */
|
||||
PerformanceObserverInit.prototype.entryTypes;
|
||||
/** @type {undefined|string} */
|
||||
PerformanceObserverInit.prototype.type;
|
||||
/** @type {undefined|boolean} */
|
||||
PerformanceObserverInit.prototype.buffered;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function PerformanceObserverEntryList() {}
|
||||
|
||||
/** @return {!Array<!PerformanceEntry>} */
|
||||
PerformanceObserverEntryList.prototype.getEntries = function() {};
|
||||
/**
|
||||
* @param {string} type
|
||||
* @return {!Array<!PerformanceEntry>}
|
||||
*/
|
||||
PerformanceObserverEntryList.prototype.getEntriesByName = function(type) {};
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {string=} opt_type
|
||||
* @return {!Array<!PerformanceEntry>}
|
||||
*/
|
||||
PerformanceObserverEntryList.prototype.getEntriesByType = function(
|
||||
name, opt_type) {};
|
||||
|
||||
85
javascript/externs/web/w3c_netinfo.js
Normal file
85
javascript/externs/web/w3c_netinfo.js
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright 2017 The Closure Compiler Authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Externs for the Network Information API.
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @see http://wicg.github.io/netinfo/#-dfn-networkinformation-dfn-interface
|
||||
* @constructor
|
||||
*/
|
||||
function NetworkInformation() {}
|
||||
|
||||
/** @type {ConnectionType} */
|
||||
NetworkInformation.prototype.type;
|
||||
|
||||
/** @type {EffectiveConnectionType} */
|
||||
NetworkInformation.prototype.effectiveType;
|
||||
|
||||
/** @type {Megabit} */
|
||||
NetworkInformation.prototype.downlinkMax;
|
||||
|
||||
/** @type {Megabit} */
|
||||
NetworkInformation.prototype.downlink;
|
||||
|
||||
/** @type {Millisecond} */
|
||||
NetworkInformation.prototype.rtt;
|
||||
|
||||
/** @type {?function(Event)} */
|
||||
NetworkInformation.prototype.onchange;
|
||||
|
||||
/** @type {boolean} */
|
||||
NetworkInformation.prototype.saveData;
|
||||
|
||||
/**
|
||||
* @typedef {number}
|
||||
*/
|
||||
var Megabit;
|
||||
|
||||
/**
|
||||
* @typedef {number}
|
||||
*/
|
||||
var Millisecond;
|
||||
|
||||
/**
|
||||
* Enum of:
|
||||
* 'bluetooth',
|
||||
* 'cellular',
|
||||
* 'ethernet',
|
||||
* 'mixed',
|
||||
* 'none',
|
||||
* 'other',
|
||||
* 'unknown',
|
||||
* 'wifi',
|
||||
* 'wimax'
|
||||
* @typedef {string}
|
||||
*/
|
||||
var ConnectionType;
|
||||
|
||||
/**
|
||||
* Enum of:
|
||||
* '2g',
|
||||
* '3g',
|
||||
* '4g',
|
||||
* 'slow-2g'
|
||||
* @typedef {string}
|
||||
*/
|
||||
var EffectiveConnectionType;
|
||||
|
||||
/** @type {!NetworkInformation} */
|
||||
Navigator.prototype.connection;
|
||||
401
javascript/externs/web/w3c_payment_request.js
Normal file
401
javascript/externs/web/w3c_payment_request.js
Normal file
@@ -0,0 +1,401 @@
|
||||
/*
|
||||
* Copyright 2019 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's Payment Request API.
|
||||
* @see https://w3c.github.io/payment-request/
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {!Array<!PaymentMethodData>} methodData
|
||||
* @param {!PaymentDetailsInit} details
|
||||
* @param {!PaymentOptions=} options
|
||||
* @implements {EventTarget}
|
||||
* @see https://w3c.github.io/payment-request/#paymentrequest-interface
|
||||
*/
|
||||
function PaymentRequest(methodData, details, options) {}
|
||||
/**
|
||||
* @param {!Promise<!PaymentDetailsUpdate>=} detailsPromise
|
||||
* @return {!Promise<!PaymentResponse>}
|
||||
*/
|
||||
PaymentRequest.prototype.show = function(detailsPromise) {};
|
||||
/** @return {!Promise<undefined>} */
|
||||
PaymentRequest.prototype.abort = function() {};
|
||||
/** @return {!Promise<boolean>} */
|
||||
PaymentRequest.prototype.canMakePayment = function() {};
|
||||
/** @return {!Promise<boolean>} */
|
||||
PaymentRequest.prototype.hasEnrolledInstrument = function() {};
|
||||
/** @const {string} */
|
||||
PaymentRequest.prototype.id;
|
||||
/** @const {?PaymentAddress} */
|
||||
PaymentRequest.prototype.shippingAddress;
|
||||
/** @const {?string} */
|
||||
PaymentRequest.prototype.shippingOption;
|
||||
/** @const {?string} */
|
||||
PaymentRequest.prototype.shippingType;
|
||||
/** @type {?function(!Event)} */
|
||||
PaymentRequest.prototype.onmerchantvalidation;
|
||||
/** @type {?function(!Event)} */
|
||||
PaymentRequest.prototype.onshippingaddresschange;
|
||||
/** @type {?function(!Event)} */
|
||||
PaymentRequest.prototype.onshippingoptionchange;
|
||||
/** @type {?function(!Event)} */
|
||||
PaymentRequest.prototype.onpaymentmethodchange;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentmethoddata-dictionary
|
||||
*/
|
||||
function PaymentMethodData() {};
|
||||
/** @type {string} */
|
||||
PaymentMethodData.prototype.supportedMethods;
|
||||
/** @type {!Object|undefined} */
|
||||
PaymentMethodData.prototype.data;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentcurrencyamount-dictionary
|
||||
*/
|
||||
function PaymentCurrencyAmount() {};
|
||||
/** @type {string} */
|
||||
PaymentCurrencyAmount.prototype.currency;
|
||||
/** @type {string} */
|
||||
PaymentCurrencyAmount.prototype.value;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentdetailsbase-dictionary
|
||||
*/
|
||||
function PaymentDetailsBase() {};
|
||||
/** @type {!Array<!PaymentItem>|undefined} */
|
||||
PaymentDetailsBase.prototype.displayItems;
|
||||
/** @type {!Array<!PaymentShippingOption>|undefined} */
|
||||
PaymentDetailsBase.prototype.shippingOptions;
|
||||
/** @type {!Array<!PaymentDetailsModifier>|undefined} */
|
||||
PaymentDetailsBase.prototype.modifiers;
|
||||
|
||||
/**
|
||||
* @extends {PaymentDetailsBase}
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentdetailsinit-dictionary
|
||||
*/
|
||||
function PaymentDetailsInit() {};
|
||||
/** @type {string|undefined} */
|
||||
PaymentDetailsInit.prototype.id;
|
||||
/** @type {!PaymentItem} */
|
||||
PaymentDetailsInit.prototype.total;
|
||||
|
||||
/**
|
||||
* @extends {PaymentDetailsBase}
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentdetailsupdate-dictionary
|
||||
*/
|
||||
function PaymentDetailsUpdate() {};
|
||||
/** @type {string|undefined} */
|
||||
PaymentDetailsUpdate.prototype.error;
|
||||
/** @type {!PaymentItem|undefined} */
|
||||
PaymentDetailsUpdate.prototype.total;
|
||||
/** @type {!AddressErrors|undefined} */
|
||||
PaymentDetailsUpdate.prototype.shippingAddressErrors;
|
||||
/** @type {!PayerErrors|undefined} */
|
||||
PaymentDetailsUpdate.prototype.payerErrors;
|
||||
/** @type {!Object|undefined} */
|
||||
PaymentDetailsUpdate.prototype.paymentMethodErrors;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentdetailsmodifier-dictionary
|
||||
*/
|
||||
function PaymentDetailsModifier() {};
|
||||
/** @type {string} */
|
||||
PaymentDetailsModifier.prototype.supportedMethods;
|
||||
/** @type {!PaymentItem|undefined} */
|
||||
PaymentDetailsModifier.prototype.total;
|
||||
/** @type {!Array<!PaymentItem>|undefined} */
|
||||
PaymentDetailsModifier.prototype.additionalDisplayItems;
|
||||
/** @type {!Object|undefined} */
|
||||
PaymentDetailsModifier.prototype.data;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentoptions-dictionary
|
||||
*/
|
||||
function PaymentOptions() {};
|
||||
/** @type {boolean|undefined} */
|
||||
PaymentOptions.prototype.requestPayerName;
|
||||
/** @type {boolean|undefined} */
|
||||
PaymentOptions.prototype.requestBillingAddress;
|
||||
/** @type {boolean|undefined} */
|
||||
PaymentOptions.prototype.requestPayerEmail;
|
||||
/** @type {boolean|undefined} */
|
||||
PaymentOptions.prototype.requestPayerPhone;
|
||||
/** @type {boolean|undefined} */
|
||||
PaymentOptions.prototype.requestShipping;
|
||||
/** @type {string|undefined} */
|
||||
PaymentOptions.prototype.shippingType;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentitem-dictionary
|
||||
*/
|
||||
function PaymentItem() {};
|
||||
/** @type {string} */
|
||||
PaymentItem.prototype.label;
|
||||
/** @type {!PaymentCurrencyAmount} */
|
||||
PaymentItem.prototype.amount;
|
||||
/** @type {boolean|undefined} */
|
||||
PaymentItem.prototype.pending;
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @see https://w3c.github.io/payment-request/#paymentaddress-interface
|
||||
*/
|
||||
function PaymentAddress() {}
|
||||
/**
|
||||
* @return {Object}
|
||||
* @override
|
||||
*/
|
||||
PaymentAddress.prototype.toJSON = function() {};
|
||||
/** @const {string|undefined} */
|
||||
PaymentAddress.prototype.city;
|
||||
/** @const {string|undefined} */
|
||||
PaymentAddress.prototype.country;
|
||||
/** @const {string|undefined} */
|
||||
PaymentAddress.prototype.dependentLocality;
|
||||
/** @const {string|undefined} */
|
||||
PaymentAddress.prototype.organization;
|
||||
/** @const {string|undefined} */
|
||||
PaymentAddress.prototype.phone;
|
||||
/** @const {string|undefined} */
|
||||
PaymentAddress.prototype.postalCode;
|
||||
/** @const {string|undefined} */
|
||||
PaymentAddress.prototype.recipient;
|
||||
/** @const {string|undefined} */
|
||||
PaymentAddress.prototype.region;
|
||||
/** @const {string|undefined} */
|
||||
PaymentAddress.prototype.sortingCode;
|
||||
/** @const {!Array<string>|undefined} */
|
||||
PaymentAddress.prototype.addressLine;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#addressinit-dictionary
|
||||
*/
|
||||
function AddressInit() {};
|
||||
/** @type {string|undefined} */
|
||||
AddressInit.prototype.country;
|
||||
/** @type {!Array<string>|undefined} */
|
||||
AddressInit.prototype.addressLine;
|
||||
/** @type {string|undefined} */
|
||||
AddressInit.prototype.region;
|
||||
/** @type {string|undefined} */
|
||||
AddressInit.prototype.city;
|
||||
/** @type {string|undefined} */
|
||||
AddressInit.prototype.dependentLocality;
|
||||
/** @type {string|undefined} */
|
||||
AddressInit.prototype.postalCode;
|
||||
/** @type {string|undefined} */
|
||||
AddressInit.prototype.sortingCode;
|
||||
/** @type {string|undefined} */
|
||||
AddressInit.prototype.organization;
|
||||
/** @type {string|undefined} */
|
||||
AddressInit.prototype.recipient;
|
||||
/** @type {string|undefined} */
|
||||
AddressInit.prototype.phone;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#addresserrors-dictionary
|
||||
*/
|
||||
function AddressErrors() {};
|
||||
/** @type {string|undefined} */
|
||||
AddressErrors.prototype.addressLine;
|
||||
/** @type {string|undefined} */
|
||||
AddressErrors.prototype.city;
|
||||
/** @type {string|undefined} */
|
||||
AddressErrors.prototype.country;
|
||||
/** @type {string|undefined} */
|
||||
AddressErrors.prototype.dependentLocality;
|
||||
/** @type {string|undefined} */
|
||||
AddressErrors.prototype.organization;
|
||||
/** @type {string|undefined} */
|
||||
AddressErrors.prototype.phone;
|
||||
/** @type {string|undefined} */
|
||||
AddressErrors.prototype.postalCode;
|
||||
/** @type {string|undefined} */
|
||||
AddressErrors.prototype.recipient;
|
||||
/** @type {string|undefined} */
|
||||
AddressErrors.prototype.region;
|
||||
/** @type {string|undefined} */
|
||||
AddressErrors.prototype.sortingCode;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentshippingoption-dictionary
|
||||
*/
|
||||
function PaymentShippingOption() {};
|
||||
/** @type {string} */
|
||||
PaymentShippingOption.prototype.id;
|
||||
/** @type {string} */
|
||||
PaymentShippingOption.prototype.label;
|
||||
/** @type {!PaymentCurrencyAmount} */
|
||||
PaymentShippingOption.prototype.amount;
|
||||
/** @type {boolean|undefined} */
|
||||
PaymentShippingOption.prototype.selected;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {EventTarget}
|
||||
* @see https://w3c.github.io/payment-request/#paymentresponse-interface
|
||||
*/
|
||||
function PaymentResponse() {}
|
||||
/**
|
||||
* @return {!Object}
|
||||
* @override
|
||||
*/
|
||||
PaymentResponse.prototype.toJSON = function() {};
|
||||
/** @const {string} */
|
||||
PaymentResponse.prototype.requestId;
|
||||
/** @const {string} */
|
||||
PaymentResponse.prototype.methodName;
|
||||
/** @const {!Object} */
|
||||
PaymentResponse.prototype.details;
|
||||
/** @const {?PaymentAddress} */
|
||||
PaymentResponse.prototype.shippingAddress;
|
||||
/** @const {?string} */
|
||||
PaymentResponse.prototype.shippingOption;
|
||||
/** @const {?string} */
|
||||
PaymentResponse.prototype.payerName;
|
||||
/** @const {?string} */
|
||||
PaymentResponse.prototype.payerEmail;
|
||||
/** @const {?string} */
|
||||
PaymentResponse.prototype.payerPhone;
|
||||
/**
|
||||
* @param {string=} result
|
||||
* @return {!Promise<undefined>}
|
||||
*/
|
||||
PaymentResponse.prototype.complete = function(result) {};
|
||||
/**
|
||||
* @param {!PaymentValidationErrors=} errorFields
|
||||
* @return {!Promise<undefined>}
|
||||
*/
|
||||
PaymentResponse.prototype.retry = function(errorFields) {};
|
||||
/** @type {?function(!Event)} */
|
||||
PaymentResponse.prototype.onpayerdetailchange;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentvalidationerrors-dictionary
|
||||
*/
|
||||
function PaymentValidationErrors() {};
|
||||
/** @type {!PayerErrors|undefined} */
|
||||
PaymentValidationErrors.prototype.payer;
|
||||
/** @type {!AddressErrors|undefined} */
|
||||
PaymentValidationErrors.prototype.shippingAddress;
|
||||
/** @type {string|undefined} */
|
||||
PaymentValidationErrors.prototype.error;
|
||||
/** @type {!Object|undefined} */
|
||||
PaymentValidationErrors.prototype.paymentMethod;
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#payererrors-dictionary
|
||||
*/
|
||||
function PayerErrors() {};
|
||||
/** @type {string|undefined} */
|
||||
PayerErrors.prototype.email;
|
||||
/** @type {string|undefined} */
|
||||
PayerErrors.prototype.name;
|
||||
/** @type {string|undefined} */
|
||||
PayerErrors.prototype.phone;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} type
|
||||
* @param {!MerchantValidationEventInit=} eventInitDict
|
||||
* @extends {Event}
|
||||
* @see https://w3c.github.io/payment-request/#merchantvalidationevent-interface
|
||||
*/
|
||||
function MerchantValidationEvent(type, eventInitDict) {};
|
||||
/** @const {string} */
|
||||
MerchantValidationEvent.prototype.methodName;
|
||||
/** @const {string} */
|
||||
MerchantValidationEvent.prototype.validationURL;
|
||||
/**
|
||||
* @param {!Promise<undefined>} merchantSessionPromise
|
||||
* @return {undefined}
|
||||
*/
|
||||
MerchantValidationEvent.prototype.complete = function(
|
||||
merchantSessionPromise) {};
|
||||
|
||||
/**
|
||||
* @extends {EventInit}
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#merchantvalidationeventinit-dictionary
|
||||
*/
|
||||
function MerchantValidationEventInit() {};
|
||||
/** @type {string|undefined} */
|
||||
MerchantValidationEventInit.prototype.methodName;
|
||||
/** @type {string|undefined} */
|
||||
MerchantValidationEventInit.prototype.validationURL;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} type
|
||||
* @param {!PaymentMethodChangeEventInit=} eventInitDict
|
||||
* @extends {PaymentRequestUpdateEvent}
|
||||
* @see https://w3c.github.io/payment-request/#paymentmethodchangeevent-interface
|
||||
*/
|
||||
function PaymentMethodChangeEvent(type, eventInitDict) {};
|
||||
/** @const {string} */
|
||||
PaymentMethodChangeEvent.prototype.methodName;
|
||||
/** @const {?Object} */
|
||||
PaymentMethodChangeEvent.prototype.methodDetails;
|
||||
|
||||
/**
|
||||
* @extends {PaymentRequestUpdateEventInit}
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentmethodchangeeventinit-dictionary
|
||||
*/
|
||||
function PaymentMethodChangeEventInit() {};
|
||||
/** @type {string|undefined} */
|
||||
PaymentMethodChangeEventInit.prototype.methodName;
|
||||
/** @type {?Object|undefined} */
|
||||
PaymentMethodChangeEventInit.prototype.methodDetails;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} type
|
||||
* @param {!PaymentRequestUpdateEventInit=} eventInitDict
|
||||
* @extends {Event}
|
||||
* @see https://w3c.github.io/payment-request/#paymentrequestupdateevent-interface
|
||||
*/
|
||||
function PaymentRequestUpdateEvent(type, eventInitDict) {};
|
||||
/**
|
||||
* @param {!Promise<!PaymentDetailsUpdate>} detailsPromise
|
||||
* @return {undefined}
|
||||
*/
|
||||
PaymentRequestUpdateEvent.prototype.updateWith = function(detailsPromise) {};
|
||||
|
||||
/**
|
||||
* @extends {EventInit}
|
||||
* @record
|
||||
* @see https://w3c.github.io/payment-request/#paymentrequestupdateeventinit-dictionary
|
||||
*/
|
||||
function PaymentRequestUpdateEventInit() {};
|
||||
@@ -78,27 +78,15 @@ PermissionStatus.prototype.status;
|
||||
/** @type {?function(!Event)} */
|
||||
PermissionStatus.prototype.onchange;
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_useCapture
|
||||
* @override
|
||||
* @return {undefined}
|
||||
*/
|
||||
PermissionStatus.prototype.addEventListener = function(type,
|
||||
listener,
|
||||
opt_useCapture) {};
|
||||
/** @override */
|
||||
PermissionStatus.prototype.addEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/**
|
||||
* @param {boolean=} opt_useCapture
|
||||
* @override
|
||||
* @return {undefined}
|
||||
*/
|
||||
PermissionStatus.prototype.removeEventListener = function(type,
|
||||
listener,
|
||||
opt_useCapture) {};
|
||||
/**
|
||||
* @override
|
||||
* @return {boolean}
|
||||
*/
|
||||
/** @override */
|
||||
PermissionStatus.prototype.removeEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/** @override */
|
||||
PermissionStatus.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
|
||||
|
||||
@@ -42,6 +42,26 @@ Navigator.prototype.pointerEnabled;
|
||||
Navigator.prototype.maxTouchPoints;
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} pointerId
|
||||
* @see https://www.w3.org/TR/pointerevents/#widl-Element-setPointerCapture-void-long-pointerId
|
||||
*/
|
||||
Element.prototype.setPointerCapture = function(pointerId) {};
|
||||
|
||||
/**
|
||||
* @param {number} pointerId
|
||||
* @see https://www.w3.org/TR/pointerevents/#widl-Element-releasePointerCapture-void-long-pointerId
|
||||
*/
|
||||
Element.prototype.releasePointerCapture = function(pointerId) {};
|
||||
|
||||
/**
|
||||
* @param {number} pointerId
|
||||
* @see https://www.w3.org/TR/pointerevents/#dom-element-haspointercapture
|
||||
* @return {boolean}
|
||||
*/
|
||||
Element.prototype.hasPointerCapture = function(pointerId) {};
|
||||
|
||||
|
||||
/**
|
||||
* @record
|
||||
* @extends {MouseEventInit}
|
||||
@@ -107,11 +127,18 @@ PointerEvent.prototype.pointerType;
|
||||
PointerEvent.prototype.isPrimary;
|
||||
|
||||
// Microsoft pointerType values
|
||||
/** @type {string} */
|
||||
/** @const {string} */
|
||||
PointerEvent.prototype.MSPOINTER_TYPE_TOUCH;
|
||||
|
||||
/** @type {string} */
|
||||
/** @const {string} */
|
||||
PointerEvent.prototype.MSPOINTER_TYPE_PEN;
|
||||
|
||||
/** @type {string} */
|
||||
/** @const {string} */
|
||||
PointerEvent.prototype.MSPOINTER_TYPE_MOUSE;
|
||||
|
||||
/**
|
||||
* @see https://w3c.github.io/pointerevents/extension.html
|
||||
* @return {!Array<!PointerEvent>}
|
||||
*/
|
||||
PointerEvent.prototype.getCoalescedEvents = function() {};
|
||||
|
||||
|
||||
63
javascript/externs/web/w3c_pointerlock.js
Normal file
63
javascript/externs/web/w3c_pointerlock.js
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2015 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's Pointer Lock API.
|
||||
* @see https://w3c.github.io/pointerlock/
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* TODO(bradfordcsmith): update the link when PR is merged
|
||||
* @see https://github.com/w3c/pointerlock/pull/49/
|
||||
* @record
|
||||
*/
|
||||
function PointerLockOptions() {}
|
||||
|
||||
/** @type {undefined|boolean} */
|
||||
PointerLockOptions.prototype.unadjustedMovement;
|
||||
|
||||
/**
|
||||
* @see https://w3c.github.io/pointerlock/#widl-Element-requestPointerLock-void
|
||||
* @param {!PointerLockOptions=} options
|
||||
* @return {void|!Promise<void>}
|
||||
*/
|
||||
Element.prototype.requestPointerLock = function(options) {};
|
||||
|
||||
/**
|
||||
* @see https://w3c.github.io/pointerlock/#widl-Document-pointerLockElement
|
||||
* @type {?Element}
|
||||
*/
|
||||
Document.prototype.pointerLockElement;
|
||||
|
||||
/**
|
||||
* @see https://w3c.github.io/pointerlock/#widl-Document-exitPointerLock-void
|
||||
* @return {void}
|
||||
*/
|
||||
Document.prototype.exitPointerLock = function() {};
|
||||
|
||||
/**
|
||||
* @see https://w3c.github.io/pointerlock/#widl-MouseEvent-movementX
|
||||
* @type {number}
|
||||
*/
|
||||
MouseEvent.prototype.movementX;
|
||||
|
||||
/**
|
||||
* @see https://w3c.github.io/pointerlock/#widl-MouseEvent-movementY
|
||||
* @type {number}
|
||||
*/
|
||||
MouseEvent.prototype.movementY;
|
||||
@@ -32,6 +32,58 @@
|
||||
*/
|
||||
function Range() {}
|
||||
|
||||
// constants on the constructor
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.START_TO_START;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.START_TO_END;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.END_TO_END;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.END_TO_START;
|
||||
|
||||
// constants repeated on the prototype
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.prototype.START_TO_START;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.prototype.START_TO_END;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.prototype.END_TO_END;
|
||||
|
||||
/**
|
||||
* @const {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.prototype.END_TO_START;
|
||||
|
||||
/**
|
||||
* @type {Node}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-startParent
|
||||
@@ -133,30 +185,6 @@ Range.prototype.selectNode = function(refNode) {};
|
||||
*/
|
||||
Range.prototype.selectNodeContents = function(refNode) {};
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.prototype.START_TO_START = 0;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.prototype.START_TO_END = 1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.prototype.END_TO_END = 2;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
|
||||
*/
|
||||
Range.prototype.END_TO_START = 3;
|
||||
|
||||
/**
|
||||
* @param {number} how
|
||||
* @param {Range} sourceRange
|
||||
@@ -211,7 +239,7 @@ Range.prototype.detach = function() {};
|
||||
|
||||
// Introduced in DOM Level 2:
|
||||
/**
|
||||
* @constructor
|
||||
* @interface
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-DocumentRange-idl
|
||||
*/
|
||||
function DocumentRange() {}
|
||||
@@ -221,28 +249,3 @@ function DocumentRange() {}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-DocumentRange-method-createRange
|
||||
*/
|
||||
DocumentRange.prototype.createRange = function() {};
|
||||
|
||||
// Introduced in DOM Level 2:
|
||||
/**
|
||||
* @constructor
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeException
|
||||
*/
|
||||
function RangeException() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeExceptionCode
|
||||
*/
|
||||
RangeException.prototype.code;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeExceptionCode
|
||||
*/
|
||||
RangeException.prototype.BAD_BOUNDARYPOINTS_ERR = 1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeExceptionCode
|
||||
*/
|
||||
RangeException.prototype.INVALID_NODE_TYPE_ERR = 2;
|
||||
|
||||
36
javascript/externs/web/w3c_referrer_policy.js
Normal file
36
javascript/externs/web/w3c_referrer_policy.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2018 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's referrer policy specification.
|
||||
* @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-delivery
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/** @type {string} */
|
||||
HTMLAnchorElement.prototype.referrerPolicy;
|
||||
|
||||
/** @type {string} */
|
||||
HTMLAreaElement.prototype.referrerPolicy;
|
||||
|
||||
/** @type {string} */
|
||||
HTMLImageElement.prototype.referrerPolicy;
|
||||
|
||||
/** @type {string} */
|
||||
HTMLIFrameElement.prototype.referrerPolicy;
|
||||
|
||||
/** @type {string} */
|
||||
HTMLLinkElement.prototype.referrerPolicy;
|
||||
@@ -33,7 +33,7 @@ var IdleCallbackOptions;
|
||||
|
||||
/**
|
||||
* Schedules a callback to run when the browser is idle.
|
||||
* @param {function(!IdleDeadline)} callback Called when the browser is idle.
|
||||
* @param {function(!IdleDeadline): void} callback Called when the browser is idle.
|
||||
* @param {number|IdleCallbackOptions=} opt_options If set, gives the browser a time in ms by which
|
||||
* it must execute the callback. No timeout enforced otherwise.
|
||||
* @return {number} A handle that can be used to cancel the scheduled callback.
|
||||
@@ -43,7 +43,7 @@ function requestIdleCallback(callback, opt_options) {}
|
||||
|
||||
/**
|
||||
* Cancels a callback scheduled to run when the browser is idle.
|
||||
* @param {number} handle The handle returned by {@code requestIdleCallback} for
|
||||
* @param {number} handle The handle returned by `requestIdleCallback` for
|
||||
* the scheduled callback to cancel.
|
||||
* @return {undefined}
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ function cancelIdleCallback(handle) {}
|
||||
|
||||
/**
|
||||
* An interface for an object passed into the callback for
|
||||
* {@code requestIdleCallback} that remains up-to-date on the amount of idle
|
||||
* `requestIdleCallback` that remains up-to-date on the amount of idle
|
||||
* time left in the current time slice.
|
||||
* @interface
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
58
javascript/externs/web/w3c_screen_wake_lock.js
Normal file
58
javascript/externs/web/w3c_screen_wake_lock.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright 2020 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
/**
|
||||
* Screen Wake Lock API
|
||||
* W3C Editor's Draft 01 September 2020
|
||||
* @externs
|
||||
* @see https://w3c.github.io/screen-wake-lock/
|
||||
*/
|
||||
|
||||
|
||||
/** @type {!WakeLock} */
|
||||
Navigator.prototype.wakeLock;
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @see https://w3c.github.io/screen-wake-lock/#the-wakelock-interface
|
||||
*/
|
||||
function WakeLock() {};
|
||||
|
||||
/**
|
||||
* @param {string} type
|
||||
* @return {!Promise<!WakeLockSentinel>}
|
||||
*/
|
||||
WakeLock.prototype.request = function(type) {};
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {EventTarget}
|
||||
* @see https://w3c.github.io/screen-wake-lock/#the-wakelocksentinel-interface
|
||||
*/
|
||||
function WakeLockSentinel() {};
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
WakeLockSentinel.prototype.onrelease;
|
||||
|
||||
/** @return {!Promise<void>} */
|
||||
WakeLockSentinel.prototype.release = function() {};
|
||||
|
||||
/** @type {boolean} @const */
|
||||
WakeLockSentinel.prototype.released;
|
||||
|
||||
/** @type {string} @const */
|
||||
WakeLockSentinel.prototype.type;
|
||||
209
javascript/externs/web/w3c_selection.js
Normal file
209
javascript/externs/web/w3c_selection.js
Normal file
@@ -0,0 +1,209 @@
|
||||
/*
|
||||
* Copyright 2008 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's Selection API.
|
||||
*
|
||||
* @see https://w3c.github.io/selection-api/
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see http://w3c.github.io/selection-api/#selection-interface
|
||||
*/
|
||||
function Selection() {}
|
||||
|
||||
/**
|
||||
* @type {?Node}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-anchornode
|
||||
*/
|
||||
Selection.prototype.anchorNode;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-anchoroffset
|
||||
*/
|
||||
Selection.prototype.anchorOffset;
|
||||
|
||||
/**
|
||||
* @type {?Node}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-focusnode
|
||||
*/
|
||||
Selection.prototype.focusNode;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-focusoffset
|
||||
*/
|
||||
Selection.prototype.focusOffset;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-iscollapsed
|
||||
*/
|
||||
Selection.prototype.isCollapsed;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-rangecount
|
||||
*/
|
||||
Selection.prototype.rangeCount;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-type
|
||||
*/
|
||||
Selection.prototype.type;
|
||||
|
||||
/**
|
||||
* @param {number} index
|
||||
* @return {!Range}
|
||||
* @nosideeffects
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-getrangeat
|
||||
*/
|
||||
Selection.prototype.getRangeAt = function(index) {};
|
||||
|
||||
/**
|
||||
* TODO(tjgq): Clean up internal usages and make the `range` parameter a
|
||||
* `!Range` per the spec.
|
||||
* @param {?Range} range
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-addrange
|
||||
*/
|
||||
Selection.prototype.addRange = function(range) {};
|
||||
|
||||
/**
|
||||
* @param {!Range} range
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-removerange
|
||||
*/
|
||||
Selection.prototype.removeRange = function(range) {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-removeallranges
|
||||
*/
|
||||
Selection.prototype.removeAllRanges = function() {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-empty
|
||||
*/
|
||||
Selection.prototype.empty = function() {};
|
||||
|
||||
/**
|
||||
* @param {?Node} node
|
||||
* @param {number=} offset
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-collapse
|
||||
*/
|
||||
Selection.prototype.collapse = function(node, offset) {};
|
||||
|
||||
/**
|
||||
* @param {?Node} node
|
||||
* @param {number=} offset
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-setposition
|
||||
*/
|
||||
Selection.prototype.setPosition = function(node, offset) {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-collapsetostart
|
||||
*/
|
||||
Selection.prototype.collapseToStart = function() {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-collapsetoend
|
||||
*/
|
||||
Selection.prototype.collapseToEnd = function() {};
|
||||
|
||||
/**
|
||||
* TODO(tjgq): Clean up internal usages and make the `node` parameter a `!Node`
|
||||
* per the spec.
|
||||
* @param {?Node} node
|
||||
* @param {number=} offset
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-extend
|
||||
*/
|
||||
Selection.prototype.extend = function(node, offset) {};
|
||||
|
||||
/**
|
||||
* TODO(tjgq): Clean up internal usages and make the `anchorNode` and
|
||||
* `focusNode` parameters `!Node` per the spec.
|
||||
* @param {?Node} anchorNode
|
||||
* @param {number} anchorOffset
|
||||
* @param {?Node} focusNode
|
||||
* @param {number} focusOffset
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-setbaseandextent
|
||||
*/
|
||||
Selection.prototype.setBaseAndExtent = function(anchorNode, anchorOffset, focusNode, focusOffset) {};
|
||||
|
||||
/**
|
||||
* TODO(tjgq): Clean up internal usages and make the `node` parameter a `!Node`
|
||||
* per the spec.
|
||||
* @param {?Node} node
|
||||
* @return {undefined}
|
||||
* @see http://w3c.github.io/selection-api/#dom-selection-selectallchildren
|
||||
*/
|
||||
Selection.prototype.selectAllChildren = function(node) {};
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-deletefromdocument
|
||||
*/
|
||||
Selection.prototype.deleteFromDocument = function() {};
|
||||
|
||||
/**
|
||||
* @param {!Node} node
|
||||
* @param {boolean=} allowPartialContainment
|
||||
* @return {boolean}
|
||||
* @nosideeffects
|
||||
* @see https://w3c.github.io/selection-api/#dom-selection-containsnode
|
||||
*/
|
||||
Selection.prototype.containsNode = function(node, allowPartialContainment) {};
|
||||
|
||||
/**
|
||||
* @return {?Selection}
|
||||
* @nosideeffects
|
||||
* @see https://w3c.github.io/selection-api/#dom-window-getselection
|
||||
*/
|
||||
Window.prototype.getSelection = function() {};
|
||||
|
||||
/**
|
||||
* @return {?Selection}
|
||||
* @nosideeffects
|
||||
* @see https://w3c.github.io/selection-api/#dom-document-getselection
|
||||
*/
|
||||
Document.prototype.getSelection = function() {};
|
||||
|
||||
/**
|
||||
* TODO(tjgq): Clean up internal usages and make this `?function(!Event): void`
|
||||
* per the spec.
|
||||
* @type {?function(?Event)}
|
||||
* @see https://w3c.github.io/selection-api/#dom-globaleventhandlers-onselectstart
|
||||
*/
|
||||
Element.prototype.onselectstart;
|
||||
|
||||
/**
|
||||
* @type {?function(!Event): void}
|
||||
* @see https://w3c.github.io/selection-api/#dom-globaleventhandlers-onselectionchange
|
||||
*/
|
||||
Element.prototype.onselectionchange;
|
||||
@@ -41,7 +41,55 @@ ServiceWorker.prototype.onstatechange;
|
||||
* 'activated', 'redundant'.
|
||||
* @typedef {string}
|
||||
*/
|
||||
var ServiceWorkerState ;
|
||||
var ServiceWorkerState;
|
||||
|
||||
/**
|
||||
* @see https://w3c.github.io/ServiceWorker/#navigationpreloadmanager
|
||||
* @constructor
|
||||
*/
|
||||
function NavigationPreloadManager() {}
|
||||
|
||||
/** @return {!Promise<void>} */
|
||||
NavigationPreloadManager.prototype.enable = function() {};
|
||||
|
||||
/** @return {!Promise<void>} */
|
||||
NavigationPreloadManager.prototype.disable = function() {};
|
||||
|
||||
/**
|
||||
* @param {string=} value
|
||||
* @return {!Promise<void>}
|
||||
*/
|
||||
NavigationPreloadManager.prototype.setHeaderValue = function(value) {};
|
||||
|
||||
/** @return {!Promise<NavigationPreloadState>} */
|
||||
NavigationPreloadManager.prototype.getState = function() {};
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* enabled: (boolean|undefined),
|
||||
* headerValue: (string|undefined)
|
||||
* }}
|
||||
*/
|
||||
var NavigationPreloadState;
|
||||
|
||||
/** @record */
|
||||
function PushSubscriptionOptions() {}
|
||||
|
||||
/** @type {ArrayBuffer|undefined} */
|
||||
PushSubscriptionOptions.prototype.applicationServerKey;
|
||||
|
||||
/** @type {boolean|undefined} */
|
||||
PushSubscriptionOptions.prototype.userVisibleOnly;
|
||||
|
||||
/** @record */
|
||||
function PushSubscriptionOptionsInit() {}
|
||||
|
||||
/** @type {BufferSource|string|undefined} */
|
||||
PushSubscriptionOptionsInit.prototype.applicationServerKey;
|
||||
|
||||
/** @type {boolean|undefined} */
|
||||
PushSubscriptionOptionsInit.prototype.userVisibleOnly;
|
||||
|
||||
|
||||
/**
|
||||
* @see https://w3c.github.io/push-api/
|
||||
@@ -59,6 +107,9 @@ PushSubscription.prototype.endpoint;
|
||||
*/
|
||||
PushSubscription.prototype.subscriptionId;
|
||||
|
||||
/** @type {!PushSubscriptionOptions} */
|
||||
PushSubscription.prototype.options;
|
||||
|
||||
/** @return {!Promise<boolean>} */
|
||||
PushSubscription.prototype.unsubscribe = function() {};
|
||||
|
||||
@@ -78,8 +129,8 @@ PushSubscription.prototype.unsubscribe = function() {};
|
||||
function PushManager() {}
|
||||
|
||||
/**
|
||||
* @param {PushSubscriptionOptions=} opt_options
|
||||
* @return {!Promise<PushSubscription>}
|
||||
* @param {PushSubscriptionOptionsInit=} opt_options
|
||||
* @return {!Promise<!PushSubscription>}
|
||||
*/
|
||||
PushManager.prototype.subscribe = function(opt_options) {};
|
||||
|
||||
@@ -92,10 +143,34 @@ PushManager.prototype.getSubscription = function() {};
|
||||
// PushManager.prototype.hasPermission = function() {};
|
||||
|
||||
/**
|
||||
* @typedef {{userVisibleOnly: (boolean|undefined)}}
|
||||
* @see https://w3c.github.io/push-api/#idl-def-PushSubscriptionOptions
|
||||
* @see https://wicg.github.io/BackgroundSync/spec/#sync-manager-interface
|
||||
* @constructor
|
||||
*/
|
||||
var PushSubscriptionOptions;
|
||||
function SyncManager() {}
|
||||
|
||||
/**
|
||||
* @param {string} tag
|
||||
* @return {!Promise<void>}
|
||||
*/
|
||||
SyncManager.prototype.register = function(tag) {}
|
||||
|
||||
/**
|
||||
* @return {!Promise<Array<string>>}
|
||||
*/
|
||||
SyncManager.prototype.getTags = function() {}
|
||||
|
||||
/**
|
||||
* @see https://wicg.github.io/BackgroundSync/spec/#sync-event
|
||||
* @constructor
|
||||
* @extends{ExtendableEvent}
|
||||
*/
|
||||
function SyncEvent() {}
|
||||
|
||||
/** @type {string} */
|
||||
SyncEvent.prototype.tag;
|
||||
|
||||
/** @type {boolean} */
|
||||
SyncEvent.prototype.lastChance;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/push-api/#idl-def-PushMessageData
|
||||
@@ -145,6 +220,9 @@ ServiceWorkerRegistration.prototype.waiting;
|
||||
/** @type {ServiceWorker} */
|
||||
ServiceWorkerRegistration.prototype.active;
|
||||
|
||||
/** @type {NavigationPreloadManager} */
|
||||
ServiceWorkerRegistration.prototype.navigationPreload;
|
||||
|
||||
/** @type {string} */
|
||||
ServiceWorkerRegistration.prototype.scope;
|
||||
|
||||
@@ -179,6 +257,12 @@ ServiceWorkerRegistration.prototype.showNotification =
|
||||
*/
|
||||
ServiceWorkerRegistration.prototype.getNotifications = function(opt_filter) {};
|
||||
|
||||
/**
|
||||
* @see https://wicg.github.io/BackgroundSync/spec/#service-worker-registration-extensions
|
||||
* @type {!SyncManager}
|
||||
*/
|
||||
ServiceWorkerRegistration.prototype.sync;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/service-workers/#service-worker-container-interface
|
||||
* @interface
|
||||
@@ -193,7 +277,7 @@ ServiceWorkerContainer.prototype.controller;
|
||||
ServiceWorkerContainer.prototype.ready;
|
||||
|
||||
/**
|
||||
* @param {string} scriptURL
|
||||
* @param {!TrustedScriptURL|string} scriptURL
|
||||
* @param {RegistrationOptions=} opt_options
|
||||
* @return {!Promise<!ServiceWorkerRegistration>}
|
||||
*/
|
||||
@@ -210,14 +294,17 @@ ServiceWorkerContainer.prototype.getRegistration = function(opt_documentURL) {};
|
||||
*/
|
||||
ServiceWorkerContainer.prototype.getRegistrations = function() {};
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
/** @type {?function(!Event): void} */
|
||||
ServiceWorkerContainer.prototype.oncontrollerchange;
|
||||
|
||||
/** @type {?function(!ErrorEvent)} */
|
||||
/** @type {?function(!ExtendableMessageEvent): void} */
|
||||
ServiceWorkerContainer.prototype.onmessage;
|
||||
|
||||
/** @type {?function(!ErrorEvent): void} */
|
||||
ServiceWorkerContainer.prototype.onerror;
|
||||
|
||||
/**
|
||||
* @typedef {{scope: (string|undefined), useCache: (boolean|undefined)}}
|
||||
* @typedef {{scope: (string|undefined), useCache: (boolean|undefined), updateViaCache: (string|undefined)}}
|
||||
*/
|
||||
var RegistrationOptions;
|
||||
|
||||
@@ -276,8 +363,19 @@ ServiceWorkerGlobalScope.prototype.onevicted;
|
||||
/** @type {?function(!MessageEvent)} */
|
||||
ServiceWorkerGlobalScope.prototype.onmessage;
|
||||
|
||||
/** @type {!IDBFactory|undefined} */
|
||||
ServiceWorkerGlobalScope.prototype.indexedDB;
|
||||
/**
|
||||
* While not strictly correct, this should be effectively correct. Notification
|
||||
* is the Notification constructor but calling it from the Service Worker throws
|
||||
* (https://notifications.spec.whatwg.org/#constructors) so its only use is as
|
||||
* an object holding some static properties (note that requestPermission is only
|
||||
* exposed to window context - https://notifications.spec.whatwg.org/#api).
|
||||
*
|
||||
* @type {{
|
||||
* permission: string,
|
||||
* maxActions: number,
|
||||
* }}
|
||||
*/
|
||||
ServiceWorkerGlobalScope.prototype.Notification;
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/service-workers/#service-worker-client-interface
|
||||
@@ -300,6 +398,9 @@ ServiceWorkerClient.prototype.visibilityState;
|
||||
/** @type {string} */
|
||||
ServiceWorkerClient.prototype.url;
|
||||
|
||||
/** @type {string} */
|
||||
ServiceWorkerClient.prototype.id;
|
||||
|
||||
/**
|
||||
* // TODO(mtragut): Possibly replace the type with enum ContextFrameType once
|
||||
* the enum is defined.
|
||||
@@ -317,6 +418,12 @@ ServiceWorkerClient.prototype.postMessage = function(message, opt_transfer) {};
|
||||
/** @return {!Promise} */
|
||||
ServiceWorkerClient.prototype.focus = function() {};
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @return {!Promise<!ServiceWorkerClient>}
|
||||
*/
|
||||
ServiceWorkerClient.prototype.navigate = function(url) {};
|
||||
|
||||
/**
|
||||
* @see http://www.w3.org/TR/service-workers/#service-worker-clients-interface
|
||||
* @interface
|
||||
@@ -349,6 +456,12 @@ ServiceWorkerClients.prototype.claim = function() {};
|
||||
*/
|
||||
ServiceWorkerClients.prototype.openWindow = function(url) {};
|
||||
|
||||
/**
|
||||
* @param {string} id
|
||||
* @return {!Promise<!ServiceWorkerClient|undefined>}
|
||||
*/
|
||||
ServiceWorkerClients.prototype.get = function(id) {};
|
||||
|
||||
/** @typedef {{includeUncontrolled: (boolean|undefined)}} */
|
||||
var ServiceWorkerClientQueryOptions;
|
||||
|
||||
@@ -506,21 +619,35 @@ var InstallEventInit;
|
||||
* @constructor
|
||||
* @param {string} type
|
||||
* @param {FetchEventInit=} opt_eventInitDict
|
||||
* @extends {Event}
|
||||
* @extends {ExtendableEvent}
|
||||
*/
|
||||
function FetchEvent(type, opt_eventInitDict) {}
|
||||
|
||||
/** @type {!Request} */
|
||||
FetchEvent.prototype.request;
|
||||
|
||||
/** @type {!ServiceWorkerClient} */
|
||||
FetchEvent.prototype.client;
|
||||
|
||||
/** @type {!boolean} */
|
||||
FetchEvent.prototype.isReload;
|
||||
/**
|
||||
* @type {!Promise<Response>}
|
||||
*/
|
||||
FetchEvent.prototype.preloadResponse;
|
||||
|
||||
/**
|
||||
* @param {(Response|Promise<Response>)} r
|
||||
* @type {!ServiceWorkerClient}
|
||||
* @deprecated
|
||||
*/
|
||||
FetchEvent.prototype.client;
|
||||
|
||||
/** @type {?string} */
|
||||
FetchEvent.prototype.clientId;
|
||||
|
||||
/** @type {boolean} */
|
||||
FetchEvent.prototype.isReload;
|
||||
|
||||
/** @type {?string} */
|
||||
FetchEvent.prototype.resultingClientId;
|
||||
|
||||
/**
|
||||
* @param {(Response|IThenable<Response>)} r
|
||||
* @return {undefined}
|
||||
*/
|
||||
FetchEvent.prototype.respondWith = function(r) {};
|
||||
@@ -541,8 +668,59 @@ FetchEvent.prototype.default = function() {};
|
||||
* bubbles: (boolean|undefined),
|
||||
* cancelable: (boolean|undefined),
|
||||
* request: (!Request|undefined),
|
||||
* preloadResponse: (!Promise<Response>),
|
||||
* client: (!ServiceWorkerClient|undefined),
|
||||
* isReload: (!boolean|undefined)
|
||||
* isReload: (boolean|undefined)
|
||||
* }}
|
||||
*/
|
||||
var FetchEventInit;
|
||||
|
||||
|
||||
/**
|
||||
* @see https://www.w3.org/TR/service-workers/#extendablemessage-event-interface
|
||||
* @param {string} type
|
||||
* @param {!ExtendableMessageEventInit<T>=} opt_eventInitDict
|
||||
* @constructor
|
||||
* @extends {ExtendableEvent}
|
||||
* @template T
|
||||
*/
|
||||
function ExtendableMessageEvent(type, opt_eventInitDict) {};
|
||||
|
||||
/** @type {T} */
|
||||
ExtendableMessageEvent.prototype.data;
|
||||
|
||||
/** @type {string} */
|
||||
ExtendableMessageEvent.prototype.origin;
|
||||
|
||||
/** @type {string} */
|
||||
ExtendableMessageEvent.prototype.lastEventId;
|
||||
|
||||
/** @type {?ServiceWorkerClient|?ServiceWorker|?MessagePort} */
|
||||
ExtendableMessageEvent.prototype.source;
|
||||
|
||||
/** @type {?Array<!MessagePort>} */
|
||||
ExtendableMessageEvent.prototype.ports;
|
||||
|
||||
|
||||
/**
|
||||
* @see https://www.w3.org/TR/service-workers/#extendablemessage-event-init-dictionary
|
||||
* @record
|
||||
* @extends {ExtendableEventInit}
|
||||
* @template T
|
||||
*/
|
||||
function ExtendableMessageEventInit() {};
|
||||
|
||||
/** @type {T} */
|
||||
ExtendableMessageEventInit.prototype.data;
|
||||
|
||||
/** @type {string|undefined} */
|
||||
ExtendableMessageEventInit.prototype.origin;
|
||||
|
||||
/** @type {string|undefined} */
|
||||
ExtendableMessageEventInit.prototype.lastEventId;
|
||||
|
||||
/** @type {!ServiceWorkerClient|!ServiceWorker|!MessagePort|undefined} */
|
||||
ExtendableMessageEventInit.prototype.source;
|
||||
|
||||
/** @type {!Array<!MessagePort>|undefined} */
|
||||
ExtendableMessageEventInit.prototype.ports;
|
||||
|
||||
412
javascript/externs/web/w3c_speech.js
Normal file
412
javascript/externs/web/w3c_speech.js
Normal file
@@ -0,0 +1,412 @@
|
||||
/*
|
||||
* Copyright 2011 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's Speech Input 2010 draft API and the
|
||||
* 2012 Web Speech draft API (in progress).
|
||||
* 2010 Speech Input API:
|
||||
* http://www.w3.org/2005/Incubator/htmlspeech/2010/10/google-api-draft.html
|
||||
* 2012 Web Speech API:
|
||||
* http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
|
||||
* This file contains only those functions/properties that are actively
|
||||
* used in the Voice Search experiment. Because the draft is under discussion
|
||||
* and constantly evolving, this file does not attempt to stay in sync with it.
|
||||
*
|
||||
* @externs
|
||||
*/
|
||||
|
||||
// W3C Speech Input API implemented in Chrome M12
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {UIEvent}
|
||||
*/
|
||||
function SpeechInputEvent() {}
|
||||
|
||||
/** @type {SpeechInputResultList} */
|
||||
SpeechInputEvent.prototype.results;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SpeechInputResultList() {}
|
||||
|
||||
/** @type {number} */
|
||||
SpeechInputResultList.prototype.length;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SpeechInputResult() {}
|
||||
|
||||
/** @type {string} */
|
||||
SpeechInputResult.prototype.utterance;
|
||||
|
||||
/** @type {number} */
|
||||
SpeechInputResult.prototype.confidence;
|
||||
|
||||
|
||||
// HTMLInputElement
|
||||
/** @type {boolean} */
|
||||
HTMLInputElement.prototype.webkitspeech;
|
||||
|
||||
/** @type {?function (Event)} */
|
||||
HTMLInputElement.prototype.onwebkitspeechchange;
|
||||
|
||||
|
||||
|
||||
// W3C Web Speech API implemented in Chrome M23
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {EventTarget}
|
||||
*/
|
||||
function SpeechRecognition() {}
|
||||
|
||||
/** @override */
|
||||
SpeechRecognition.prototype.addEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/** @override */
|
||||
SpeechRecognition.prototype.removeEventListener = function(
|
||||
type, listener, opt_options) {};
|
||||
|
||||
/** @override */
|
||||
SpeechRecognition.prototype.dispatchEvent = function(evt) {};
|
||||
|
||||
/** @type {SpeechGrammarList} */
|
||||
SpeechRecognition.prototype.grammars;
|
||||
|
||||
/** @type {string} */
|
||||
SpeechRecognition.prototype.lang;
|
||||
|
||||
/** @type {boolean} */
|
||||
SpeechRecognition.prototype.continuous;
|
||||
|
||||
/** @type {boolean} */
|
||||
SpeechRecognition.prototype.interimResults;
|
||||
|
||||
/** @type {number} */
|
||||
SpeechRecognition.prototype.maxAlternatives;
|
||||
|
||||
/** @type {string} */
|
||||
SpeechRecognition.prototype.serviceURI;
|
||||
|
||||
/** @type {function()} */
|
||||
SpeechRecognition.prototype.start;
|
||||
|
||||
/** @type {function()} */
|
||||
SpeechRecognition.prototype.stop;
|
||||
|
||||
/** @type {function()} */
|
||||
SpeechRecognition.prototype.abort;
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
SpeechRecognition.prototype.onaudiostart;
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
SpeechRecognition.prototype.onsoundstart;
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
SpeechRecognition.prototype.onspeechstart;
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
SpeechRecognition.prototype.onspeechend;
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
SpeechRecognition.prototype.onsoundend;
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
SpeechRecognition.prototype.onaudioend;
|
||||
|
||||
/** @type {?function(!SpeechRecognitionEvent)} */
|
||||
SpeechRecognition.prototype.onresult;
|
||||
|
||||
/** @type {?function(!SpeechRecognitionEvent)} */
|
||||
SpeechRecognition.prototype.onnomatch;
|
||||
|
||||
/** @type {?function(!SpeechRecognitionError)} */
|
||||
SpeechRecognition.prototype.onerror;
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
SpeechRecognition.prototype.onstart;
|
||||
|
||||
/** @type {?function(!Event)} */
|
||||
SpeechRecognition.prototype.onend;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Event}
|
||||
*/
|
||||
function SpeechRecognitionError() {}
|
||||
|
||||
/** @type {string} */
|
||||
SpeechRecognitionError.prototype.error;
|
||||
|
||||
/** @type {string} */
|
||||
SpeechRecognitionError.prototype.message;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SpeechRecognitionAlternative() {}
|
||||
|
||||
/** @type {string} */
|
||||
SpeechRecognitionAlternative.prototype.transcript;
|
||||
|
||||
/** @type {number} */
|
||||
SpeechRecognitionAlternative.prototype.confidence;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SpeechRecognitionResult() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
SpeechRecognitionResult.prototype.length;
|
||||
|
||||
/**
|
||||
* @type {function(number): SpeechRecognitionAlternative}
|
||||
*/
|
||||
SpeechRecognitionResult.prototype.item = function(index) {};
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
SpeechRecognitionResult.prototype.isFinal;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SpeechRecognitionResultList() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
SpeechRecognitionResultList.prototype.length;
|
||||
|
||||
/**
|
||||
* @type {function(number): SpeechRecognitionResult}
|
||||
*/
|
||||
SpeechRecognitionResultList.prototype.item = function(index) {};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Event}
|
||||
*/
|
||||
function SpeechRecognitionEvent() {}
|
||||
|
||||
/** @type {number} */
|
||||
SpeechRecognitionEvent.prototype.resultIndex;
|
||||
|
||||
/** @type {SpeechRecognitionResultList} */
|
||||
SpeechRecognitionEvent.prototype.results;
|
||||
|
||||
/** @type {*} */
|
||||
SpeechRecognitionEvent.prototype.interpretation;
|
||||
|
||||
/** @type {Document} */
|
||||
SpeechRecognitionEvent.prototype.emma;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SpeechGrammar() {}
|
||||
|
||||
/** @type {string} */
|
||||
SpeechGrammar.prototype.src;
|
||||
|
||||
/** @type {number} */
|
||||
SpeechGrammar.prototype.weight;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SpeechGrammarList() {}
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
SpeechGrammarList.prototype.length;
|
||||
|
||||
/**
|
||||
* @type {function(number): SpeechGrammar}
|
||||
*/
|
||||
SpeechGrammarList.prototype.item = function(index) {};
|
||||
|
||||
/**
|
||||
* @type {function(string, number)}
|
||||
*/
|
||||
SpeechGrammarList.prototype.addFromUri = function(src, weight) {};
|
||||
|
||||
/**
|
||||
* @type {function(string, number)}
|
||||
*/
|
||||
SpeechGrammarList.prototype.addFromString = function(str, weight) {};
|
||||
|
||||
|
||||
// Webkit implementations of Web Speech API
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {SpeechGrammarList}
|
||||
*/
|
||||
function webkitSpeechGrammarList() {}
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {SpeechGrammar}
|
||||
*/
|
||||
function webkitSpeechGrammar() {}
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {SpeechRecognitionEvent}
|
||||
*/
|
||||
function webkitSpeechRecognitionEvent() {}
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {SpeechRecognitionError}
|
||||
*/
|
||||
function webkitSpeechRecognitionError() {}
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {SpeechRecognition}
|
||||
*/
|
||||
function webkitSpeechRecognition() {}
|
||||
|
||||
|
||||
|
||||
// W3C Web Speech Synthesis API is implemented in Chrome M33
|
||||
/**
|
||||
* @type {SpeechSynthesis}
|
||||
* @see https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#tts-section
|
||||
*/
|
||||
var speechSynthesis;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} text
|
||||
*/
|
||||
function SpeechSynthesisUtterance(text) {}
|
||||
|
||||
/** @type {string} */
|
||||
SpeechSynthesisUtterance.prototype.text;
|
||||
|
||||
/** @type {string} */
|
||||
SpeechSynthesisUtterance.prototype.lang;
|
||||
|
||||
/** @type {number} */
|
||||
SpeechSynthesisUtterance.prototype.pitch;
|
||||
|
||||
/** @type {number} */
|
||||
SpeechSynthesisUtterance.prototype.rate;
|
||||
|
||||
/** @type {SpeechSynthesisVoice} */
|
||||
SpeechSynthesisUtterance.prototype.voice;
|
||||
|
||||
/** @type {number} */
|
||||
SpeechSynthesisUtterance.prototype.volume;
|
||||
|
||||
/**
|
||||
* @param {Event} event
|
||||
*/
|
||||
SpeechSynthesisUtterance.prototype.onstart = function(event) {};
|
||||
|
||||
/**
|
||||
* @param {Event} event
|
||||
*/
|
||||
SpeechSynthesisUtterance.prototype.onend = function(event) {};
|
||||
|
||||
/**
|
||||
* @param {Event} event
|
||||
*/
|
||||
SpeechSynthesisUtterance.prototype.onerror = function(event) {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SpeechSynthesisVoice() {}
|
||||
|
||||
/** @type {string} */
|
||||
SpeechSynthesisVoice.prototype.voiceURI;
|
||||
|
||||
/** @type {string} */
|
||||
SpeechSynthesisVoice.prototype.name;
|
||||
|
||||
/** @type {string} */
|
||||
SpeechSynthesisVoice.prototype.lang;
|
||||
|
||||
/** @type {boolean} */
|
||||
SpeechSynthesisVoice.prototype.localService;
|
||||
|
||||
/** @type {boolean} */
|
||||
SpeechSynthesisVoice.prototype.default;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Array<!SpeechSynthesisVoice>}
|
||||
*/
|
||||
function SpeechSynthesisVoiceList() {}
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @extends {EventTarget}
|
||||
*/
|
||||
function SpeechSynthesis() {}
|
||||
|
||||
/**
|
||||
* @param {SpeechSynthesisUtterance} utterance
|
||||
* @return {undefined}
|
||||
*/
|
||||
SpeechSynthesis.prototype.speak = function(utterance) {};
|
||||
|
||||
/** @type {function()} */
|
||||
SpeechSynthesis.prototype.cancel;
|
||||
|
||||
/** @type {function()} */
|
||||
SpeechSynthesis.prototype.pause;
|
||||
|
||||
/** @type {function()} */
|
||||
SpeechSynthesis.prototype.resume;
|
||||
|
||||
/**
|
||||
* @return {SpeechSynthesisVoiceList}
|
||||
*/
|
||||
SpeechSynthesis.prototype.getVoices = function() {};
|
||||
|
||||
/**
|
||||
* @param {Event} event
|
||||
* @see https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi-errata.html
|
||||
*/
|
||||
SpeechSynthesis.prototype.onvoiceschanged = function(event) {};
|
||||
139
javascript/externs/web/w3c_trusted_types.js
Normal file
139
javascript/externs/web/w3c_trusted_types.js
Normal file
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* Copyright 2018 The Closure Compiler Authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for W3C's Trusted Types specification.
|
||||
* @see https://w3c.github.io/webappsec-trusted-types/dist/spec/
|
||||
* @externs
|
||||
*/
|
||||
|
||||
|
||||
/** @constructor */
|
||||
function TrustedHTML() {}
|
||||
|
||||
// function TrustedScript() was moved to `es3.js` so that is could be used by
|
||||
// `eval()`.
|
||||
|
||||
/** @constructor */
|
||||
function TrustedScriptURL() {}
|
||||
|
||||
|
||||
/**
|
||||
* @template Options
|
||||
* @constructor
|
||||
*/
|
||||
function TrustedTypePolicy() {}
|
||||
|
||||
/**
|
||||
* @param {string} s
|
||||
* @return {!TrustedHTML}
|
||||
*/
|
||||
TrustedTypePolicy.prototype.createHTML = function(s) {};
|
||||
|
||||
/**
|
||||
* @param {string} s
|
||||
* @return {!TrustedScript}
|
||||
*/
|
||||
TrustedTypePolicy.prototype.createScript = function(s) {};
|
||||
|
||||
/**
|
||||
* @param {string} s
|
||||
* @return {!TrustedScriptURL}
|
||||
*/
|
||||
TrustedTypePolicy.prototype.createScriptURL = function(s) {};
|
||||
|
||||
|
||||
/** @constructor */
|
||||
function TrustedTypePolicyFactory() {}
|
||||
|
||||
/** @record @private */
|
||||
function TrustedTypePolicyOptions() {};
|
||||
|
||||
/**
|
||||
* @type {(function(string, ...*): string)|undefined},
|
||||
*/
|
||||
TrustedTypePolicyOptions.prototype.createHTML;
|
||||
|
||||
/**
|
||||
* @type {(function(string, ...*): string)|undefined},
|
||||
*/
|
||||
TrustedTypePolicyOptions.prototype.createScript;
|
||||
|
||||
/**
|
||||
* @type {(function(string, ...*): string)|undefined},
|
||||
*/
|
||||
TrustedTypePolicyOptions.prototype.createScriptURL;
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {!TrustedTypePolicyOptions} policy
|
||||
* @return {!TrustedTypePolicy}
|
||||
*/
|
||||
TrustedTypePolicyFactory.prototype.createPolicy = function(name, policy) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {*} obj
|
||||
* @return {boolean}
|
||||
*/
|
||||
TrustedTypePolicyFactory.prototype.isHTML = function(obj) {};
|
||||
|
||||
/**
|
||||
* @param {*} obj
|
||||
* @return {boolean}
|
||||
*/
|
||||
TrustedTypePolicyFactory.prototype.isScript = function(obj) {};
|
||||
|
||||
/**
|
||||
* @param {*} obj
|
||||
* @return {boolean}
|
||||
*/
|
||||
TrustedTypePolicyFactory.prototype.isScriptURL = function(obj) {};
|
||||
|
||||
|
||||
/** @type {!TrustedHTML} */
|
||||
TrustedTypePolicyFactory.prototype.emptyHTML;
|
||||
|
||||
|
||||
/** @type {!TrustedScript} */
|
||||
TrustedTypePolicyFactory.prototype.emptyScript;
|
||||
|
||||
/**
|
||||
* @param {string} tagName
|
||||
* @param {string} attribute
|
||||
* @param {string=} elementNs
|
||||
* @param {string=} attrNs
|
||||
* @return {?string}
|
||||
*/
|
||||
TrustedTypePolicyFactory.prototype.getAttributeType = function(
|
||||
tagName, attribute, elementNs, attrNs) {};
|
||||
|
||||
/**
|
||||
* @param {string} tagName
|
||||
* @param {string} property
|
||||
* @param {string=} elementNs
|
||||
* @return {?string}
|
||||
*/
|
||||
TrustedTypePolicyFactory.prototype.getPropertyType = function(
|
||||
tagName, property, elementNs) {};
|
||||
|
||||
/** @type {?TrustedTypePolicy} */
|
||||
TrustedTypePolicyFactory.prototype.defaultPolicy;
|
||||
|
||||
|
||||
/** @type {!TrustedTypePolicyFactory} */
|
||||
var trustedTypes;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user